Ignore invalid indexes in pg_dump

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Ignore invalid indexes in pg_dump
Date: 2013-03-20 02:51:05
Message-ID: CAB7nPqTTTAcQpagm7-7Re1=2auOnBRgBbJnn85vW0QETU0Mr=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

If failures happen with CREATE INDEX CONCURRENTLY, the system will be let
with invalid indexes. I don't think that the user would like to see invalid
indexes of
an existing system being recreated as valid after a restore.
So why not removing from a dump invalid indexes with something like the
patch
attached?
This should perhaps be applied in pg_dump for versions down to 8.2 where
CREATE
INDEX CONCURRENTLY has been implemented?

I noticed some recent discussions about that:
http://www.postgresql.org/message-id/20121207141236.GB4699@alvh.no-ip.org
In this case the problem has been fixed in pg_upgrade directly.

--
Michael

Attachment Content-Type Size
20130317_dump_only_valid_index.patch application/octet-stream 484 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2013-03-20 03:40:26 Re: Enabling Checksums
Previous Message Tom Lane 2013-03-20 02:05:26 Re: Enabling Checksums