Re: track generic and custom plans in pg_stat_statements - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: track generic and custom plans in pg_stat_statements
Date
Msg-id CAA5RZ0vqVPD0-h+MukmNBkfP11oV_2=T+pKidyeUQbBWRTMbmA@mail.gmail.com
Whole thread Raw
In response to Re: track generic and custom plans in pg_stat_statements  (Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>)
List pgsql-hackers
> I don't quite understand why do we need to differentiate between
> PLAN_CACHE_STATUS_GENERIC_PLAN_BUILD and
> PLAN_CACHE_STATUS_GENERIC_PLAN_REUSE?
> We could simply keep PLAN_CACHE_STATUS_GENERIC_PLAN_REUSE.
> I don't think users would see much of a difference in either pg_stat_statements or EXPLAIN.

If we removed GENERIC_PLAN_BUILD, I suppose we can simply rely on
CPlan != NULL && cplan->status != PLAN_CACHE_STATUS_CUSTOM_PLAN
to determine that we have a generic plan. However, I rather keep the status(s)
defined this way for clarity.

> As for EXPLAIN, maybe we should include this in VERBOSE mode?

This could be a fast follow-up patch as there appears to be support
for this idea.

--
Sami



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Changing the state of data checksums in a running cluster
Next
From: Álvaro Herrera
Date:
Subject: Re: bogus error message for ALTER TABLE ALTER CONSTRAINT