Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Yuli Khodorkovskiy <yuli(dot)khodorkovskiy(at)crunchydata(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Date: 2019-05-16 03:56:17
Message-ID: 20190516035617.GC1415@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, May 15, 2019 at 11:32:38PM -0400, Tom Lane wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
> > Also, I am noticing another consequence as the handling of backend
> > variable files also suffers consequences:
> > could not open backend variables file
> > "pgsql_tmp/pgsql_tmp.backend_var.21912.1": No such file or directory
>
> Um ... where/how are you seeing that?

On HEAD with EXEC_BACKEND, just like that:
$ cd src/bin/pg_ctl && PROVE_TESTS=t/004_logrotate.pl make check
$ cat tmp_check/log/004_logrotate_primary.log
2019-05-16 12:44:03.427 JST [26433] LOG: redirecting log output to
logging collector process
2019-05-16 12:44:03.427 JST [26433] HINT: Future log output will
appear in directory "log".
could not open backend variables file
"pgsql_tmp/pgsql_tmp.backend_var.26433.1": No such file or directory

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.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-05-16 04:36:18 Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Previous Message Tom Lane 2019-05-16 03:32:38 Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND