Skip site navigation (1) Skip section navigation (2)

Re: does wal archiving block the current client connection?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-admin(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: does wal archiving block the current client connection?
Date: 2006-05-19 15:59:19
Message-ID: 679.1148054359@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackers
Jeff Frost <jeff(at)frostconsultingllc(dot)com> writes:
> Well now, will you look at this:

> postgres 20228     1  0 May17 ?        00:00:00 postgres: archiver process
> postgres 20573     1  0 May17 ?        00:00:00 postgres: archiver process
> postgres 23817 23810  0 May17 pts/11   00:00:00 postgres: archiver process

> 23810 is the running postmaster:

> postgres 23810     1  0 May17 pts/11   00:03:01 /usr/local/pgsql-8.1.3/bin/postm

Well, there's our smoking gun.  IIRC, all the failures you showed us are
consistent with race conditions caused by multiple archiver processes
all trying to do the same tasks concurrently.

Do you frequently stop and restart the postmaster?  Because I don't see
how you could get into this state without having done so.

I've just been looking at the code, and the archiver does commit
hara-kiri when it notices its parent postmaster is dead; but it only
checks that in the outer loop.  Given sufficiently long delays in the
archive_command, that could be a long time after the postmaster died;
and in the meantime, successive executions of the archive_command could
be conflicting with those launched by a later archiver incarnation.

Seems we need an interlock to ensure there's not more than one archiver
active.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2006-05-19 15:59:43
Subject: Re: [HACKERS] Toward A Positive Marketing Approach.
Previous:From: Simon RiggsDate: 2006-05-19 15:59:17
Subject: Re: does wal archiving block the current client connection?

pgsql-admin by date

Next:From: Tom LaneDate: 2006-05-19 16:03:17
Subject: Re: [ADMIN] does wal archiving block the current client connection?
Previous:From: Simon RiggsDate: 2006-05-19 15:59:17
Subject: Re: does wal archiving block the current client connection?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group