pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Guard against table-AM-less relations in planner. 5+ messages / 1 participants [nested] [flat]
* pgsql: Guard against table-AM-less relations in planner. @ 2022-10-17 15:35 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-10-17 15:35 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Guard against table-AM-less relations in planner. The executor will dump core if it's asked to execute a seqscan on a relation having no table AM, such as a view. While that shouldn't really happen, it's possible to get there via catalog corruption, such as a missing ON SELECT rule. It seems worth installing a defense against that. There are multiple plausible places for such a defense, but I picked the planner's get_relation_info(). Per discussion of bug #17646 from Kui Liu. Back-patch to v12 where the tableam APIs were introduced; in older versions you won't get a SIGSEGV, so it seems less pressing. Discussion: https://postgr.es/m/17646-70c93cfa40365776@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/eec34661182db7b79a6b56c551ac1d79ef3e1f89 Modified Files -------------- src/backend/optimizer/util/plancat.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Guard against table-AM-less relations in planner. @ 2022-10-17 15:35 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-10-17 15:35 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Guard against table-AM-less relations in planner. The executor will dump core if it's asked to execute a seqscan on a relation having no table AM, such as a view. While that shouldn't really happen, it's possible to get there via catalog corruption, such as a missing ON SELECT rule. It seems worth installing a defense against that. There are multiple plausible places for such a defense, but I picked the planner's get_relation_info(). Per discussion of bug #17646 from Kui Liu. Back-patch to v12 where the tableam APIs were introduced; in older versions you won't get a SIGSEGV, so it seems less pressing. Discussion: https://postgr.es/m/17646-70c93cfa40365776@postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2e3326929b0ba9f421f2ab1270c57b294c208a99 Modified Files -------------- src/backend/optimizer/util/plancat.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Guard against table-AM-less relations in planner. @ 2022-10-17 15:35 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-10-17 15:35 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Guard against table-AM-less relations in planner. The executor will dump core if it's asked to execute a seqscan on a relation having no table AM, such as a view. While that shouldn't really happen, it's possible to get there via catalog corruption, such as a missing ON SELECT rule. It seems worth installing a defense against that. There are multiple plausible places for such a defense, but I picked the planner's get_relation_info(). Per discussion of bug #17646 from Kui Liu. Back-patch to v12 where the tableam APIs were introduced; in older versions you won't get a SIGSEGV, so it seems less pressing. Discussion: https://postgr.es/m/17646-70c93cfa40365776@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8c611602bd356cbb47c3ebe8614f958391ec92a8 Modified Files -------------- src/backend/optimizer/util/plancat.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Guard against table-AM-less relations in planner. @ 2022-10-17 15:35 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-10-17 15:35 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Guard against table-AM-less relations in planner. The executor will dump core if it's asked to execute a seqscan on a relation having no table AM, such as a view. While that shouldn't really happen, it's possible to get there via catalog corruption, such as a missing ON SELECT rule. It seems worth installing a defense against that. There are multiple plausible places for such a defense, but I picked the planner's get_relation_info(). Per discussion of bug #17646 from Kui Liu. Back-patch to v12 where the tableam APIs were introduced; in older versions you won't get a SIGSEGV, so it seems less pressing. Discussion: https://postgr.es/m/17646-70c93cfa40365776@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/62b263bf779ed5d1ad0ae3fb0a5790f773423beb Modified Files -------------- src/backend/optimizer/util/plancat.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Guard against table-AM-less relations in planner. @ 2022-10-17 15:35 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2022-10-17 15:35 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Guard against table-AM-less relations in planner. The executor will dump core if it's asked to execute a seqscan on a relation having no table AM, such as a view. While that shouldn't really happen, it's possible to get there via catalog corruption, such as a missing ON SELECT rule. It seems worth installing a defense against that. There are multiple plausible places for such a defense, but I picked the planner's get_relation_info(). Per discussion of bug #17646 from Kui Liu. Back-patch to v12 where the tableam APIs were introduced; in older versions you won't get a SIGSEGV, so it seems less pressing. Discussion: https://postgr.es/m/17646-70c93cfa40365776@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/99b6b705d439fbf72aefe968941f38d571b9231c Modified Files -------------- src/backend/optimizer/util/plancat.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2022-10-17 15:35 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-10-17 15:35 pgsql: Guard against table-AM-less relations in planner. Tom Lane <tgl@sss.pgh.pa.us> 2022-10-17 15:35 pgsql: Guard against table-AM-less relations in planner. Tom Lane <tgl@sss.pgh.pa.us> 2022-10-17 15:35 pgsql: Guard against table-AM-less relations in planner. Tom Lane <tgl@sss.pgh.pa.us> 2022-10-17 15:35 pgsql: Guard against table-AM-less relations in planner. Tom Lane <tgl@sss.pgh.pa.us> 2022-10-17 15:35 pgsql: Guard against table-AM-less relations in planner. Tom Lane <tgl@sss.pgh.pa.us>
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