Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3993bd8

Browse files
committed
PostmasterIsAlive test really ought to be in the inner loop for safety.
1 parent03f9636 commit3993bd8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/backend/postmaster/pgarch.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
*
2121
* IDENTIFICATION
22-
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.21 2006/05/3013:30:49 momjian Exp $
22+
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.22 2006/05/3017:08:14 tgl Exp $
2323
*
2424
*-------------------------------------------------------------------------
2525
*/
@@ -352,12 +352,16 @@ pgarch_ArchiverCopyLoop(void)
352352
* some backend will add files onto the list of those that need archiving
353353
* while we are still copying earlier archives
354354
*/
355-
while (PostmasterIsAlive(true)&&pgarch_readyXlog(xlog))
355+
while (pgarch_readyXlog(xlog))
356356
{
357357
intfailures=0;
358358

359359
for (;;)
360360
{
361+
/* Abandon processing if we notice our postmaster has died */
362+
if (!PostmasterIsAlive(true))
363+
return;
364+
361365
if (pgarch_archiveXlog(xlog))
362366
{
363367
/* successful */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp