pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: BRIN autosummarization may need a snapshot
Date: Tue, 04 Nov 2025 12:24:42 +0000
Message-ID: <E1vGG5a-004zIl-0Y@gemulon.postgresql.org> (raw)

BRIN autosummarization may need a snapshot

It's possible to define BRIN indexes on functions that require a
snapshot to run, but the autosummarization feature introduced by commit
7526e10224f0 fails to provide one.  This causes autovacuum to leave a
BRIN placeholder tuple behind after a failed work-item execution, making
such indexes less efficient.  Repair by obtaining a snapshot prior to
running the task, and add a test to verify this behavior.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Reported-by: Giovanni Fabris <giovanni.fabris@icon.it>
Reported-by: Arthur Nascimento <tureba@gmail.com>
Backpatch-through: 13
Discussion: https://postgr.es/m/202511031106.h4fwyuyui6fz@alvherre.pgsql

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/419ffde235469bd7459bd52b7eeed76a7520853a

Modified Files
--------------
src/backend/postmaster/autovacuum.c     |  2 ++
src/test/modules/brin/t/01_workitems.pl | 37 ++++++++++++++++++++++++++++++---
2 files changed, 36 insertions(+), 3 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1vGG5a-004zIl-0Y@gemulon.postgresql.org>
Permalink:  ../E1vGG5a-004zIl-0Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vGG5a-004zIl-0Y@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: BRIN autosummarization may need a snapshot
  In-Reply-To: <E1vGG5a-004zIl-0Y@gemulon.postgresql.org>

* 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