Re: RFC: Logging plan of the running query

From: Akshat Jaimini <destrex271(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Atsushi Torikoshi <torikoshia(at)oss(dot)nttdata(dot)com>
Subject: Re: RFC: Logging plan of the running query
Date: 2025-11-18 20:19:46
Message-ID: 176349718657.1015.12677520994128141938.pgcf@coridan.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I have a question:

In src/backend/executor/execMain.c:

```
+ SetCurrentQueryDesc(oldQueryDesc);
+
+ /*
+ * Ensure LogQueryPlanPending is initialized in case there was no time for
+ * logging the plan. Othewise plan will be logged at the next query
+ * execution on the same session.
+ */
+ LogQueryPlanPending = false;
```

It would be really helpful if you could elaborate on any cases where this specific situation might arise i.e. where 'there was no time for logging the plan'. Are we referencing to something like a sudden shutdown of the postmaster process or is this referring to something else entirely?

Regards,
Akshat Jaimini

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-11-18 20:20:51 Re: Trigger more frequent autovacuums of heavy insert tables
Previous Message Mircea Cadariu 2025-11-18 20:09:29 Re: pg_recvlogical: Prevent flushed data from being re-sent after restarting replication