pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Yuli Khodorkovskiy <yuli.khodorkovskiy@crunchydata.com>
Cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Date: Thu, 16 May 2019 00:51:34 -0400
Message-ID: <31437.1557982294@sss.pgh.pa.us> (raw)
In-Reply-To: <20190516043618.GD1415@paquier.xyz>
References: <15804-3721117bf40fb654@postgresql.org>
	<27CD45B5-88F7-4A09-8B31-EFE41FC37FE1@crunchydata.com>
	<26332.1557863524@sss.pgh.pa.us>
	<20190515073125.GA1517@paquier.xyz>
	<4643.1557931189@sss.pgh.pa.us>
	<20190516013808.GA1415@paquier.xyz>
	<20190516021903.GB1415@paquier.xyz>
	<28927.1557977558@sss.pgh.pa.us>
	<20190516035617.GC1415@paquier.xyz>
	<20190516043618.GD1415@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Thu, May 16, 2019 at 12:56:17PM +0900, Michael Paquier wrote:
>> The test is able to pass, but we have a race condition between the
>> moment the backend file gets saved and the moment we allow it to be
>> read.   I have not spent much time checking the stack between
>> InitializeMaxBackends() and RemovePgTempFiles() in postmaster.c, but
>> 57431a9 triggers the failure.

> Oh, I think I got it.  The issue is that we call RemovePgTempFiles()
> after starting the syslogger.  This cannot be run with other processes
> running in parallel, and with EXEC_BACKEND there is the extra case
> where we have a pgsql_tmp/ at the root of the data folder, so the
> syslogger complains on that.  By making RemovePgTempFiles() happen
> before starting the syslogger, then the test complains again about the
> assertion without my previous patch applied of course.  With the patch
> applied, I get no complains.

Hm, should we separate the cleanup of the root pgsql_tmp/ from the rest of
what RemovePgTempFiles does?  I'm still feeling like we should be trying
to launch the syslogger as soon as possible.

			regards, tom lane





view thread (40+ messages)  latest in thread

Message-ID: <31437.1557982294@sss.pgh.pa.us>
Permalink:  ../31437.1557982294@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31437.1557982294@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, yuli.khodorkovskiy@crunchydata.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
  In-Reply-To: <31437.1557982294@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox