diff options
author | Amit Kapila <akapila@postgresql.org> | 2025-02-05 08:56:14 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2025-02-05 08:56:14 +0530 |
commit | 0ec3c295e7594ed3af86bca1a4b4be269c2f069d (patch) | |
tree | 09fbb3d5cfde6e4542bfed3dbdf250f882a69b47 /src/backend/executor/nodeModifyTable.c | |
parent | b2bdb972c0df3b7091e39d1a31484e5e065519f4 (diff) | |
download | postgresql-0ec3c295e7594ed3af86bca1a4b4be269c2f069d.tar.gz postgresql-0ec3c295e7594ed3af86bca1a4b4be269c2f069d.zip |
Avoid updating inactive_since for invalid replication slots.
It is possible for the inactive_since value of an invalid replication slot
to be updated multiple times, which is unexpected behavior like during the
release of the slot or at the time of restart. This is harmless because
invalid slots are not allowed to be accessed but it is not prudent to
update invalid slots. We are planning to invalidate slots due to other
reasons like idle time and it will look odd that the slot's inactive_since
displays the recent time in this field after invalidated due to idle time.
So, this patch ensures that the inactive_since field of slots is not
updated for invalid slots.
In the passing, ensure to use the same inactive_since time for all the
slots at restart while restoring them from the disk.
Author: Nisha Moond <nisha.moond412@gmail.com>
Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Hou Zhijie <houzj.fnst@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CABdArM7QdifQ_MHmMA=Cc4v8+MeckkwKncm2Nn6tX9wSCQ-+iw@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions