Re: RFC: Logging plan of the running query
torikoshia <torikoshia@oss.nttdata.com>
From: torikoshia <torikoshia@oss.nttdata.com>
To: James Coleman <jtc331@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org,
Greg Stark <stark@mit.edu>, Ronan Dunklau <ronan.dunklau@aiven.io>,
david.christensen@crunchydata.com, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2023-08-17T14:02:22Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
ecpg: Catch zero-length Unicode identifiers correctly
- a18b6d2dc288 15.0 cited
-
Improve warning message in pg_signal_backend()
- 7fa945b857cc 15.0 cited
-
Add assert to ensure that page locks don't participate in deadlock cycle.
- 72e78d831ab5 13.0 cited
Attachments
- v29-0001-Add-function-to-log-the-plan-of-the-query.patch (text/x-diff) patch v29-0001
On 2023-06-16 01:34, James Coleman wrote: > Attached is v28 > which sets ProcessLogQueryPlanInterruptActive to false in errfinish > when necessary. Once built with those two patches I'm simply running > `make check`. With v28-0001 and v28-0002 patch, I confirmed backend processes consume huge amount of memory and under some environments they were terminated by OOM killer. This was because memory was allocated from existing memory contexts and they were not freed after ProcessLogQueryPlanInterrupt(). Updated the patch to use dedicated memory context for ProcessLogQueryPlanInterrupt(). Applying attached patch and v28-0002 patch, `make check` successfully completed after 20min and 50GB of logs on my environment. >>> On 2023-06-15 01:48, James Coleman wrote: >>> > The tests have been running since last night, but have been apparently >>> > hung now for many hours. I don't know if this has anything to do with the hung you faced, but I thought it might be possible that the large amount of memory usage resulted in swapping, which caused a significant delay in processing. If possible, I would be very grateful if you could try to reproduce this with the v29 patch. -- Regards, -- Atsushi Torikoshi NTT DATA CORPORATION