]> granicus.if.org Git - postgresql/commit
Fix crash when reporting CREATE INDEX progress
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 16 Oct 2019 12:51:23 +0000 (14:51 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 16 Oct 2019 12:51:23 +0000 (14:51 +0200)
commit1cd5bc3ccf92a511b087629b2c914dffa9151fce
tree2afcb196f62f38362ff6407d05041ed2e40f70f3
parenta8e49ae0c38172a288f26ae1590069ecc4a721cd
Fix crash when reporting CREATE INDEX progress

A race condition can make us try to dereference a NULL pointer to the
PGPROC struct of a process that's already finished.  That results in
crashes during REINDEX CONCURRENTLY and CREATE INDEX CONCURRENTLY.

This was introduced in ab0dfc961b6a, so backpatch to pg12.

Reported by: Justin Pryzby
Reviewed-by: Michaƫl Paquier
Discussion: https://postgr.es/m/20191012004446.GT10470@telsasoft.com
src/backend/commands/indexcmds.c
src/backend/storage/lmgr/lmgr.c