From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Early Setup of instrumentation information in pg_stat_statements |
Date: | 2015-02-05 15:28:55 |
Message-ID: | CAA4eK1+THkKcGyHH=BmHD19BLnP3fX8EdEyxEbXOkL+YDC_axw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Currently in pg_stat_statements, the setup to track
instrumentation/totaltime information is done after
ExecutorStart(). Can we do this before ExecutorStart()?
In particular, I am referring to below code:
static void
pgss_ExecutorStart(QueryDesc *queryDesc, int eflags)
{
..
standard_ExecutorStart(queryDesc, eflags);
..
if (pgss_enabled() && queryDesc->plannedstmt->queryId != 0)
{
..
if (queryDesc->totaltime == NULL)
{
..
queryDesc->totaltime = InstrAlloc(1, INSTRUMENT_ALL);
..
}
}
}
The reason why I am asking is that to track instrumentation
information (like buffer usage parameters) in case of parallel
sequence scan, we need to pass this information at start of
backend workers which are started in ExecutorStart() phase
and at that time, there is no information available which can
guarantee (we have queryId stored in planned stmt, but I think
that is not sufficient to decide) that such an information is
needed by plugin. This works well for Explain statement as
that has the information for instrumentation available before
ExecutorStart() phase.
Please suggest me if there is a better way to make this
information available in ExecutorStart() phase?
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2015-02-05 15:48:14 | Re: GRANT USAGE on FOREIGN SERVER exposes passwords |
Previous Message | Tom Lane | 2015-02-05 15:13:51 | Re: GRANT USAGE on FOREIGN SERVER exposes passwords |