Re: Proposal: global index

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Erikjan Rijkers <er(at)xs4all(dot)nl>
Cc: Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Proposal: global index
Date: 2017-08-18 14:45:10
Message-ID: 20170818144510.5lipcb6rxjvily4a@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Erikjan Rijkers wrote:
> On 2017-08-18 11:12, Ildar Musin wrote:
> > Hi hackers,
> >
> > While we've been developing pg_pathman extension one of the most
> > frequent questions we got from our users was about global index
> > support. We cannot provide it within an extension. And I couldn't find
> > any recent discussion about someone implementing it. So I'm thinking
> > about giving it a shot and start working on a patch for postgres.
>
> Sorry to be dense but what exactly is a "Global Index"?

A global index covers all partitions of a partitioned table. It allows
you to have unique indexes across the partitioned table.

The main disadvantage of global indexes is that you need some kind of
cleanup after you drop a partition. Either make partition drop wait
until all the index pointers are removed, or you need some kind of
after-commit cleanup process that removes them afterwards (which
requires some assurance that they are really all gone). You can't let
them linger forever, or you risk a new partition that reuses the same
OID causing the whole index to become automatically corrupt.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-08-18 15:28:18 Re: Quorum commit for multiple synchronous replication.
Previous Message Alvaro Herrera 2017-08-18 14:40:47 Re: Proposal: global index