Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h87m0-0008HK-KC for pgsql-committers@arkaria.postgresql.org; Sun, 24 Mar 2019 18:23:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h87ly-0005pF-RA for pgsql-committers@arkaria.postgresql.org; Sun, 24 Mar 2019 18:23:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h87lx-0005jj-3T for pgsql-committers@lists.postgresql.org; Sun, 24 Mar 2019 18:23:06 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h87lp-00014I-I9 for pgsql-committers@lists.postgresql.org; Sun, 24 Mar 2019 18:23:03 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id CC1164741; Sun, 24 Mar 2019 14:22:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 24 Mar 2019 14:22:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:cc:from:message-id; s=fm1; bh=2kBiXtgNA7/EeWrOSgXTSWHevi2YEIoq1+dh2nYim10=; b=FkbN+WVb9QnJ fWRPIsAiBPNB8a2HAxAuSu4tUoYXPQCOsHuSRWmjhZ80KBFuSHBwYMgXtWZTHTJA XkgCw0G8TCYpt8rxJpjMm3yqMj4k9fLJZf5Q1nkXMF4akxpTaPNerh7XCwmpMhk6 2Pq0RuGTDdOod4FW29gDDvSzFUUubKxhMiCAoO+nRMi85SONwavMocJHI0CNe3Iq R7sW1OOXlOEj3mlglcwa6OSRMWZFmyxMeKxHtoy7QgmPAHnR+FxcvoXHPZIsdIfa hcGlijIBpJojuSYNyYAHggM3nLnzpaI89IknVEry9iXDHMdylm2YRA+URBZRYb/p cbUcEVi9uw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=2kBiXtgNA7/EeWrOSgXTSWHevi2YEIoq1+dh2nYim 10=; b=A5cp0SgPwiEo+owPy/TFx2JRMFyHi50arzKB+KeTguCeAdiNWynKSRyR+ Mo1ki0+bvJIKIORuXL/zHNAptZsbrSO8PR4WE9jsB4MkWZSDrStlbS1C+Mrjkts0 mpLR4pm+axTbZyNPTsMrRIBmP37QyZRUgc3CcUyX/M/gjrpBGZgZQkS1rXS/Z2bn 0Wll2YVamIiY/3L+5GVLVX/fy0veHhGtroOKtPxfgRxZbmrwImkty9EvwQxIq+w1 9NSnTc7FT6lPz2lQD8fZU1xrPpqOvvfvt0aR191ahpQK4HcH+esZtmeoQSgtBgLT odeSwefvxFSc9Evd06YrJsOxPFOMg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrjeeigdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepffgfjghfgggtgffuvffhkfesthhqmhdttderjeenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuffhomh grihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepudejvddrheekrdeluddrjeeg necurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg enucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [IPv6:2607:fb90:9ebf:69bb:b1b1:616c:9c01:e73] (unknown [172.58.91.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 7AA1810310; Sun, 24 Mar 2019 14:22:54 -0400 (EDT) Date: Sun, 24 Mar 2019 11:22:47 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: pgsql: tableam: Add tuple_{insert, delete, update, lock} and use. To: pgsql-committers@lists.postgresql.org,Alexander Korotkov CC: pgsql-committers From: Andres Freund Message-ID: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On March 24, 2019 11:17:15 AM PDT, Alexander Korotkov wrote: >Great work, thank you very much! > >On Sun, Mar 24, 2019 at 6:02 AM Andres Freund >wrote: >> Previously both delete/update/lock call-sites and the EPQ mechanism >had >> to have awareness of the specific tuple format to be able to fetch >the >> latest version of a tuple=2E Obviously that needs to be abstracted >> away=2E To do so, move the logic that find the latest row version into >> the AM=2E lock_tuple has a new flag argument, >> TUPLE_LOCK_FLAG_FIND_LAST_VERSION, that forces it to lock the last >> version, rather than the current one=2E It'd have been possible to do >> so via a separate callback as well, but finding the last version >> usually also necessitates locking the newest version, making it >> sensible to combine the two=2E This replaces the previous use of >> EvalPlanQualFetch()=2E Additionally HeapTupleUpdated, which previously >> signaled either a concurrent update or delete, is now split into two, >> to avoid callers needing AM specific knowledge to differentiate=2E > >BTW, given your skepticism during PGCon 2018 discussions, I didn't >expect my lock tuple patch [1] to get in=2E=20 Well, nobody came up with a better design, and after polishing it didn't l= ook that bad=2E=2E=2E > But if it finally got in, >I've expected to be listed as author=2E=2E=2E > >1=2E >https://www=2Epostgresql=2Eorg/message-id/CAJrrPGc951F-R4Kfa4W47B5vHKeHsB= 2Y34zewp%3Db%2BAWSkF9RVA%40mail=2Egmail=2Ecom Sorry, I wasn't aware of the origin of they piece of work=2E Andres --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E