pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Check syscache result in AlterStatistics 3+ messages / 1 participants [nested] [flat]
* pgsql: Check syscache result in AlterStatistics @ 2022-01-23 02:17 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Tomas Vondra @ 2022-01-23 02:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Check syscache result in AlterStatistics The syscache lookup may return NULL even for valid OID, for example due to a concurrent DROP STATISTICS, so a HeapTupleIsValid is necessary. Without it, it may fail with a segfault. Reported by Alexander Lakhin, patch by me. Backpatch to 13, where ALTER STATISTICS ... SET STATISTICS was introduced. Backpatch-through: 13 Discussion: https://postgr.es/m/17372-bf3b6e947e35ae77%40postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6d554e3fcd6fb8be2dbcbd3521e2947ed7a552cb Modified Files -------------- src/backend/commands/statscmds.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Check syscache result in AlterStatistics @ 2022-01-23 02:22 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Tomas Vondra @ 2022-01-23 02:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Check syscache result in AlterStatistics The syscache lookup may return NULL even for valid OID, for example due to a concurrent DROP STATISTICS, so a HeapTupleIsValid is necessary. Without it, it may fail with a segfault. Reported by Alexander Lakhin, patch by me. Backpatch to 13, where ALTER STATISTICS ... SET STATISTICS was introduced. Backpatch-through: 13 Discussion: https://postgr.es/m/17372-bf3b6e947e35ae77%40postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/267ccc38ba6a95889d98959f183de64ceff23087 Modified Files -------------- src/backend/commands/statscmds.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Check syscache result in AlterStatistics @ 2022-01-23 03:11 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Tomas Vondra @ 2022-01-23 03:11 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Check syscache result in AlterStatistics The syscache lookup may return NULL even for valid OID, for example due to a concurrent DROP STATISTICS, so a HeapTupleIsValid is necessary. Without it, it may fail with a segfault. Reported by Alexander Lakhin, patch by me. Backpatch to 13, where ALTER STATISTICS ... SET STATISTICS was introduced. Backpatch-through: 13 Discussion: https://postgr.es/m/17372-bf3b6e947e35ae77%40postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a192243c75be0f142f829b3e73548bc7cbd3b90d Modified Files -------------- src/backend/commands/statscmds.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-01-23 03:11 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-01-23 02:17 pgsql: Check syscache result in AlterStatistics Tomas Vondra <tomas.vondra@postgresql.org> 2022-01-23 02:22 pgsql: Check syscache result in AlterStatistics Tomas Vondra <tomas.vondra@postgresql.org> 2022-01-23 03:11 pgsql: Check syscache result in AlterStatistics Tomas Vondra <tomas.vondra@postgresql.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