1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2010-05-02 02:10:33 +00:00
parent 154163238e
commit f9ed327f76
6 changed files with 78 additions and 94 deletions

View File

@ -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
},
{