Re: [HACKERS] Transactions ... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Transactions ...
Date
Msg-id 16139.945202318@sss.pgh.pa.us
Whole thread Raw
In response to Transactions ...  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
The Hermit Hacker <scrappy@hub.org> writes:
> and the following being pumped out of hte backend (have debug mode's

> StartTransactionCommand^M
> query: BEGIN WORK^M
> ProcessUtility: BEGIN WORK^M
> CommitTransactionCommand^M
> StartTransactionCommand^M
> query: INSERT INTO dict (url_id,word,intag) VALUES(810,'date',3)^M
> ProcessQuery^M
> CommitTransactionCommand^M
> StartTransactionCommand^M

> If they issue a 'BEGIN WORK', shouldn't it eliminate all the
> '{Commit,Start}TransactionCommand's?

No.  Those routines are still called, they just behave differently.

You're not the first one to be confused by those debug messages, IIRC.
It would probably make sense to rip those TPRINTFs out of postgres.c,
which only knows that it's calling those 2 routines, and put TPRINTFs
into the routines themselves (in xact.c) that show what state transition
is actually being taken...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Create Group
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [6.5.3] FATAL 1: my bits moved right off the end of the world!