From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)
Date: Fri, 06 Dec 2019 10:14:16 -0500
Message-ID: <6120.1575645256@sss.pgh.pa.us> (raw)
In-Reply-To: <e5179494-715e-f8a3-266b-0cf52adac8f4@gmail.com>
References: <16154-1ccf0b537b24d5e0@postgresql.org>
<e5179494-715e-f8a3-266b-0cf52adac8f4@gmail.com>
Alexander Lakhin <exclusion@gmail.com> writes:
> If this file is still opened by the previous server shell (it can happen
> when the previous server instance has unlinked it's pid file, but it's
> CMD shell is still running), the next CMD start fails with the
> aforementioned error message.
Interesting. I wonder whether this explains all of the remaining
buildfarm failures of this sort that we've been seeing even after
0ba06e0bf.
> To fix this issue I propose the attached patch
> (fix_logfile_sharing_violation ).
This seems like a pretty ugly hack ... please at least make it
#ifdef WIN32, so that the rest of us don't have to deal with it.
Also, if I read it correctly, it causes a pre-existing logfile
to get truncated, which has never happened before. Mode "a"
would be a better choice.
regards, tom lane
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, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16154: pg_ctl restart with a logfile fails sometimes (on Windows)
In-Reply-To: <6120.1575645256@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