Check syscache result in AlterStatistics
Tomas Vondra <tomas.vondra@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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/statscmds.c | modified | +2 −0 |
Discussion
- BUG #17372: Altering statistics during concurrent drop can lead to a server crash 3 messages · 2022-01-20 → 2022-01-21