Re: [EXTERNAL] Re: [PATCH] Report the query string that caused a memory error under Valgrind

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Onur Tirtir <Onur(dot)Tirtir(at)microsoft(dot)com>
Cc: "peter(dot)eisentraut(at)enterprisedb(dot)com" <peter(dot)eisentraut(at)enterprisedb(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [EXTERNAL] Re: [PATCH] Report the query string that caused a memory error under Valgrind
Date: 2023-04-02 20:13:38
Message-ID: 1055698.1680466418@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Onur Tirtir <Onur(dot)Tirtir(at)microsoft(dot)com> writes:
> Thank you for reviewing the patch and for your feedback. I believe the v2 patch should be able to handle other protocol messages too.

I like the concept here, but the reporting that the v2 patch provides
would be seriously horrid: it's trying to print stuff that isn't
necessarily text, and for bind and execute messages it's substantially
dumber than the existing debug_query_string infrastructure. Another
thing that is not great is that if Postgres itself throws an error
later in the query, nothing will be reported since we don't reach the
bottom of the processing loop.

I suggest that we need something closer to the attached. Some
bikeshedding is possible on the specific printouts, but I'm not
sure it's worth working harder than this.

regards, tom lane

Attachment Content-Type Size
v3-0001-Report-the-query-string-that-caused-a-mem-error.patch text/x-diff 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-04-02 20:23:05 Re: O(n) tasks cause lengthy startups and checkpoints
Previous Message Melanie Plageman 2023-04-02 20:11:47 Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode