]> 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:34 +0000 (14:51 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 16 Oct 2019 12:51:34 +0000 (14:51 +0200)
commit0d21f919eb86cd3baa267844d111c6a5af480696
treecd33ac1ba1b2afb06bd1be04540f9d1d3c028424
parenta524f50d0fc6fe6f2146ce708c2c9576d3734da4
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