Re: FailedAssertion("pd_idx == pinfo->nparts", File: "execPartition.c", Line: 1689)
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Langote <amitlangote09@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-08-05T20:20:48Z
Lists: pgsql-hackers
On Wed, Aug 5, 2020 at 4:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > After thinking about it for a little bit, I'm envisioning a test module > that can be loaded into a session, and then it gets into the planner_hook, > and what it does is after each planner execution, take and release an > advisory lock with some selectable ID. Then we can construct > isolationtester specs that do something like > > session 1 session 2 > > LOAD test-module; > SET custom_guc_for_lock_id = n; > prepare test tables; > > SELECT pg_advisory_lock(n); > > SELECT victim-query-here; > ... after planning, query blocks on lock > > perform DDL changes; > SELECT pg_advisory_unlock(n); > > ... query executes with now-stale plan Very sneaky! -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Support testing of cases where table schemas change after planning.
- 6f0b632f083b 14.0 landed
-
Fix matching of sub-partitions when a partitioned plan is stale.
- f992da210ff8 12.4 landed
- c43a36fa8fff 13.0 landed
- 7a980dfc6c15 14.0 landed
-
Speed up planning when partitions can be pruned at plan time.
- 428b260f87e8 12.0 cited
-
Allow ATTACH PARTITION with only ShareUpdateExclusiveLock.
- 898e5e3290a7 12.0 cited