Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943
От | Alvaro Herrera |
---|---|
Тема | Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943 |
Дата | |
Msg-id | 202404081757.cm2qzva2ywkv@alvherre.pgsql обсуждение исходный текст |
Ответ на | BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943 (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943
|
Список | pgsql-bugs |
On 2024-Mar-05, PG Bug reporting form wrote: > #2 0x0000000000b8748d in ExceptionalCondition (conditionName=0xd25358 > "partdesc->nparts >= pinfo->nparts", fileName=0xd24cfc "execPartition.c", > lineNumber=1943) at assert.c:66 > #3 0x0000000000748bf1 in CreatePartitionPruneState (planstate=0x1898ad0, > pruneinfo=0x1884188) at execPartition.c:1943 > #4 0x00000000007488cb in ExecInitPartitionPruning (planstate=0x1898ad0, > n_total_subplans=2, pruneinfo=0x1884188, > initially_valid_subplans=0x7ffdca29f7d0) at execPartition.c:1803 I had been digging into this crash in late March and seeing if I could find a reliable fix, but it seems devilish and had to put it aside. The problem is that DETACH CONCURRENTLY does a wait for snapshots to disappear before doing the next detach phase; but since pgbench is using prepared mode, the wait is already long done by the time EXECUTE wants to run the plan. Now, we have relcache invalidations at the point where the wait ends, and those relcache invalidations should in turn cause the prepared plan to be invalidated, so we would get a new plan that excludes the partition being detached. But this doesn't happen for some reason that I haven't yet been able to understand. Still trying to find a proper fix. In the meantime, not using prepared plans should serve to work around the problem. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "The ability of users to misuse tools is, of course, legendary" (David Steele) https://postgr.es/m/11b38a96-6ded-4668-b772-40f992132797@pgmasters.net
В списке pgsql-bugs по дате отправления: