git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d773b55)
Put back stats-collector restarting code, removed accidentally.
2015年5月18日 07:18:46 +0000 (10:18 +0300)
2015年5月18日 07:20:30 +0000 (10:20 +0300)
Removed that code snippet accidentally in the archive_mode='always' patch.

Also, use varname-tags for archive_command in the docs.

Fujii Masao


diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index d950100239af056ea85632bf4caa787d04d40f36..d2f7fec5234413b0bc1ca60b4ef5cdfc8d68ecf6 100644 (file)
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -1237,9 +1237,10 @@ primary_slot_name = 'node_a_slot'
to <literal>always</literal>, and the standby will call the archive
command for every WAL segment it receives, whether it's by restoring
from the archive or by streaming replication. The shared archive can
- be handled similarly, but the archive_command must test if the file
- being archived exists already, and if the existing file has identical
- contents. This requires more care in the archive_command, as it must
+ be handled similarly, but the <varname>archive_command</varname> must
+ test if the file being archived exists already, and if the existing file
+ has identical contents. This requires more care in the
+ <varname>archive_command</varname>, as it must
be careful to not overwrite an existing file with different contents,
but return success if the exactly same file is archived twice. And
all that must be done free of race conditions, if two servers attempt
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 36440cbdccdee71532f6370435c3ae4fffecf416..6e2ba08a93dad9f828a4714fb7055e59f1b72d58 100644 (file)
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1645,6 +1645,10 @@ ServerLoop(void)
start_autovac_launcher = false; /* signal processed */
}
+ /* If we have lost the stats collector, try to start a new one */
+ if (PgStatPID == 0 && pmState == PM_RUN)
+ PgStatPID = pgstat_start();
+
/*
* If we have lost the archiver, try to start a new one.
*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /