diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-31 02:23:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-31 02:23:23 +0000 |
commit | 25ec228ef760eb91c094cc3b6dea7257cc22ffb5 (patch) | |
tree | 59d9d82fa2a61c1c27174d9b2f462536a7db39ee /src/backend/utils/misc/guc.c | |
parent | e1cc64197bd3a8d6fd5e4ca6830d514130f2737f (diff) | |
download | postgresql-25ec228ef760eb91c094cc3b6dea7257cc22ffb5.tar.gz postgresql-25ec228ef760eb91c094cc3b6dea7257cc22ffb5.zip |
Track the current XID wrap limit (or more accurately, the oldest unfrozen
XID) in checkpoint records. This eliminates the need to recompute the value
from scratch during database startup, which is one of the two remaining
reasons for the flatfile code to exist. It should also simplify life for
hot-standby operation.
To avoid bloating the checkpoint records unreasonably, I switched from
tracking the oldest database by name to tracking it by OID. This turns
out to save cycles in general (everywhere but the warning-generating
paths, which we hardly care about) and also helps us deal with the case
that the oldest database got dropped instead of being vacuumed. The prior
coding might go for a long time without updating the wrap limit in that case,
which is bad because it might result in a lot of useless autovacuum activity.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 6bc0c197b0f..66904e6b091 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.512 2009/08/29 19:26:51 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.513 2009/08/31 02:23:22 tgl Exp $ * *-------------------------------------------------------------------- */ @@ -1864,6 +1864,7 @@ static struct config_int ConfigureNamesInt[] = NULL }, &autovacuum_freeze_max_age, + /* see pg_resetxlog if you change the upper-limit value */ 200000000, 100000000, 2000000000, NULL, NULL }, { |