pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: ANALYZE a_star and its children to avoid plan instability in tes
2+ messages / 1 participants
[nested] [flat]

* pgsql: ANALYZE a_star and its children to avoid plan instability in tes
@ 2019-09-27 15:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2019-09-27 15:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ANALYZE a_star and its children to avoid plan instability in tests.

We've noted certain EXPLAIN queries on these tables occasionally showing
unexpected plan choices.  This seems to happen because VACUUM sometimes
fails to update relpages/reltuples for one of these single-page tables,
due to bgwriter or checkpointer holding a pin on the lone page at just
the wrong time.  To ensure those values get set, insert explicit ANALYZE
operations on these tables after we finish populating them.  This
doesn't seem to affect any other test cases, so it's a usable fix.

Back-patch to v12.  In principle the issue exists further back, but
we have not seen it before v12, so I won't risk back-patching further.

Discussion: https://postgr.es/m/24480.1569518042@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b9bffa004a9980ac235b6ff541ee2fe0e9800372

Modified Files
--------------
src/test/regress/expected/create_misc.out | 7 +++++++
src/test/regress/sql/create_misc.sql      | 8 ++++++++
2 files changed, 15 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: ANALYZE a_star and its children to avoid plan instability in tes
@ 2019-09-27 15:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2019-09-27 15:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ANALYZE a_star and its children to avoid plan instability in tests.

We've noted certain EXPLAIN queries on these tables occasionally showing
unexpected plan choices.  This seems to happen because VACUUM sometimes
fails to update relpages/reltuples for one of these single-page tables,
due to bgwriter or checkpointer holding a pin on the lone page at just
the wrong time.  To ensure those values get set, insert explicit ANALYZE
operations on these tables after we finish populating them.  This
doesn't seem to affect any other test cases, so it's a usable fix.

Back-patch to v12.  In principle the issue exists further back, but
we have not seen it before v12, so I won't risk back-patching further.

Discussion: https://postgr.es/m/24480.1569518042@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e40f3c7472036f5a06897a11ac79fd26ec2ccf7d

Modified Files
--------------
src/test/regress/expected/create_misc.out | 7 +++++++
src/test/regress/sql/create_misc.sql      | 8 ++++++++
2 files changed, 15 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-09-27 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 15:28 pgsql: ANALYZE a_star and its children to avoid plan instability in tes Tom Lane <tgl@sss.pgh.pa.us>
2019-09-27 15:28 pgsql: ANALYZE a_star and its children to avoid plan instability in tes Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox