From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Ignore invalid indexes in pg_dump |
Date: | 2013-03-20 15:38:58 |
Message-ID: | CAK3UJRHZCWJiBKiGc8THpUfQ0t78D2j1Q160bQLkZxZynakoug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 20, 2013 at 2:00 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 20 March 2013 02:51, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
>
>> 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?
>
> Invalid also means currently-in-progress, so it would be better to keep them in.
For invalid indexes which are left hanging around in the database, if
the index definition is included by pg_dump, it will likely cause pain
during the restore. If the index build failed the first time and
hasn't been manually dropped and recreated since then, it's a good bet
it will fail the next time. Errors during restore can be more than
just a nuisance; consider restores with --single-transaction.
And if the index is simply currently-in-progress, it seems like the
expected behavior would be for pg_dump to ignore it anyway. We don't
include other DDL objects which are not yet committed while pg_dump is
running.
Josh
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-03-20 15:58:26 | Re: Ignore invalid indexes in pg_dump |
Previous Message | Alvaro Herrera | 2013-03-20 15:33:54 | Re: Problem with background worker |