pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid failure to open dropped detached partition 5+ messages / 1 participants [nested] [flat]
* pgsql: Avoid failure to open dropped detached partition @ 2024-08-19 20:12 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2024-08-19 20:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@alvh.no-ip.org> Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://postgr.es/m/202408122233.bo4adt3vh5bi@alvherre.pgsql Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/52f3de874bbeaf16b3ae2efb505c1117be8355cc Modified Files -------------- src/backend/optimizer/util/inherit.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid failure to open dropped detached partition @ 2024-08-19 20:12 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2024-08-19 20:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@alvh.no-ip.org> Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://postgr.es/m/202408122233.bo4adt3vh5bi@alvherre.pgsql Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/11f1218ce81ef3ce98389754456ca9365fa10dbe Modified Files -------------- src/backend/optimizer/util/inherit.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid failure to open dropped detached partition @ 2024-08-19 20:12 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2024-08-19 20:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@alvh.no-ip.org> Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://postgr.es/m/202408122233.bo4adt3vh5bi@alvherre.pgsql Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a6ff329e7b7231aba9789922daa25e2367709d50 Modified Files -------------- src/backend/optimizer/util/inherit.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid failure to open dropped detached partition @ 2024-08-19 20:12 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2024-08-19 20:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@alvh.no-ip.org> Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.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(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Avoid failure to open dropped detached partition @ 2024-08-19 20:12 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2024-08-19 20:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@alvh.no-ip.org> Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://postgr.es/m/202408122233.bo4adt3vh5bi@alvherre.pgsql Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3ad4c8615a7616c0d3f6bf6fe9bdd22d43c95813 Modified Files -------------- src/backend/optimizer/util/inherit.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2024-08-19 20:12 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-08-19 20:12 pgsql: Avoid failure to open dropped detached partition Alvaro Herrera <alvherre@alvh.no-ip.org> 2024-08-19 20:12 pgsql: Avoid failure to open dropped detached partition Alvaro Herrera <alvherre@alvh.no-ip.org> 2024-08-19 20:12 pgsql: Avoid failure to open dropped detached partition Alvaro Herrera <alvherre@alvh.no-ip.org> 2024-08-19 20:12 pgsql: Avoid failure to open dropped detached partition Alvaro Herrera <alvherre@alvh.no-ip.org> 2024-08-19 20:12 pgsql: Avoid failure to open dropped detached partition Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox