| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid failure to open dropped detached partition |
| Date: | 2024-08-19 20:12:20 |
| Message-ID: | E1sg8jk-000SzH-3x@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Avoid failure to open dropped detached partition
When a partition is detached and immediately dropped, a prepared
statement could try to compute a new partition descriptor that includes
it. This leads to this kind of error:
ERROR: could not open relation with OID 457639
Avoid this by skipping the partition in expand_partitioned_rtentry if it
doesn't exist.
Noted by me while investigating bug #18559. Kuntal Gosh helped to
identify the exact failure.
Backpatch to 14, where DETACH CONCURRENTLY was introduced.
Author: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Reviewed-by: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Reviewed-by: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Discussion: https://postgr.es/m/202408122233.bo4adt3vh5bi@alvherre.pgsql
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/be73e7008558cef1f59b0f4a61cefb6ec53c45c5
Modified Files
--------------
src/backend/optimizer/util/inherit.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2024-08-19 22:27:46 | pgsql: doc: Improve vague pg_createsubscriber description |
| Previous Message | Tomas Vondra | 2024-08-19 17:54:33 | pgsql: Document that search_path is reported by the server |