Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WtO9C-0003wg-Ql for pgsql-bugs@arkaria.postgresql.org; Sat, 07 Jun 2014 21:27:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WtO9B-0003oy-Je for pgsql-bugs@arkaria.postgresql.org; Sat, 07 Jun 2014 21:27:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WtO99-0003nP-Co for pgsql-bugs@postgresql.org; Sat, 07 Jun 2014 21:27:27 +0000 Received: from nm8-vm0.bullet.mail.ne1.yahoo.com ([98.138.91.23]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1WtO94-0003Fz-CC for pgsql-bugs@postgresql.org; Sat, 07 Jun 2014 21:27:24 +0000 Received: from [98.138.100.114] by nm8.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jun 2014 21:27:20 -0000 Received: from [98.138.87.6] by tm105.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jun 2014 21:27:20 -0000 Received: from [127.0.0.1] by omp1006.mail.ne1.yahoo.com with NNFMP; 07 Jun 2014 21:27:20 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 561333.53342.bm@omp1006.mail.ne1.yahoo.com Received: (qmail 93753 invoked by uid 60001); 7 Jun 2014 21:27:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1402176440; bh=RwhxXoaQ2FpbSqf4QNvWsntZGwXWpqcQYU17zzxn1NQ=; h=References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=uRc2Qsq+qwzteZHsnkujlrmh2nQMbTRvwQU3leh8U2xalRwywzW/ptVZZEZYbbedPQwopI5K/Vjy5mry2FdSxPcR4OUKUUz6Jo9ScHAaVHjuuUAFDnWBYODhBhS+kBIqZqV/3C9FfXmIHBz2T2ibwwIxGcFs5FVQ0h0BY9FTfEQ= X-YMail-OSG: j5ngFBcVM1nVkld8t2eotK_d0YP8Dym8lMB6_O4DLPRhuLR hszuVBxT96h7BrPJKXKi3NoX_MIvVae8qhohoqyBMx6BNPAT38MfbZBB5Cbn RQiUS7uDY9NyudbkPOe1bX6x92L5P04hKIt.Lrxic0si3fIwjaiTYH0_ejWz bXgDZJP1kdbtABDdv..4mJwHpOrMhVXk4BbK2D1H3iVLKd9Y3q_vF_zjlkNj L.rYpFo2StEJvPBa6Lzi9PXf3wb5E7Vq4F.8o9Ef97Fxg_lPWjzYSOVNaLLf l8yj01.2xln_hR61r587HlGFgCq08vF1H7MLydNg25p6cxtjF299ae3dhYRc tiWYcDX1NLrghZrPbCgToi1WLJisOdd2xVfBQZBhTlyqBWtmjX2VHPH4opZC VjqcZJAchcWCAvxjB9ezl1j4axgEWFUkaai4YwcdzUpe0Ik4heQgtGrb3JP2 1YUKzL91TFluQtT6ElJypBs4Q40Df1OUM8w4nMHYr5eIY9dx2_7IShWQJBMB 8Ya4ueTG7XPUyPCpPTqX1KgtnZ_xI_8_DCUCfXBVvR.KZRjh8IxOPtlyMVML eVhn5BXVIteMgoKTcqA-- Received: from [24.178.25.147] by web122301.mail.ne1.yahoo.com via HTTP; Sat, 07 Jun 2014 14:27:20 PDT X-Rocket-MIMEInfo: 002.001, QW5kcmVzIEZyZXVuZCA8YW5kcmVzQDJuZHF1YWRyYW50LmNvbT4gd3JvdGU6Cgo.IEkgZG8gd29uZGVyIGlmIGFueSBvZiB0aGUgb3RoZXIgZXhpc3RpbmcgY2FsbGVycyBvZiBIVFNWIGFyZQo.IGFmZmVjdGVkLiBJIGRvbid0IHVuZGVyc3RhbmQgcHJlZGljYXRlLmMgd2VsbCBlbm91Z2ggdG8gYmUgc3VyZSwKPiBidXQgaXQgbG9va3MgdG8gbWUgbGlrZSBpdCdkIGNvdWxkIGluIHRoZW9yeSBsZWFkIHRvIG1pc3NlZAo.IGNvbmZsaWN0cy4gU2VlbXMgZmFpcmx5IHVubGlrZWx5IHRvIG1hdHRlciBpbiBwcmEBMAEBAQE- X-Mailer: YahooMailWebService/0.8.190.668 References: <20140530143150.GA11051@localhost> <20140531132841.GC1220@awork2.anarazel.de> Message-ID: <1402176440.76325.YahooMailNeo@web122301.mail.ne1.yahoo.com> Date: Sat, 7 Jun 2014 14:27:20 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: uninterruptable loop: concurrent delete in progress within table To: Andres Freund , Tom Lane , Alvaro Herrera Cc: "pgsql-bugs@postgresql.org" , Sandro Santilli In-Reply-To: <20140531132841.GC1220@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) 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 wrote: > I do wonder if any of the other existing callers of HTSV are > affected. I don't understand predicate.c well enough to be sure, > but it looks to me like it'd could in theory lead to missed > conflicts. Seems fairly unlikely to matter in practice though. Early in the evaluation of the multi-xact bugs around 9.3 someone pointed out that the serializable transactions could be affected. I looked at it then, and it was very hard to set up a case to actually hit that, and there were no field reports of it, so I figured I should let the dust settle on fixes in this area before deciding what to do.=A0 It appeared that the fixes being made for other reasons might fix this as well.=A0 So far I haven't gotten the feeling that this area has yet settled down enough to get back to this.=A0 Perhaps we've now gotten to that point? Have we really pinned down the semantics of the the return values for HeapTupleSatisfiesVacuum() at this point?=A0 If so, I guess the next question is, where is the exact meaning of each return value documented?=A0 The five to seven word comments in the enum value declaration *seem* clear on the face of it, but I don't actually have confidence what they really mean when, for example, a subtransaction has rolled back.=A0 It appears that HEAPTUPLE_INSERT_IN_PROGRESS can be returned for a DELETE under some circumstances, but it would take a lot of work to reverse- engineer exactly what the various conditions that can cause that return value are.=A0 It seems like someone who knows what these values really mean should capture that in a code comment somewhere. What the code in predicate.c is using this for is to determine, for a given tuple which the calling process is reading, whether it is visible to the calling process but has been deleted by another transaction (whose work this snapshot can't see), or is not visible to the calling process and has been inserted by another transaction (whose work this transaction can't see).=A0 To qualify, the change from the other transaction must be either committed or still pending (i.e., it might commit).=A0 With the tuple's visibility to the current process known, what return values answer that question without further checking, and what further checking is needed for which other return codes? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs