diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2024-06-11 11:38:45 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2024-06-11 11:38:45 +0200 |
commit | c2fab70248d8b9f129d2333c91b7a6e279a591e3 (patch) | |
tree | 5e8e8c48f4a1570aa4a09f70fe0dfa76a9f00c03 /src/backend/utils/adt/jsonpath_exec.c | |
parent | d1ffcc7fa3c54de8b2a677a3e503fc808c7b419c (diff) | |
download | postgresql-c2fab70248d8b9f129d2333c91b7a6e279a591e3.tar.gz postgresql-c2fab70248d8b9f129d2333c91b7a6e279a591e3.zip |
Fix creation of partition descriptor during concurrent detach
When a partition is being detached in concurrent mode, it is possible
for find_inheritance_children_extended() to return that partition in the
list, and immediately after that receive an invalidation message that
sets its relpartbound to NULL just before we read it. (This can happen
because table_open() reads invalidation messages.) Currently we raise
an error
ERROR: missing relpartbound for relation %u
about the situation, but that's bogus because the table is no longer a
partition, so we shouldn't be complaining about it. A better reaction
is to retry the find_inheritance_children_extended call to get a new
list, which will no longer have the partition being detached.
Noticed while investigating bug #18377.
Backpatch to 14, where DETACH CONCURRENTLY appeared.
Discussion: https://postgr.es/m/202405201616.y4ht2qe5ihoy@alvherre.pgsql
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
0 files changed, 0 insertions, 0 deletions