pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Петър Славов <pet.slavov@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Date: Wed, 25 May 2022 18:43:22 +0200
Message-ID: <202205251643.2py5jjpaw7wy@alvherre.pgsql> (raw)
In-Reply-To: <CA+TgmoYP7BnHXTEoJRUnOuie2J05Qo8ti5mnE2u-1c4Hk+8zJw@mail.gmail.com>

On 2022-May-25, Robert Haas wrote:

> On Wed, May 25, 2022 at 7:45 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

> > Another possibility (than reverting the commit altogether) might be to
> > disable HOT pruning while a process is operating on that relation with
> > PROC_IN_SAFE_IC.  So CIC/RIC processes are still ignored for VACUUM,
> > while not creating corrupted indexes.
> 
> I'm not sure that would be a win, because HOT pruning is great as long
> as the tuples you're pruning are old enough.

Well, the point is that VACUUM could still prune dead tuples that are
newer than the CIC in all *other* tables.  VACUUM cannot run in the
table being processed by CIC/RIC (because of locks), so there's no
change; it's only HOT-pruning in the table being processed that would
change.

> Also, it seems like it would require complex new infrastructure that I
> think we should be reluctant to invent in back branches.

This is definitely true.  And I think this would be expensive, because
we'd have to check in every heap_page_prune call.

> It seems to me that we should just revert.

Deciding to revert makes me sad, because this feature is extremely
valuable for users.  However, I understand the danger and I don't
disagree with the rationale so I can't really object.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"¿Cómo puedes confiar en algo que pagas y que no ves,
y no confiar en algo que te dan y te lo muestran?" (Germán Poo)





view thread (80+ messages)  latest in thread

Message-ID: <202205251643.2py5jjpaw7wy@alvherre.pgsql>
Permalink:  ../202205251643.2py5jjpaw7wy@alvherre.pgsql/
Also on:    postgresql.org/message-id/202205251643.2py5jjpaw7wy@alvherre.pgsql

 · 

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-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, robertmhaas@gmail.com, andres@anarazel.de, x4mmm@yandex-team.ru, pg@bowt.ie, michael@paquier.xyz, pet.slavov@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
  In-Reply-To: <202205251643.2py5jjpaw7wy@alvherre.pgsql>

* 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