From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: logical changeset generation v6.4 |
Date: | 2013-10-22 14:07:16 |
Message-ID: | 20131022140716.GB7435@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-10-21 20:16:29 +0200, Andres Freund wrote:
> On 2013-10-18 20:50:58 +0200, Andres Freund wrote:
> > How about modifying the selection to go from:
> > * all rows if ALTER TABLE ... REPLICA IDENTITY NOTHING|FULL;
> > * index chosen by ALTER TABLE ... REPLICA IDENTITY USING indexname
> > * [later, maybe] ALTER TABLE ... REPLICA IDENTITY (cola, colb)
>
> Current draft is:
> ALTER TABLE ... REPLICA IDENTITY NOTHING|FULL|DEFAULT
> ALTER TABLE ... REPLICA IDENTITY USING INDEX ...;
>
> which leaves the door open for
>
> ALTER TABLE ... REPLICA IDENTITY USING '(' column_name_list ')';
>
> Does anybody have a strong feeling about requiring support for CREATE
> TABLE for this?
Attached is a patch ontop of master implementing this syntax. It's not
wired up to the changeset extraction patch yet as I am not sure whether
others agree about the storage.
pg_class grew a 'relreplident' char, storing:
* 'd' default
* 'n' nothing
* 'f' full
* 'i' index with indisreplident set, or default if index has been
dropped
pg_index grew a 'indisreplident' bool indicating it is set as the
replica identity for a replident = 'i' relation.
Both changes shouldn't change the width of the affected relations, they
should reuse existing padding.
Does somebody prefer a different storage?
pg_dump support, psql completion, regression tests and minimal docs
included.
I am not 100% clear what the best way to handle
ALTER TABLE some_table REPLICA IDENTITY USING INDEX someindex;
DROP INDEX someindex;
is. Currently that's supposed to have the same effect as having
relreplident = 'd'.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Add-command-to-set-the-REPLICA-IDENTITY-for-a-table.patch | text/x-patch | 60.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-10-22 14:52:48 | Re: logical changeset generation v6.2 |
Previous Message | Stephen Frost | 2013-10-22 13:26:43 | Re: Add min and max execute statement time in pg_stat_statement |