Avoid spurious wait in concurrent reindex
authorAlvaro Herrera <[email protected]>
Fri, 15 Jan 2021 13:31:42 +0000 (10:31 -0300)
committerAlvaro Herrera <[email protected]>
Fri, 15 Jan 2021 13:31:42 +0000 (10:31 -0300)
commitf9900df5f94936067e6fa24a9df609863eb08da2
tree0bec8d409694a0defa2f5499cc3983c646649a0b
parent2ad78a87f018260d4474eee63187e1cc73c9b976
Avoid spurious wait in concurrent reindex

This is like commit c98763bf51bf, but for REINDEX CONCURRENTLY.  To wit:
this flags indicates that the current process is safe to ignore for the
purposes of waiting for other snapshots, when doing CREATE INDEX
CONCURRENTLY and REINDEX CONCURRENTLY.  This helps two processes doing
either of those things not deadlock, and also avoids spurious waits.

Author: Álvaro Herrera <[email protected]>
Reviewed-by: Dmitry Dolgov <[email protected]>
Reviewed-by: Hamid Akhtar <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Discussion: https://postgr.es/m/20201130195439[email protected]
src/backend/commands/indexcmds.c
src/include/storage/proc.h