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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Quan Zongliang <quanzongliang(at)yeah(dot)net>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, 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-05-16 12:37:43
Message-ID: CA+TgmoZMLA6G3ZknhDuC02evgU6Dc5GGb+-7YaonR-Qc=TcUXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 16, 2024 at 6:01 AM Quan Zongliang <quanzongliang(at)yeah(dot)net> wrote:
> I thought about writing statement log when xid assigned. But it's seemed
> too complicated.
> I'm inclined to keep it for a while. Until we find a good way or give
> up. It's a reasonable request, after all.

I don't think it's reasonable at all. We can't log the XID before it's
assigned, and we can't log the statement after the XID is assigned
without completely changing how the parameter works.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-05-16 12:40:32 Re: CREATE DATABASE with filesystem cloning
Previous Message Nazir Bilal Yavuz 2024-05-16 12:35:38 Re: CREATE DATABASE with filesystem cloning