log-begin on new transactions (7.11.UC1)
Posted in 1997
Hi all,
Warning 1: You may have to widen your windows for this. Sorry.
Just some notes and wheel-inventing for OnLine admin folks.
I was testing out some scripts on sysmaster and ran into strange
situation.
Window1: begin work;
set isolation to cursor stability;
window2: onstat -ux # Obviously edited to isolate my session
Userthreads
address flags sessid user tty wait tout locks nreads
nwrites
c1fabf1c Y--P--- 13391 jake ttyq0 c2f963f0 0 1 6
4
Transactions
address flags userthread locks log begin isolation retrys coordinator
c1fcba4c A---- c1fabf1c 1 0 CURSOR 0
Notice: That's my transaction being described; I promise it's the only
one with that isolation level. So the in-memory array of transaction
info describes this transaction but the log-begin is 0. This tells me
there is nothing on disk or the log buffer describibg this transaction.
In hindsight, I suppose this may be reasonable; if the system were to
crash now, it would not have to bother rolling back this transaction
which has not yet done a blessed thing to the database.
Now, back to the experiment:
Window1: delete from cust_tab where customer = "00002"
Window2: onstat -x
Transactions
address flags userthread locks log begin isolation retrys coordinator
c1fcba4c A-B-- c1fabf1c 5 157 CURSOR 0
Suddenly, log-begin is at uniq log sequence number 157. (Yes, that is my
current log at the moment.) Now something *has* happened to the
database.
Why is this a problem for me?
Well, the experiment started as a result of people asking if there was a
way to determine which logs are free-able under the newer scheme in
OnLine, wherein the F flag is never again set once a log file has been
used. (There are sound reasons for that which I do not dispute; it's
the side effect that causes the gluteal pain.) The script I was trying
to piece together involved
min(syslogs.begin) where begin > 0
However, this discovery throws a monkey wrench into the query.
If anyone knows a way around this, or if this behavior changes in later
releases of OnLine, please post a reply.
--
-- Jake (Lost in thought and won't ask for directions)
. .
_..-'( )`-.._
./'. '||\\\\. }\\_/{ .//||` .`\\.
./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\.
./'..|'.|| |||||\\`````` \\,@,/ ''''''/||||| ||.`|..`\\.
./'.||'.|||| ||||||||||||. ||| .|||||||||||| ||||.`||.`\\.
/'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\
'.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.`
'.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.`
|/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\|
V V V }' `\\ /' `{ V V V
\\ \\ \\ V / / /
+-----------------------------------------------------------+
| Impeccable Logic: A thought process which successfully |
| resists chicken bites |
+-----------------------------------------------------------+