From: | Rumpi Gravenstein <rgravens(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Indexes mysteriously change to ON ONLY |
Date: | 2023-01-27 21:01:31 |
Message-ID: | CAEpg1wD3gkZ6Px3G4VfWDm+BdOiUbaYJfOm3B=zA+Vr976EjQQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
We are using the pg_indexes view (indexdef) to retrieve the index
definition.
Are you saying that as a normal part of building an index, there are short
periods of time where the pg_indexes view will show the index with ON ONLY
specified?
On Fri, Jan 27, 2023 at 3:53 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Rumpi Gravenstein <rgravens(at)gmail(dot)com> writes:
> >> We have recently discovered that on some of our partitioned tables
> indexes
> >> that were created as:
> >>
> >> CREATE UNIQUE INDEX chapter_u01 USING btree (dur_uk, catalog_id)
> >>
> >> somehow changed to include the ON ONLY option:
> >>
> >> CREATE UNIQUE INDEX chapter_u01 *ON ONLY *chapter USING btree (dur_uk,
> >> catalog_id)
>
> What do you mean "somehow changed"? There is nothing in the system
> catalogs that stores that exact string, so I suppose what you mean
> is that some tool is presenting the indexes to you that way.
>
> If that tool is pg_dump, this is its normal behavior. There will
> be other commands in its output that build the rest of the
> partitioned index set.
>
> regards, tom lane
>
--
Rumpi Gravenstein
From | Date | Subject | |
---|---|---|---|
Next Message | Christophe Pettus | 2023-01-27 21:07:08 | Re: Indexes mysteriously change to ON ONLY |
Previous Message | Rob Sargent | 2023-01-27 20:59:39 | nextval per counted |