Re: Patch: Log parameter types in detailed query logging

From: Степан <slpmcf(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Patch: Log parameter types in detailed query logging
Date: 2025-02-13 18:47:37
Message-ID: CA+Yyo5Sqt0vk3zKs9mZ1XwB3wO-Dfn9KhvqgOAseEce2RT+Ayg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

> =?UTF-8?B?0KHRgtC10L/QsNC9?= <slpmcf(at)gmail(dot)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

Attachment Content-Type Size
0001-add-type-info-logging.patch text/x-patch 1011 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-02-13 19:00:09 Re: pg17.3 PQescapeIdentifier() ignores len
Previous Message Burd, Greg 2025-02-13 18:46:18 Re: Expanding HOT updates for expression and partial indexes