Re: Fix log_line_prefix to display the transaction id (%x) for statements not in a transaction block

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Cc: Quan Zongliang <quanzongliang(at)yeah(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix log_line_prefix to display the transaction id (%x) for statements not in a transaction block
Date: 2024-03-04 07:48:01
Message-ID: CACJufxF=erGYgNJWefvkfyQVxWzGvEhCqCAgGzCAT3GanDYn5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 4, 2024 at 2:12 PM Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
> > On 12 Jan 2024, at 05:51, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> >
> > another big difference compare to HEAD:
>
> Hi Jian,
>
> thanks for looking into this. Would you be willing to review the next version of the patch?

I just applied postgres-v2.patch.
Previously, I just mentioned, there is a big difference between to HEAD.
I didn't mention it explicitly at [1]

postgres-v2.patch still has the problem.
it's not related to XID, it's the misbehavior of the patch.
When we load the 'auto_explain' module, we can log two things, the
query plan and statement.
After applying the patch, the outputs of the query plan and the
statement will be mixed together, which
obviously is far from the desired behavior.
Maybe we can tolerate LOG, first output the query plan then statement.

> As long as you are looking into this, you might be interested in registering yourself in a CF entry as a reviewer. [0]
sure.

[1] https://www.postgresql.org/message-id/CACJufxHg1oir8sd=xScMP3n+tYcbug=zusG5KiA2KzH5PmOeuQ@mail.gmail.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-03-04 08:09:15 Re: Some shared memory chunks are allocated even if related processes won't start
Previous Message Bertrand Drouvot 2024-03-04 07:22:40 Re: Injection points: some tools to wait and wake