Re: RFC: Logging plan of the running query

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: torikoshia <torikoshia@oss.nttdata.com>
Cc: James Coleman <jtc331@gmail.com>, 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-10-06T15:58:50Z
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 →
  1. ecpg: Catch zero-length Unicode identifiers correctly

  2. Improve warning message in pg_signal_backend()

  3. Add assert to ensure that page locks don't participate in deadlock cycle.

Hi,

On 2023-10-06 21:58:46 +0900, torikoshia wrote:
> Yeah, I think it's a straightforward workaround.
> And I'm also concerned that the condition of being in the process
> of acquiring some kind of lock is too strict and will make it almost
> impossible to output a running plan.

How so? We shouldn't commonly acquire relevant locks while executing a query?
With a few exceptions, they should instead be acquired t the start of query
processing. We do acquire a lot of lwlocks, obviously, but we don't process
interrupts during the acquisition / holding of lwlocks.

And presumably the interrupt would just be processed the next time interrupt
processing is happening?

Greetings,

Andres Freund