Re: Making table reloading easier

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making table reloading easier
Date: 2016-11-03 14:37:40
Message-ID: CADkLM=dX6Vhi4a2MhHPWeUvTvA-a_cNWKasYs_4cFXzK5jm3kw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> ALTER TABLE my_table
> DISABLE INDEX ALL;
>

+1
This very thing came up in a conversation with PeterG early last year. I
was in favor then and I was surprised that the only thing standing in the
way was a lack of ALTER TABLE syntax.
Creating temporary data structures to mimic existing metadata structures is
a pain.

>
> It'd be even better to also add a REINDEX flag to COPY, where it
> disables indexes and re-creates them after it finishes. But that could
> be done separately.
>

I'm iffy on the COPY change. If we add index rebuilding, why not disabling
as well? If the COPY fails, what state do we leave the indexes in?

I'm not sure I can tackle this in the current dev cycle,

I may have some spare cycles to devote to this, but it's unfamiliar
territory. I'm happy to do the grunt work if I had some higher level
guidance.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-03 14:39:38 Re: Confusing docs about GetForeignUpperPaths in fdwhandler.sgml
Previous Message Kuntal Ghosh 2016-11-03 14:28:42 Re: WAL consistency check facility