postgresql/src/backend
Tom Lane 8048404939 Fix bogus initialization of replication origin shared memory state.
The previous coding zeroed out offsetof(ReplicationStateCtl, states)
more bytes than it was entitled to, as a consequence of starting the
zeroing from the wrong pointer (or, if you prefer, using the wrong
calculation of how much to zero).

It's unsurprising that this has not caused any reported problems,
since it can be expected that the newly-allocated block is at the end
of what we've used in shared memory, and we always make the shmem
block substantially bigger than minimally necessary.  Nonetheless,
this is wrong and it could bite us someday; plus it's a dangerous
model for somebody to copy.

This dates back to the introduction of this code (commit 5aa235042),
so back-patch to all supported branches.
2020-05-15 19:05:39 -04:00
..
access Rename assorted LWLock tranches. 2020-05-15 18:11:07 -04:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
commands Rename SLRU structures and associated LWLocks. 2020-05-15 14:28:25 -04:00
executor Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
lib Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
libpq Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
main Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nodes Rename assorted LWLock tranches. 2020-05-15 18:11:07 -04:00
optimizer Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
parser Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
partitioning Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
po Translation updates 2020-05-11 13:14:32 +02:00
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Rename SLRU structures and associated LWLocks. 2020-05-15 14:28:25 -04:00
regex Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
replication Fix bogus initialization of replication origin shared memory state. 2020-05-15 19:05:39 -04:00
rewrite Fix INSERT OVERRIDING USER VALUE behavior 2020-03-31 08:50:39 +02:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
storage Rename assorted LWLock tranches. 2020-05-15 18:11:07 -04:00
tcop Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
tsearch Further cleanup of ts_headline code. 2020-04-09 15:38:43 -04:00
utils Rename assorted LWLock tranches. 2020-05-15 18:11:07 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00