Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d09B4-0003lg-LA for pgsql-admin@arkaria.postgresql.org; Mon, 17 Apr 2017 16:06:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d09B3-0002hV-Jx for pgsql-admin@arkaria.postgresql.org; Mon, 17 Apr 2017 16:06:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d09B2-0002gt-Tg for pgsql-admin@postgresql.org; Mon, 17 Apr 2017 16:06:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d09Av-0002rq-TL for pgsql-admin@postgresql.org; Mon, 17 Apr 2017 16:06:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v3HG6ix0028443; Mon, 17 Apr 2017 12:06:44 -0400 From: Tom Lane To: Christian Ullrich cc: pgsql-admin@postgresql.org Subject: Re: Why does the WAL writer sit on completed segments (on Windows)? In-reply-to: References: <17213.1492442911@sss.pgh.pa.us> Comments: In-reply-to Christian Ullrich message dated "Mon, 17 Apr 2017 17:44:53 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28441.1492445204.1@sss.pgh.pa.us> Date: Mon, 17 Apr 2017 12:06:44 -0400 Message-ID: <28442.1492445204@sss.pgh.pa.us> 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 Christian Ullrich writes: > So, just to be sure, you're saying that when the ".ready" file is > created, it is guaranteed that no process will write to a location > within that segment anymore even if it happens to have the file open? > (That's actually completely obvious, but bear with me, please.) Right. > And further, that each such process will close the open file as soon as > it, intending to write WAL, finds out that the next available location > is not within the file? Yes, I believe it will typically hold the file open until that happens. (If short of file descriptors, it might close it sooner, but that's probably not common.) regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin