pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pdrolet@infodata.ca
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13143: Cannot stop and restart a streaming server with a replication slot
Date: Mon, 27 Apr 2015 17:12:29 +0200
Message-ID: <20150427151229.GG18789@awork2.anarazel.de> (raw)
In-Reply-To: <20150427144447.GT4369@alvh.no-ip.org>
References: <20150424101006.2556.60897@wrigleys.postgresql.org>
	<20150425123357.GC12723@awork2.anarazel.de>
	<20150427144447.GT4369@alvh.no-ip.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2015-04-27 11:44:47 -0300, Alvaro Herrera wrote:
> I think this is failing in the fsync_fname() call in slot.c line 1045
> (REL9_4_STABLE).

Patrice has since replied with log_error_verbosity=verbose logs, but
that reply is probably still stuck in moderation:

> 2015-04-25 14:25:59 EDT LOG:  00000: le système de bases de données a été arrêté à 2015-04-25 14:25:39 EDT
> 2015-04-25 14:25:59 EDT EMPLACEMENT :  StartupXLOG, src\backend\access\transam\xlog.c:6011
> 2015-04-25 14:25:59 EDT PANIC:  XX000: n'a pas pu synchroniser sur disque (fsync) le fichier « pg_replslot/node_win2008sec/state » : Bad file descriptor
> 2015-04-25 14:25:59 EDT EMPLACEMENT :  RestoreSlotFromDisk, src\backend\replication\slot.c:1115
> 2015-04-25 14:25:59 EDT LOG:  00000: processus de lancement (PID 2696) a été arrêté par l'exception 0xC0000409
> 2015-04-25 14:25:59 EDT ASTUCE :  Voir le fichier d'en-tête C « ntstatus.h » pour une description de la valeur
> 	hexadécimale.
> 2015-04-25 14:25:59 EDT EMPLACEMENT :  LogChildExit, src\backend\postmaster\postmaster.c:3336
> 2015-04-25 14:25:59 EDT LOG:  00000: annulation du démarrage à cause d'un échec dans le processus de lancement
> 2015-04-25 14:25:59 EDT EMPLACEMENT :  reaper, src\backend\postmaster\postmaster.c:2604

So it looks to me like it's a straight pg_fsync() failing. Given that
the open apparently succeeded I'm unsure how that could be. The error
message appears to be a EBADFD.

Hm. I wonder if it's maybe that the file is opened with O_RDONLY? The
OSs I have access to don't care - for good reason imo, fsync isn't a
write - but it's not inconceivable that windows might.  I very dimly
remember that that was a problem before at some point. Yep:
http://archives.postgresql.org/message-id/10494.1266903446%40sss.pgh.pa.us

So that's easy enough fixed.

Greetings,

Andres Freund


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <20150427151229.GG18789@awork2.anarazel.de>
Permalink:  ../20150427151229.GG18789@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20150427151229.GG18789@awork2.anarazel.de

 · 

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: andres@anarazel.de, alvherre@2ndquadrant.com, pdrolet@infodata.ca
  Subject: Re: BUG #13143: Cannot stop and restart a streaming server with a replication slot
  In-Reply-To: <20150427151229.GG18789@awork2.anarazel.de>
  References: <20150424101006.2556.60897@wrigleys.postgresql.org> <20150425123357.GC12723@awork2.anarazel.de> <20150427144447.GT4369@alvh.no-ip.org> <20150427151229.GG18789@awork2.anarazel.de>

* 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