Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YmkiL-0003Vi-Du for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2015 15:12:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YmkiK-0002Je-Mv for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2015 15:12:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YmkiJ-0002JY-VP for pgsql-bugs@postgresql.org; Mon, 27 Apr 2015 15:12:52 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YmkiC-0001u1-LY for pgsql-bugs@postgresql.org; Mon, 27 Apr 2015 15:12:51 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id B8D3D860001; Mon, 27 Apr 2015 17:12:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, FS_REPLICA autolearn=no version=3.2.5 Received: from anarazel.de (p54AF4925.dip0.t-ipconnect.de [84.175.73.37]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 3CAC5860002; Mon, 27 Apr 2015 17:12:30 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 87EDA1009B7; Mon, 27 Apr 2015 17:12:29 +0200 (CEST) Date: Mon, 27 Apr 2015 17:12:29 +0200 From: Andres Freund To: Alvaro Herrera Cc: pdrolet@infodata.ca, pgsql-bugs@postgresql.org Subject: Re: BUG #13143: Cannot stop and restart a streaming server with a replication slot Message-ID: <20150427151229.GG18789@awork2.anarazel.de> References: <20150424101006.2556.60897@wrigleys.postgresql.org> <20150425123357.GC12723@awork2.anarazel.de> <20150427144447.GT4369@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150427144447.GT4369@alvh.no-ip.org> X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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