postgresql/src/backend
Tom Lane 7fd89f4d7a Fix async.c to not register any SLRU stats counts in the postmaster.
Previously, AsyncShmemInit forcibly initialized the first page of the
async SLRU, to save dealing with that case in asyncQueueAddEntries.
But this is a poor tradeoff, since many installations do not ever use
NOTIFY; for them, expending those cycles in AsyncShmemInit is a
complete waste.  Besides, this only saves a couple of instructions
in asyncQueueAddEntries, which hardly seems likely to be measurable.

The real reason to change this now, though, is that now that we track
SLRU access stats, the existing code is causing the postmaster to
accumulate some access counts, which then get inherited into child
processes by fork(), messing up the statistics.  Delaying the
initialization into the first child that does a NOTIFY fixes that.

Hence, we can revert f3d23d83e, which was an incorrect attempt at
fixing that issue.  Also, add an Assert to pgstat.c that should
catch any future errors of the same sort.

Discussion: https://postgr.es/m/8367.1589391884@sss.pgh.pa.us
2020-05-13 22:48:26 -04:00
..
access Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
commands Fix async.c to not register any SLRU stats counts in the postmaster. 2020-05-13 22:48:26 -04:00
executor Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
lib Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
libpq Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
main Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nodes Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
optimizer Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
parser Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
partitioning Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -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 Fix async.c to not register any SLRU stats counts in the postmaster. 2020-05-13 22:48:26 -04:00
regex Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
replication Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -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 Modify additional power 2 calculations to use new helper functions 2020-04-08 18:29:51 +12:00
storage Remove smgrdounlink() in smgr.c from the code tree 2020-05-10 10:58:54 +09:00
tcop Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
tsearch Further cleanup of ts_headline code. 2020-04-09 15:38:43 -04:00
utils Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00