postgresql/src/include/access
Alvaro Herrera b8fd4e02c6
Adjust max_slot_wal_keep_size behavior per review
In pg_replication_slot, change output from normal/reserved/lost to
reserved/extended/unreserved/ lost, which better expresses the possible
states particularly near the time where segments are no longer safe but
checkpoint has not run yet.

Under the new definition, reserved means the slot is consuming WAL
that's still under the normal WAL size constraints; extended means it's
consuming WAL that's being protected by wal_keep_segments or the slot
itself, whose size is below max_slot_wal_keep_size; unreserved means the
WAL is no longer safe, but checkpoint has not yet removed those files.
Such as slot is in imminent danger, but can still continue for a little
while and may catch up to the reserved WAL space.

Also, there were some bugs in the calculations used to report the
status; fixed those.

Backpatch to 13.

Reported-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20200616.120236.1809496990963386593.horikyota.ntt@gmail.com
2020-06-24 14:23:39 -04:00
..
amapi.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
amvalidate.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
attmap.h Fix assorted typos 2020-03-31 16:00:06 +02:00
attnum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_internal.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
brin_page.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_pageops.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_revmap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_tuple.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
bufmask.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
clog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
commit_ts.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
detoast.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
genam.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
generic_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gin.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
gin_private.h Avoid full scan of GIN indexes when possible 2020-01-18 01:11:39 +03:00
ginblock.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ginxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gist.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
gist_private.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
gistscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gistxlog.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
hash.h Get rid of trailing semicolons in C macro definitions. 2020-05-01 17:28:00 -04:00
hash_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
heapam.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
heapam_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
heaptoast.h tableam: New callback relation_fetch_toast_slice. 2020-01-07 14:36:38 -05:00
hio.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
htup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
htup_details.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
itup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
multixact.h Rename SLRU structures and associated LWLocks. 2020-05-15 14:28:25 -04:00
nbtree.h Fix deduplication "single value" strategy bug. 2020-06-19 08:57:24 -07:00
nbtxlog.h Adjust "root of to-be-deleted subtree" function. 2020-05-11 11:01:07 -07:00
parallel.h Allow vacuum command to process indexes in parallel. 2020-01-20 07:57:49 +05:30
printsimple.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
printtup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relation.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
reloptions.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
relscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rewriteheap.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Add deduplication to nbtree. 2020-02-26 13:05:30 -08:00
sdir.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
session.h Fix typo. 2020-01-13 14:44:55 +05:30
skey.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
slru.h Improve management of SLRU statistics collection. 2020-05-13 13:08:23 -04:00
spgist.h Implement operator class parameters 2020-03-30 19:17:23 +03:00
spgist_private.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spgxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
stratnum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
subtrans.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sysattr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
table.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tableam.h pgindent run prior to branching v13. 2020-06-07 16:57:08 -04:00
timeline.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
toast_helper.h Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
toast_internals.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
transam.h Rename SLRU structures and associated LWLocks. 2020-05-15 14:28:25 -04:00
tsmapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupconvert.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupdesc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupdesc_details.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupmacs.h Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
twophase.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
twophase_rmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
valid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
visibilitymap.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
xact.h Remove dead forceSync parameter of XactLogCommitRecord(). 2020-06-20 01:25:40 -07:00
xlog.h Adjust max_slot_wal_keep_size behavior per review 2020-06-24 14:23:39 -04:00
xlog_internal.h Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
xlogarchive.h Move routine definitions of xlogarchive.c to a new header file 2020-03-31 15:33:04 +09:00
xlogdefs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xloginsert.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xlogreader.h Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:24 +09:00
xlogrecord.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xlogutils.h Adjust walsender usage of xlogreader, simplify APIs 2020-05-13 12:17:08 -04:00