diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-01-15 10:31:42 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-01-15 10:31:42 -0300 |
commit | f9900df5f94936067e6fa24a9df609863eb08da2 (patch) | |
tree | 0bec8d409694a0defa2f5499cc3983c646649a0b /src/include | |
parent | 2ad78a87f018260d4474eee63187e1cc73c9b976 (diff) | |
download | postgresql-f9900df5f94936067e6fa24a9df609863eb08da2.tar.gz postgresql-f9900df5f94936067e6fa24a9df609863eb08da2.zip |
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 <alvherre@alvh.no-ip.org>
Reviewed-by: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Hamid Akhtar <hamid.akhtar@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/20201130195439.GA24598@alvherre.pgsql
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/storage/proc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 0786fcf103a..683ab64f76b 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -54,6 +54,7 @@ struct XidCache #define PROC_IS_AUTOVACUUM 0x01 /* is it an autovac worker? */ #define PROC_IN_VACUUM 0x02 /* currently running lazy vacuum */ #define PROC_IN_SAFE_IC 0x04 /* currently running CREATE INDEX + * CONCURRENTLY or REINDEX * CONCURRENTLY on non-expressional, * non-partial index */ #define PROC_VACUUM_FOR_WRAPAROUND 0x08 /* set by autovac only */ |