Re: FailedAssertion("pd_idx == pinfo->nparts", File: "execPartition.c", Line: 1689)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-08-05T18:21:59Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > On Wed, Aug 5, 2020 at 1:30 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> I'm strongly tempted to convert the trailing Assert to an actual >> test-and-elog, too, but didn't do so here. > I was thinking about that, too. +1 for taking that step. Will do. In the longer term, it's annoying that we have no test methodology for this other than "manually set a breakpoint here". If we're going to allow plan-relevant DDL changes to happen with less than full table lock, I think we need to improve that. I spent a little bit of time just now trying to build an isolationtester case for this, and failed completely. So I wonder if we can create some sort of test module that allows capture of a plan tree and then execution of that plan tree later (even after relcache inval would normally have forced replanning). Obviously that could not be a normal SQL-accessible feature, because some types of invals would make the plan completely wrong, but for testing purposes it'd be mighty helpful to check that a stale plan still works. regards, tom lane
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