postgres/src/backend/utils
David Rowley 530050d8d2 Add code comment explaining ins_since_vacuum and aborted inserts
Sami complained that there's a discrepancy between n_mod_since_analyze
and n_ins_since_vacuum, as the former only accounts for committed changes
and the latter tracks committed and aborted inserts.  Nobody seemed
overly concerned that this would cause any concerning issues.  The
repercussions, from what I can tell, are limited to causing an
autovacuum to trigger for inserts sooner than it otherwise might. For
typical ratios of commits to aborts, it's unlikely to ever be noticed.

Fixing things to make it so n_ins_since_vacuum only displays committed
inserts would require an additional field in PgStat_TableCounts, which
does not quite seem worthwhile at this stage.  This commit just adds a
comment with some details to mention that we know about it, which will
hopefully prevent repeat discussions.

Reported-by: Sami Imseih <samimseih@gmail.com>
Author: David Rowley <drowleyml@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CAApHDvpgV3a-R2EGmPOh0L-x3pHbZpM3y4dySWfy+UqUazwDQA@mail.gmail.com
2025-04-11 11:36:21 +12:00
..
activity Add code comment explaining ins_since_vacuum and aborted inserts 2025-04-11 11:36:21 +12:00
adt Improve various new-to-v18 appendStringInfo calls 2025-04-11 10:07:22 +12:00
cache Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
error Add local-address escape "%L" to log_line_prefix. 2025-04-07 11:06:05 -04:00
fmgr Introduce PG_MODULE_MAGIC_EXT macro. 2025-03-26 11:06:12 -04:00
hash Revert "Improve accounting for memory used by shared hash tables" 2025-04-04 04:43:50 +02:00
init Fix a few oversights in the longer cancel keys patch 2025-04-09 13:11:42 +03:00
mb Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
misc Introduce file_copy_method setting. 2025-04-08 21:35:38 +12:00
mmgr Rename global variable backing DSA area 2025-04-10 22:40:27 +02:00
resowner aio: Basic subsystem initialization 2025-03-17 18:51:33 -04:00
sort Relax ordering-related hardcoded btree requirements in planning 2025-04-06 14:43:51 +02:00
time Improve snapmgr.c comment 2025-03-11 23:28:38 +02:00
.gitignore
errcodes.txt Update copyright for 2025 2025-01-01 11:21:55 -05:00
Gen_dummy_probes.pl Update copyright for 2025 2025-01-01 11:21:55 -05:00
Gen_fmgrtab.pl Update copyright for 2025 2025-01-01 11:21:55 -05:00
generate-errcodes.pl Update copyright for 2025 2025-01-01 11:21:55 -05:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
postprocess_dtrace.sed Update copyright for 2025 2025-01-01 11:21:55 -05:00
probes.d Update copyright for 2025 2025-01-01 11:21:55 -05:00