Hi,
the part that hurts in terms or performances is:

        if (jstate.clocations_count > 0)
                pgss_store(pstate->p_sourcetext,
                           query->queryId,
                           query->stmt_location,
                           query->stmt_len,
                           0,
                           0,
                           0,
                           NULL,
                           &jstate);

that writes the query text to disk, when it has at less one parameter ...
Computing the QueryId should stay very small and can be very usefull when
used in conjonction with
https://www.postgresql-archive.org/Feature-improvement-can-we-add-queryId-for-pg-catalog-pg-stat-activity-view-td6077275.html#a6077602
for wait events sampling.

I would propose to fix this by
        if (jstate.clocations_count > 0 && pgss_enabled())
                pgss_store(pstate->p_sourcetext,
                ...

Regards
PAscal




--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html


Reply via email to