diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-05-02 02:10:33 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-05-02 02:10:33 +0000 |
| commit | f9ed327f760e7794faecfda54b19515a95ba901d (patch) | |
| tree | 6e986d2df98e547cc1d2aa44bf71376afada02ba /src/backend/utils | |
| parent | 154163238e933988a9876aac88848258c2da7380 (diff) | |
Clean up some awkward, inaccurate, and inefficient processing around
MaxStandbyDelay. Use the GUC units mechanism for the value, and choose more
appropriate timestamp functions for performing tests with it. Make the
ps_activity manipulation in ResolveRecoveryConflictWithVirtualXIDs have
behavior similar to ps_activity code elsewhere, notably not updating the
display when update_process_title is off and not truncating the display
contents at an arbitrarily-chosen length. Improve the docs to be explicit
about what MaxStandbyDelay actually measures, viz the difference between
primary and standby servers' clocks, and the possible hazards if their clocks
aren't in sync.
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/misc/guc.c | 7 | ||||
| -rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index d913137b49d..430c37526d9 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.553 2010/04/29 21:36:19 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.554 2010/05/02 02:10:33 tgl Exp $ * *-------------------------------------------------------------------- */ @@ -1386,10 +1386,11 @@ static struct config_int ConfigureNamesInt[] = { {"max_standby_delay", PGC_SIGHUP, WAL_SETTINGS, gettext_noop("Sets the maximum delay to avoid conflict processing on hot standby servers."), - NULL + NULL, + GUC_UNIT_MS }, &MaxStandbyDelay, - 30, -1, INT_MAX, NULL, NULL + 30 * 1000, -1, INT_MAX / 1000, NULL, NULL }, { diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 2ed84127f78..94a4e69c6cb 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -186,7 +186,7 @@ # - Hot Standby - #hot_standby = off # allows queries during recovery -#max_standby_delay = 30s # max acceptable lag (s) to allow queries to +#max_standby_delay = 30s # max acceptable lag to allow queries to # complete without conflict; -1 means forever #vacuum_defer_cleanup_age = 0 # num transactions by which cleanup is deferred |
