Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wt2WK-0001Ry-GW for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Jun 2014 22:21:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wt2WJ-0005Zk-Vu for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Jun 2014 22:21:56 +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 1Wt2WJ-0005Ze-CX for pgsql-bugs@postgresql.org; Fri, 06 Jun 2014 22:21:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Wt2WG-0006Ak-Ff for pgsql-bugs@postgresql.org; Fri, 06 Jun 2014 22:21:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s56MLjWZ014004; Fri, 6 Jun 2014 18:21:45 -0400 From: Tom Lane To: Andres Freund cc: Alvaro Herrera , Keith Fiske , Heikki Linnakangas , levertond@googlemail.com, "pgsql-bugs@postgresql.org" Subject: Re: BUG #10533: 9.4 beta1 assertion failure in autovacuum process In-reply-to: <20140606220537.GC23201@awork2.anarazel.de> References: <20140605180121.3061.28250@wrigleys.postgresql.org> <5390BA0F.2030103@vmware.com> <20140605213436.GA17217@awork2.anarazel.de> <20140606205557.GX5146@eldon.alvh.no-ip.org> <20140606205801.GB23201@awork2.anarazel.de> <13635.1402092233@sss.pgh.pa.us> <20140606220537.GC23201@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 07 Jun 2014 00:05:37 +0200" Date: Fri, 06 Jun 2014 18:21:45 -0400 Message-ID: <14003.1402093305@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) 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 Andres Freund writes: > On 2014-06-06 18:03:53 -0400, Tom Lane wrote: >> The point here seems to be that lazy_vacuum_page does the visibility map >> ops inside its own critical section. Why? Setting a visibility bit >> doesn't seem like it's critical. Why can't we just move the >> END_CRIT_SECTION() to before the PageIsAllVisible test? > Yea, that's what I am proposing upthread. If we move the visibility > tests out of the critical section this will get rid of the original > report as well. I went trolling for other critical sections ... lazy_scan_heap has same disease, but looks like it can be fixed same way. Also, there are a bunch of fsync_fname() calls inside critical sections in replication/slot.c. Seems at best pretty damn risky; what's more, the critical sections cover only the fsyncs and not anything else, which is flat out broken. If it was okay to fail just before calling the fsync, why is it critical to not fail inside it? Somebody was not thinking clearly there. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs