From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Grigory Smolkin <g.smolkin@postgrespro.ru>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: logical replication: could not create file "state.tmp": File exists
Date: Mon, 25 May 2020 16:35:41 -0400
Message-ID: <20200525203541.GA13908@alvherre.pgsql> (raw)
In-Reply-To: <08bbfab1-a61d-3750-fc18-4ab2c1aa7f09@postgrespro.ru>
On 2019-Nov-30, Grigory Smolkin wrote:
> One of my colleagues encountered an out of space condition, which broke his
> logical replication setup.
> It`s manifested with the following errors:
>
> ERROR: could not receive data from WAL stream: ERROR: could not create
> file "pg_replslot/some_sub/state.tmp": File exists
We haven't addressed this problem, have we? At least, I see that this
routine still looks like this:
> diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
> index 21ae8531b3..ef415b44c8 100644
> --- a/src/backend/replication/slot.c
> +++ b/src/backend/replication/slot.c
> @@ -1253,7 +1253,7 @@ SaveSlotToPath(ReplicationSlot *slot, const char *dir, int elevel)
> sprintf(tmppath, "%s/state.tmp", dir);
> sprintf(path, "%s/state", dir);
>
> - fd = OpenTransientFile(tmppath, O_CREAT | O_EXCL | O_WRONLY | PG_BINARY);
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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: alvherre@2ndquadrant.com, g.smolkin@postgrespro.ru
Subject: Re: logical replication: could not create file "state.tmp": File exists
In-Reply-To: <20200525203541.GA13908@alvherre.pgsql>
* 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