aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2025-02-27 09:47:04 +0530
committerAmit Kapila <akapila@postgresql.org>2025-02-27 09:47:04 +0530
commit8709dccc793da0c0c6619cafa182c8e67a871154 (patch)
treef982be6fa381f4bf4609f467b43daa167619fd25 /src/backend/access/gist/gist.c
parent845511a72ad01838c9e1766e031d2862cd021801 (diff)
downloadpostgresql-8709dccc793da0c0c6619cafa182c8e67a871154.tar.gz
postgresql-8709dccc793da0c0c6619cafa182c8e67a871154.zip
Fix the race condition in ReplicationSlotAcquire().
After commit f41d8468dd, a process could acquire and use a replication slot that had just been invalidated, leading to failures while accessing WAL. To ensure that we don't accidentally start using invalid slots, we must perform the invalidation check after acquiring the slot or under the spinlock where we associate the slot with a particular process. We choose the earlier method to keep the code simple. Reported-by: Hou Zhijie <houzj.fnst@fujitsu.com> Author: Nisha Moond <nisha.moond412@gmail.com> Reviewed-by: Hou Zhijie <houzj.fnst@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://postgr.es/m/CABdArM7J-LbGoMPGUPiFiLOyB_TZ5+YaZb=HMES0mQqzVTn8Gg@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions