Re: Restriction on table partition expressions - Mailing list pgsql-general

From David Rowley
Subject Re: Restriction on table partition expressions
Date
Msg-id CAApHDvru49vCpfDhsA=wNe8xNHw4pR5Xi5Nx6z2BmvNJnPp9Gw@mail.gmail.com
Whole thread Raw
In response to Restriction on table partition expressions  (James Vanns <jvanns@ilm.com>)
Responses Re: Restriction on table partition expressions
List pgsql-general
On Fri, 26 Aug 2022 at 03:08, James Vanns <jvanns@ilm.com> wrote:
> Also, is there a chance that this
> limitation will be relaxed in the future?

(forgot to answer this part)

Certainly not in the near future, I'm afraid.  It would require
allowing a single index to exist over multiple tables. There has been
discussions about this in the past and the general thoughts are that
if you have a single index over all partitions, then it massively
detracts from the advantages of partitioning.  With partitioning, you
can DETACH or DROP a partition and get rid of all the data quickly in
a single metadata operation.  If you have an index over all partitions
then that operation is no longer a metadata-only operation. It
suddenly needs to go and remove or invalidate all records pointing to
the partition you want to detach/drop.

David



pgsql-general by date:

Previous
From: David Rowley
Date:
Subject: Re: Restriction on table partition expressions
Next
From: Ravi Krishna
Date:
Subject: Information_schema.table_constraints