diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-12-16 12:40:15 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-12-16 15:56:03 +1300 |
commit | a13db0e16404ae532fe037071c7fe2576a1f8890 (patch) | |
tree | dc19c338b46532e1f8a5b7688c2ac53a39738677 /src/backend/storage/buffer/buf_init.c | |
parent | bbc227e951ecc59a29205be4952a623e7d1dd534 (diff) | |
download | postgresql-a13db0e16404ae532fe037071c7fe2576a1f8890.tar.gz postgresql-a13db0e16404ae532fe037071c7fe2576a1f8890.zip |
Change ProcSendSignal() to take pgprocno.
Instead of referring to target backends by pid, use pgprocno. This
means that we don't have to scan the ProcArray and we can drop some
special case code for dealing with the startup process.
Discussion: https://postgr.es/m/CA%2BhUKGLYRyDaneEwz5Uya_OgFLMx5BgJfkQSD%3Dq9HmwsfRRb-w%40mail.gmail.com
Reviewed-by: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
Reviewed-by: Ashwin Agrawal <ashwinstar@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Diffstat (limited to 'src/backend/storage/buffer/buf_init.c')
-rw-r--r-- | src/backend/storage/buffer/buf_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c index a299be10430..b9a83c0e9b9 100644 --- a/src/backend/storage/buffer/buf_init.c +++ b/src/backend/storage/buffer/buf_init.c @@ -16,6 +16,7 @@ #include "storage/buf_internals.h" #include "storage/bufmgr.h" +#include "storage/proc.h" BufferDescPadded *BufferDescriptors; char *BufferBlocks; @@ -118,7 +119,7 @@ InitBufferPool(void) CLEAR_BUFFERTAG(buf->tag); pg_atomic_init_u32(&buf->state, 0); - buf->wait_backend_pid = 0; + buf->wait_backend_pgprocno = INVALID_PGPROCNO; buf->buf_id = i; |