Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUb7m-0004aO-Ko for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2016 14:56:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUb7m-0007Jg-5o for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2016 14:56:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUb6O-0005VA-PS for pgsql-hackers@postgresql.org; Tue, 02 Aug 2016 14:55:29 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bUb6J-0001v7-RQ for pgsql-hackers@postgresql.org; Tue, 02 Aug 2016 14:55:27 +0000 Received: by mail-pa0-x235.google.com with SMTP id fi15so64292546pac.1 for ; Tue, 02 Aug 2016 07:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wF5AB9RR3qFBnciwpT8HBdzC71rBkuAz9aqE2NspB6k=; b=FTNolzEOI5qy1jZ+j/3srOUh+Ai3FTXteD/auPJMNiXgftZnCo3r/fVteENMjL/swx okmoOaOgY8ldwbAeQGNKXl6AiWWfpn1I4XiTLY9cwciic8ictIkRVlbfi43oHIu5tqRn 8JSc1y95uc/7KooaPazPkoI/0kzO5hG6b8Yi4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wF5AB9RR3qFBnciwpT8HBdzC71rBkuAz9aqE2NspB6k=; b=Xrp2+EgXpGkVUamAYbNkx8osQeQ5RGqpkv4czgxWTghb6g9Mvmo1bXmmm9kDk5bazU d2X4xTUjAOqEmuBppD3WRkRMc/WEsIBm9HJda9bfG6U6/Lb4EkIbP2EQ+X4x8IaA2d4H JkxOAkYZ2HThRo1DwljFLRlnpnP8B6UH3/jW2t9Eg9WFRyhsvBxeU3mFVT+WXKWGb9vu G8wPsF+i28mj4nykLeKP7qmh0g1tKq52j7HOZkaxngxFeXq+8FdOSD0DlZoXlSDbNzB8 ROXtYVY8sBKJ1C8hyUfxgCqEY3z/t4OncUi40mzb3iE9NVEBfkdjW528F1RYKeaBsXep NHWA== X-Gm-Message-State: AEkoouvHW01vPGyi0aRIrvF1A1LHi4lmGVpVBoIXGpSK0/LueaxTupnFY+Q6MxSBl12XQA== X-Received: by 10.66.82.3 with SMTP id e3mr81313568pay.54.1470149722353; Tue, 02 Aug 2016 07:55:22 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id y200sm5570722pfb.13.2016.08.02.07.55.20 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 02 Aug 2016 07:55:21 -0700 (PDT) Date: Tue, 2 Aug 2016 10:55:18 -0400 From: Noah Misch To: Andres Freund Cc: Amit Kapila , Tom Lane , Masahiko Sawada , Alvaro Herrera , Robert Haas , Thomas Munro , Stephen Frost , Michael Paquier , "pgsql-hackers@postgresql.org" Subject: Re: Reviewing freeze map code Message-ID: <20160802145518.GC2377169@tornado.leadboat.com> References: <25549.1468684146@sss.pgh.pa.us> <2E9AE050-767F-40E8-8F09-66BA64E67DE3@anarazel.de> <20160718024829.s3mucbxipk2r4jvp@alap3.anarazel.de> <20160718034352.ddzljwmmsicprknj@alap3.anarazel.de> <20160718083310.jyshh2s4t2xnurka@alap3.anarazel.de> <20160802054909.GA2308967@tornado.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Tue, Aug 02, 2016 at 02:10:29PM +0530, Amit Kapila wrote: > On Tue, Aug 2, 2016 at 11:19 AM, Noah Misch wrote: > > On Sat, Jul 23, 2016 at 01:25:55PM +0530, Amit Kapila wrote: > >> On Mon, Jul 18, 2016 at 2:03 PM, Andres Freund wrote: > >> > On 2016-07-18 10:02:52 +0530, Amit Kapila wrote: > >> >> Consider the below scenario. > >> >> > >> >> Vacuum > >> >> a. acquires a cleanup lock for page - 10 > >> >> b. busy in checking visibility of tuples > >> >> --assume, here it takes some time and in the meantime Session-1 > >> >> performs step (a) and (b) and start waiting in step- (c) > >> >> c. marks the page as all-visible (PageSetAllVisible) > >> >> d. unlockandrelease the buffer > >> >> > >> >> Session-1 > >> >> a. In heap_lock_tuple(), readbuffer for page-10 > >> >> b. check PageIsAllVisible(), found page is not all-visible, so didn't > >> >> acquire the visbilitymap_pin > >> >> c. LockBuffer in ExlusiveMode - here it will wait for vacuum to > >> >> release the lock > >> >> d. Got the lock, but now the page is marked as all-visible, so ideally > >> >> need to recheck the page and acquire the visibilitymap_pin > >> > > >> > So, I've tried pretty hard to reproduce that. While the theory above is > >> > sound, I believe the relevant code-path is essentially dead for SQL > >> > callable code, because we'll always hold a buffer pin before even > >> > entering heap_update/heap_lock_tuple. > >> > > >> > >> It is possible that we don't hold any buffer pin before entering > >> heap_update() and or heap_lock_tuple(). For heap_update(), it is > >> possible when it enters via simple_heap_update() path. For > >> heap_lock_tuple(), it is possible for ON CONFLICT DO Update statement > >> and may be others as well. > > > > This is currently listed as a 9.6 open item. Is it indeed a regression in > > 9.6, or do released versions have the same defect? If it is a 9.6 regression, > > do you happen to know which commit, or at least which feature, caused it? > > > > Commit eca0f1db is the reason for this specific issue. [Action required within 72 hours. This is a generic notification.] The above-described topic is currently a PostgreSQL 9.6 open item. Andres, since you committed the patch believed to have created it, you own this open item. If some other commit is more relevant or if this does not belong as a 9.6 open item, please let us know. Otherwise, please observe the policy on open item ownership[1] and send a status update within 72 hours of this message. Include a date for your subsequent status update. Testers may discover new open items at any time, and I want to plan to get them all fixed in advance of shipping 9.6rc1 next week. Consequently, I will appreciate your efforts toward speedy resolution. Thanks. [1] http://www.postgresql.org/message-id/20160527025039.GA447393@tornado.leadboat.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers