From: | Darren Lafreniere <dlafreniere(at)onezero(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Querying an index's btree version |
Date: | 2020-03-11 21:12:53 |
Message-ID: | CABoC1=4Aty9re38Jqf2niWaibJasdAHrBcbWg6HdcWKswo7_mA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you for the info, Peter.
Separate but related follow-up question: when you restore a DB from a
backup, does the restored index use the old format or the latest one?
Thank you,
Darren Lafreniere
On Wed, Mar 11, 2020 at 4:30 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Wed, Mar 11, 2020 at 1:26 PM Darren Lafreniere
> <dlafreniere(at)onezero(dot)com> wrote:
> > We've read that PG 12 has improved btree index support, and that the
> latest internal btree version was bumped from 3 to 4. Is it possible to
> query the btree version that a particular index is using? We'd like to
> automatically start a concurrent re-index if we detect any btree indexes
> are still on version 3.
>
> It's possible, but you have to install the superuser-only pageinspect
> extension. Here is how you'd determine that an index called
> 'pg_aggregate_fnoid_index' is on version 4:
>
> regression=# create extension pageinspect;
> CREATE EXTENSION
> regression=# select version from bt_metap('pg_aggregate_fnoid_index');
> version
> ---------
> 4
> (1 row)
>
> --
> Peter Geoghegan
>
--
*Darren Lafreniere*
Senior Software Engineer | oneZero Financial Systems
site: www.onezero.com
email: dlafreniere(at)onezero(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2020-03-11 21:18:42 | Re: Querying an index's btree version |
Previous Message | Nicola Contu | 2020-03-11 21:12:35 | Re: Streaming replication - 11.5 |