Re: [HACKERS] logical changeset generation v6.4

2013-10-25 Thread Robert Haas
On Fri, Oct 25, 2013 at 10:58 AM, Andres Freund wrote: > So, I am currently wondering about how to store the "old" tuple, based > on this. Currently it is stored using the TupleDesc of the index the old > tuple is based on. But if we want to allow transporting the entire tuple > that obviously can

Re: [HACKERS] logical changeset generation v6.4

2013-10-25 Thread Andres Freund
Hi, On 2013-10-22 16:07:16 +0200, Andres Freund wrote: > On 2013-10-21 20:16:29 +0200, Andres Freund wrote: > > Current draft is: > > ALTER TABLE ... REPLICA IDENTITY NOTHING|FULL|DEFAULT > > ALTER TABLE ... REPLICA IDENTITY USING INDEX ...; > > > > which leaves the door open for > > > > ALTER T

Re: [HACKERS] logical changeset generation v6.4

2013-10-22 Thread Robert Haas
On Tue, Oct 22, 2013 at 10:07 AM, Andres Freund wrote: > 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

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Andres Freund
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) Cu

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Hannu Krosing
On 10/21/2013 05:06 PM, Andres Freund wrote: > On 2013-10-21 16:40:43 +0200, Hannu Krosing wrote: >> On 10/18/2013 08:50 PM, Andres Freund wrote: >>> On 2013-10-18 08:11:29 -0400, Robert Haas wrote: >> ... 2. If that seems too complicated, how about just logging the whole old tuple for ve

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Andres Freund
On 2013-10-21 11:14:37 -0400, Robert Haas wrote: > On Mon, Oct 21, 2013 at 9:51 AM, Andres Freund wrote: > > I have a hard time to understand why you dislike it so much. Think of a > > big schema where you want to add auditing via changeset > > extraction. Because of problems with reindexing prima

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Robert Haas
On Mon, Oct 21, 2013 at 9:51 AM, Andres Freund wrote: > I have a hard time to understand why you dislike it so much. Think of a > big schema where you want to add auditing via changeset > extraction. Because of problems with reindexing primary key you've just > used candidate keys so far. Why shou

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Andres Freund
On 2013-10-21 16:40:43 +0200, Hannu Krosing wrote: > On 10/18/2013 08:50 PM, Andres Freund wrote: > > On 2013-10-18 08:11:29 -0400, Robert Haas wrote: > ... > >> 2. If that seems too complicated, how about just logging the whole old > >> tuple for version 1? > > I think that'd make the patch much l

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Hannu Krosing
On 10/18/2013 08:50 PM, Andres Freund wrote: > On 2013-10-18 08:11:29 -0400, Robert Haas wrote: ... >> 2. If that seems too complicated, how about just logging the whole old >> tuple for version 1? > I think that'd make the patch much less useful because it bloats WAL > unnecessarily for the primar

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Andres Freund
On 2013-10-21 09:40:13 -0400, Robert Haas wrote: > On Fri, Oct 18, 2013 at 2:50 PM, 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 > > * [

Re: [HACKERS] logical changeset generation v6.4

2013-10-21 Thread Robert Haas
On Fri, Oct 18, 2013 at 2:50 PM, 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)

Re: [HACKERS] logical changeset generation v6.4

2013-10-18 Thread Andres Freund
On 2013-10-18 08:11:29 -0400, Robert Haas wrote: > On Mon, Oct 14, 2013 at 9:12 AM, Andres Freund wrote: > > Attached you can find version 6.4 of the patchset: > > So I'm still unhappy with the arbitrary logic in what's now patch 1 > for choosing the candidate key. On another thread, someone men

Re: [HACKERS] logical changeset generation v6.4

2013-10-18 Thread Merlin Moncure
On Fri, Oct 18, 2013 at 7:11 AM, Robert Haas wrote: > On Mon, Oct 14, 2013 at 9:12 AM, Andres Freund wrote: >> Attached you can find version 6.4 of the patchset: > > So I'm still unhappy with the arbitrary logic in what's now patch 1 > for choosing the candidate key. On another thread, someone m

Re: [HACKERS] logical changeset generation v6.4

2013-10-18 Thread Robert Haas
On Mon, Oct 14, 2013 at 9:12 AM, Andres Freund wrote: > Attached you can find version 6.4 of the patchset: So I'm still unhappy with the arbitrary logic in what's now patch 1 for choosing the candidate key. On another thread, someone mentioned that they might want the entire old tuple, and that