postgresql/src
Alvaro Herrera 96540f80f8
Fix race condition in invalidating obsolete replication slots
The code added to mark replication slots invalid in commit c655077639
had the race condition that a slot can be dropped or advanced
concurrently with checkpointer trying to invalidate it.  Rewrite the
code to close those races.

The changes to ReplicationSlotAcquire's API added with c655077639 are
not necessary anymore.  To avoid an ABI break in released branches, this
commit leaves that unchanged; it'll be changed in a master-only commit
separately.

Backpatch to 13, where this code first appeared.

Reported-by: Andres Freund <andres@anarazel.de>
Author: Andres Freund <andres@anarazel.de>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20210408001037.wfmk6jud36auhfqm@alap3.anarazel.de
2021-06-11 12:16:14 -04:00
..
backend Fix race condition in invalidating obsolete replication slots 2021-06-11 12:16:14 -04:00
bin Improve psql tab completion for options of subcriptions and publications 2021-06-11 15:46:18 +09:00
common Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
fe_utils Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
include Change position of field "transformed" in struct CreateStatsStmt. 2021-06-10 21:56:14 -07:00
interfaces Rename PQtraceSetFlags() to PQsetTraceFlags(). 2021-06-10 21:56:13 -07:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
port Fix error handling in replacement pthread_barrier_init(). 2021-06-01 11:31:06 +12:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Rename PQtraceSetFlags() to PQsetTraceFlags(). 2021-06-10 21:56:13 -07:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools fix syntax error 2021-05-28 09:35:11 -04:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to CLDR 39 2021-04-08 08:28:03 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00