Re: Patch: Log parameter types in detailed query logging

Stepan Neretin <slpmcf@gmail.com>

From: Степан <slpmcf@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-02-13T18:47:37Z
Lists: pgsql-hackers

Attachments

On Fri, Feb 14, 2025 at 1:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> =?UTF-8?B?0KHRgtC10L/QsNC9?= <slpmcf@gmail.com> writes:
> > This patch adds the ability to log the types of parameters used in
> queries
> > when detailed query logging is enabled.
>
> If there's a patch in what you sent, I'm not seeing it.  Looks like a
> webpage dump or something.
>
> However, I suppose that it must add some catalog lookup operations to
> the logging operations, and I'm feeling resistant to that, because of
> the added cycles and risk-of-failure.  I think you need to make a much
> stronger case for the value of this information than you've done here.
>
>                         regards, tom lane
>


My apologies, it seems I am still experiencing some difficulty in
accurately transmitting the code change details. I am re-submitting the
diff.patch prepared by Stepan Neretin now, and will ensure the formatting
is correct.

Regarding your concerns, I understand your hesitation about adding catalog
lookups due to potential performance impacts and failure risks. However, I
believe that the benefits of including parameter types in detailed query
logging will significantly outweigh the costs. Often, when analyzing
problematic queries, we lack crucial information about the parameter types
used. This lack of information forces us to request details from the
client, which adds unnecessary delays and complexity to the debugging
process. This patch addresses that directly.

Best regards,
Stepan Neretin