pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vladimir Ryabtsev <greatvovan@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Why Postgres doesn't use TID scan?
Date: Mon, 17 Dec 2018 21:32:51 -0500
Message-ID: <1247.1545100371@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMqTPq=4Qp80Qt11DdHjjzM4ksp7O0wTmDQexSUbo2sEoTk+hQ@mail.gmail.com>
References: <CAMqTPq=hNg0GYFU0X+xmuKy8R2ARk1+A_uQpS+Mnf71MYpBKzg@mail.gmail.com>
	<31790.1545097237@sss.pgh.pa.us>
	<CAMqTPq=4Qp80Qt11DdHjjzM4ksp7O0wTmDQexSUbo2sEoTk+hQ@mail.gmail.com>

Vladimir Ryabtsev <greatvovan@gmail.com> writes:
> I see some recommendations in Internet to do like this (e.g.
> https://stackoverflow.com/questions/5170546/how-do-i-delete-a-fixed-number-of-rows-with-sorting-in-p...
> ).
> Did it really work in 2011?

No, or at least not any better than today.  (For context, "git blame"
says I wrote the comment I just quoted to you in 2005.  The feature it
says isn't there wasn't there before that, either.)

> Anyway I think the problem is pretty clear: I want to eventually clear the
> table based on the predicate but I don't want to lock it for a long time.

DELETE doesn't lock the whole table.  What problem are you actually
facing?

			regards, tom lane




view thread (11+ messages)  latest in thread

Message-ID: <1247.1545100371@sss.pgh.pa.us>
Permalink:  ../1247.1545100371@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1247.1545100371@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, greatvovan@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Why Postgres doesn't use TID scan?
  In-Reply-To: <1247.1545100371@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox