[Info-ingres] Error from auditdb

Martin Bowes martin.bowes at ndph.ox.ac.uk
Thu May 6 09:14:46 UTC 2021


It’s on unjournalled tables with long varchar columns.

I’ve just developed a test case doing simple inserts into the table. Each insert has to be in a separate session. Break 2048 inserts and the auditdb goes nuts.

Try This (test.sh):
#! /bin/bash

nInserts=$1

##destroydb bowtest > /dev/null
##
##createdb bowtest
##
##ckpdb +j bowtest
##
sql bowtest << SQL_END
drop table if exists test_long;

create table test_long(
    id integer4 not null not default,
    a_long long varchar not null not default,
    a_date ingresdate not null default 'now'
) with nojournaling;
commit;
\p\g
\q
SQL_END

ckpdb +j bowtest

for ((id=1; id<=$nInserts; id++)); do
    sql -S bowtest << _SQL_INSERT
    insert into test_long(id, a_long) values ($id, 'tom, dick, and harry.');
    \g
    \q
_SQL_INSERT
done

auditFile=auditFile.${nInserts}.log
auditdb -a bowtest >& $auditFile
nErrors=`grep -c E_DM $auditFile`
nOpen=`egrep 'End     : |End Mini: |Begin   :' $auditFile | awk '{print $5}' | sort | uniq -c | sort  | grep -e' 1 ' | wc -l`

echo "$auditFile:"
echo "    E_DM: $nErrors"
echo "    open: $nOpen"

The test.sh 2050 … takes a little time but it’s worth it!

Marty

From: Paul White <paul.white at shift7solutions.com.au>
Sent: 06 May 2021 10:09
To: info-ingres at lists.planetingres.org
Subject: Re: [Info-ingres] Error from auditdb


I reckon it happens when there is a usermod or sysmod on a table with a long byte field right?



Marty writes

> The alteration to iirelation affects only the rellow_logkey field. Anyone know what that refers to?



Here is what I found looking up rellow_logkey and "end mini"

https://github.com/fosslc/Ingres/blob/master/src/dbutil/duf/duve/duvechk.sc

https://communities.actian.com/s/article/Tracing-Use-of-Transaction-Log-File

https://docs.actian.com/actianx/11.1/index.html#page/CommandRef/verifylob_Command--Analyze_Long_Data_Types.htm


verifylob Command--Analyze Long Data Types

The verifylob utility analyzes errors in long data types (blobs and clobs).  It scans the specified blob table and examines the blob coupons and etab tables for errors. Rows with errors are dumped with error indicators.

Verifylob detects four types of errors:

•(D) Duplicate keys

•(L) Non matching lengths

•(O) Orphaned rows

•(R) Invalid iirelation rellow_logkey, rellow_logkey pair



Next step, I plan to track the entries going to the transaction log to see if both BM (Begin Mini) and EM (End Mini) are being written.

My hunch is the BM is not being written to the journals because I am sure I reached the transaction limit error in the rollforwarddb.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20210506/af8bc37d/attachment-0001.html>


More information about the Info-ingres mailing list