
Just a quick question.  Am trying to debug some problems with UdmSearch,
and the following being pumped out of hte backend (have debug mode's
turned on) don't look right...

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
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'support',3)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'postgresql',1)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'user',1)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'s',1)^M
ProcessQuery^M
CommitTransactionCommand^M


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

The man page shows: begin [transaction|work], but doesn't tell the
difference between 'transaction' and 'work'...

Comments?

Thanks...

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 


Tue, 14 Dec 1999 13:27:24 -0400 (AST)
The Hermit Hacker <scrappy@hub.org>
Transactions ...
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

Tue, 14 Dec 1999 15:11:58 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Transactions ... 