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 1gZIPq-0001mU-6O for pgsql-performance@arkaria.postgresql.org; Tue, 18 Dec 2018 16:40:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZIPo-0002IC-NO for pgsql-performance@arkaria.postgresql.org; Tue, 18 Dec 2018 16:40:16 +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 1gZIPo-0002I2-7y for pgsql-performance@lists.postgresql.org; Tue, 18 Dec 2018 16:40:16 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZIPg-0000Vz-6R for pgsql-performance@lists.postgresql.org; Tue, 18 Dec 2018 16:40:14 +0000 Received: by mail-qt1-x841.google.com with SMTP id n21so18867163qtl.6 for ; Tue, 18 Dec 2018 08:40:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=p4BGymSdagaoXRGkSVLkcQdBrRt6WXZrd/mjgvs30sw=; b=Bp9QE0vZ5/8eBY2H8kmUgYJVDNDPr7lZ7wbFmrrA/LWs0jUE5Gr0w9ETtyLHAEfE/g r5P814JRpAu5LN5CiGZNQdCZ9KMJUfPSgJ8wshk1RvqVddE2Goh5Gw8NCeMB0wpjiubp XrJAYyKhElYBuRhVO+cqjn3Sgsl6fSeeREnvvAXWFPe+GPdKITzcOVicevPpPxdWoR+0 Q3iEQDCWwmVqGCp1Yh1bEq1AlQMYUEWujyMJEmsIxZiaiaBynnSueIn5rQjCumtcCTKR 0mE7cRtoiF55zxZUv7nd4zuwtj7OxR5DS0o1ClspvS8BR+EHriI9YyQRvqAanfHxlcYB xfKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=p4BGymSdagaoXRGkSVLkcQdBrRt6WXZrd/mjgvs30sw=; b=CvlYDVqzEVx8kl3t6dJf1TkEEu4oNAz73wPZ3i1TXqrHzp707nPuoQnvyF0/antI/b bduq3UDNUu6YgMyB6akohRMr9mQMRtgmJipr1LxaV7eggQN5spu+6yqSeJNXzuvB8f/1 NGTvlOr8h7n6umR7AW3y3/tZESFdQ2ACVEYabwYXdVE8anw7N9rKCCZvDKwJEMMuMTdM u2bzFdDz3666YHSpRFjYQxLNX/p5Sg7lDv0lKPEl1UG42/DtCrUrtx2U1Vuq9AAa9O03 U9gvh2gCOO6qcfj4B4dPTCXznTQETNMt1z2ELvJIewmhuv9qU8HcM5dx3ossltMbPUGv VJ2g== X-Gm-Message-State: AA+aEWZbCkT9cxteKNcN5mWiK2dW8Ykij4BRJ7AEP16CMw/kqpb4IfyA yR8WIv9FSC29ApsYfLAvgZoGcg== X-Google-Smtp-Source: AFSGD/V8mJCmHY88V1Dpl13I7vIlOBUpwam1H5WSr5u2i6E7rt5i3S+Bacn/SxojmHPe1tLqVO4idQ== X-Received: by 2002:aed:2803:: with SMTP id r3mr17740703qtd.316.1545151206921; Tue, 18 Dec 2018 08:40:06 -0800 (PST) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id f13sm235172qkm.52.2018.12.18.08.40.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Dec 2018 08:40:06 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 36DD07E4; Tue, 18 Dec 2018 13:40:04 -0300 (-03) Date: Tue, 18 Dec 2018 13:40:04 -0300 From: Alvaro Herrera To: Tom Lane Cc: Vladimir Ryabtsev , pgsql-performance@lists.postgresql.org Subject: Re: Why Postgres doesn't use TID scan? Message-ID: <20181218164004.eq423wrntg5egxlj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <31790.1545097237@sss.pgh.pa.us> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Dec-17, Tom Lane wrote: > Queries like yours are kinda sorta counterexamples to that, but pretty > much all the ones I've seen seem like crude hacks (and this one is not > an exception). Writing a bunch of code to support them feels like > solving the wrong problem. Admittedly, it's not clear to me what the > right problem to solve instead would be. Yeah, over the years I've confronted several times with situations where a deletion by ctid (and sometimes updates, IIRC) was the most convenient way out of. It's not the kind of thing that you'd do with any frequency, just one-offs. It's always been a bit embarrasing that this doesn't "work properly". There's always been some way around it, much slower and less convenient ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services