Re: First-draft release notes for back branches are up - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: First-draft release notes for back branches are up
Date
Msg-id b7e5cc6c-8780-83fc-8ef9-e21d7229a033@enterprisedb.com
Whole thread Raw
In response to Re: First-draft release notes for back branches are up  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: First-draft release notes for back branches are up  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 11/7/20 3:52 AM, Tom Lane wrote:
> Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
>> We should probably include instructions what to do about the BRIN
>> data corruption fixed by 7577dd8480 - a query to list might be
>> affected by the bug and should be rebuilt.
> 
> Do you have some suggested text?
> 

I think this might work:

Fix handling of toasted values in BRIN indexes

This mistake can result in BRIN indexes referencing toasted values,
which may unexpectedly disapper after a cleanup of the table, leading
to errors due to missing chunks:

  ERROR:  missing chunk number 0 for toast value 16433 in pg_toast_16426

Fortunately, this issue only affects BRIN indexes on columns with
toastable data types. While no index corruption due to this bug is
known to have occurred in the field, it is recommended that production
installations REINDEX all brin indexes at a convenient time after
upgrading to X.X.

The list of porentially corrupted BRIN indexes may be obtained using
this query:

  select pg_get_indexdef(oid)
    from pg_class
    where (relkind = 'i')
      and relam = 3580
      and exists (select 1 from pg_attribute
                   where attrelid = pg_class.oid
                     and attlen = -1
                     and attstorage in ('x', 'e'))

It might be better to propose CREATE INDEX CONCURRENTLY, but I don't
think there is a function to generate that SQL.

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: WIP: BRIN multi-range indexes
Next
From: Peter Eisentraut
Date:
Subject: Re: redundant error messages