pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: 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: Wed, 11 Dec 2019 14:27:45 +0900
Message-ID: <20191211052745.GL72921@paquier.xyz> (raw)
In-Reply-To: <20191202161222.sazl2omhhk5pl3nl@alap3.anarazel.de>
References: <08bbfab1-a61d-3750-fc18-4ab2c1aa7f09@postgrespro.ru>
	<20191202161222.sazl2omhhk5pl3nl@alap3.anarazel.de>

On Mon, Dec 02, 2019 at 08:12:22AM -0800, Andres Freund wrote:
> I'm very doubtful about this. I think it's a good safety measure to
> ensure that there's no previous state file that we're somehow
> overwriting.

During the checkpoint of replication slots, SaveSlotToPath() would
just *LOG* any failure while leaving around the state.tmp of a slot,
and then any follow-up attempt to create state.tmp would just fail
because of that, preventing the slot state file from being flushed
continuously.  I think that's wrong.  Concurrency is not a concern
either here as the slot's LWLock to track an I/O in progress is taken
in exclusive lock. 
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (11+ messages)  latest in thread

Message-ID: <20191211052745.GL72921@paquier.xyz>
Permalink:  ../20191211052745.GL72921@paquier.xyz/
Also on:    postgresql.org/message-id/20191211052745.GL72921@paquier.xyz

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, andres@anarazel.de, g.smolkin@postgrespro.ru
  Subject: Re: logical replication: could not create file "state.tmp": File exists
  In-Reply-To: <20191211052745.GL72921@paquier.xyz>
  References: <08bbfab1-a61d-3750-fc18-4ab2c1aa7f09@postgrespro.ru> <20191202161222.sazl2omhhk5pl3nl@alap3.anarazel.de> <20191211052745.GL72921@paquier.xyz>

* 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