Re: pg_stat_statements vs. SELECT FOR UPDATE

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: pgsql-hackers@lists.postgresql.org
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Date: 2019-03-12T13:19:27Z
Lists: pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           not tested
Documentation:            not tested

Hello

Patch is applied cleanly, compiles and pass check-world. Has tests and does not need documentation changes since old behavior was not documented
Well, I can not say something about code.

> SELECT * FROM pgss_a JOIN pgss_b ON pgss_b.a_id = pgss_a.id FOR UPDATE OF pgss_a, pgss_b; -- should not appear

This query is counted as second "SELECT * FROM pgss_a JOIN pgss_b ON pgss_b.a_id = pgss_a.id FOR UPDATE". I prefer a bit more verbose comment here. Firstly I was surprised by both questions "why should not appear?" and "where was the second query call?"

regards, Sergei

Commits

  1. Teach pg_stat_statements not to ignore FOR UPDATE clauses