Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3CRB-0003Hn-4l for pgsql-admin@arkaria.postgresql.org; Mon, 22 Dec 2014 23:30:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3CRA-0005U0-LV for pgsql-admin@arkaria.postgresql.org; Mon, 22 Dec 2014 23:30:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3CR8-0005Tr-Jk for pgsql-admin@postgresql.org; Mon, 22 Dec 2014 23:30:50 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y3CR4-0008GB-Q9 for pgsql-admin@postgresql.org; Mon, 22 Dec 2014 23:30:49 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Y3CR0-0004Zu-Ix; Mon, 22 Dec 2014 18:30:42 -0500 Date: Mon, 22 Dec 2014 18:30:42 -0500 From: Bruce Momjian To: Guillaume Lelarge Cc: Mitchell =?iso-8859-1?Q?B=F6secke?= , "pgsql-admin@postgresql.org" Subject: Re: Does "pg_ctl stop" wait for archiving to complete? Message-ID: <20141222233042.GA3520@momjian.us> References: <20141206132632.GB1314@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Sun, Dec 21, 2014 at 11:14:21PM +0100, Guillaume Lelarge wrote: > 2014-12-06 14:26 GMT+01:00 Bruce Momjian : > > On Fri, Nov  7, 2014 at 07:09:14AM +0100, Guillaume Lelarge wrote: > > Le 6 nov. 2014 21:59, "Mitchell Bösecke" a > écrit > > : > > > > > > Hi, > > > > > > My understanding is that when postgresql is shutdown it triggers a > checkpoint > > which triggers the archiving of completed tx logs. Will the "pg_ctl stop" > > command wait for archiving to complete or is the act of archiving > completely > > asynchronous from the shutdown process? > > > > > > > Nope, it doesn't wait for archiving. > > Uh, are you sure about that?  I thought we did wait during shutdown > unless -W was used in pg_ctl stop. > > > > Sorry for the very very late reply. I just checked, and you're definitely > right. In fast mode, we wait for the WAL to be archived, unless -W was used. > > Sorry about this, and thanks for fixing my mistake. No problem. Originally we didn't archive the last WAL file on shutdown but Simon fixed that a few years ago. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin