Fix log_line_prefix to display the transaction id (%x) for statements not in a transaction block - Mailing list pgsql-hackers

From Quan Zongliang
Subject Fix log_line_prefix to display the transaction id (%x) for statements not in a transaction block
Date
Msg-id 12fa0c9a-2189-ed7a-016a-3f1b99bd756c@yeah.net
Whole thread Raw
Responses Re: Fix log_line_prefix to display the transaction id (%x) for statements not in a transaction block
List pgsql-hackers

Implement TODO item:

Fix log_line_prefix to display the transaction id (%x) for statements 
not in a transaction block
     Currently it displays zero.


Check that the XID has been assigned at the location where the statement 
log is now printed. If not, no statement log is output.
And then before finish_xact_command. If the statement has not been 
output to the log. Here the log can get XID.

DML that does not manipulate any data still does not get XID.

[32718][788] LOG:  statement: insert into t1 values(1,0,'');
[32718][789] LOG:  statement: delete from t1;
[32718][0] LOG:  statement: delete from t1;


--
Quan Zongliang
Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Invalidate the subscription worker in cases where a user loses their superuser status
Next
From: Laurenz Albe
Date:
Subject: Re: Fix output of zero privileges in psql