Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-11-08 Thread Andres Freund
Hi, On 2015-10-19 21:43:32 +0800, Craig Ringer wrote: > Patch revision 3 attached. It's a one-liner, with just the fix, and an > explanatory note in the patch header. Pushed to 9.5 and master. Thanks for noticing the issue, Andres Freund -- Sent via pgsql-hackers mailing list

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-11-08 Thread Craig Ringer
On 9 November 2015 at 07:04, Andres Freund wrote: > Hi, > > On 2015-10-19 21:43:32 +0800, Craig Ringer wrote: >> Patch revision 3 attached. It's a one-liner, with just the fix, and an >> explanatory note in the patch header. > > Pushed to 9.5 and master. > > Thanks for

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-25 Thread Craig Ringer
On 19 October 2015 at 21:43, Craig Ringer wrote: > Hi all > > Patch revision 3 attached. It's a one-liner, with just the fix, and an > explanatory note in the patch header. I'm bumping this because I think it's important not to miss it for 9.5, so it can't wait for the

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-19 Thread Craig Ringer
Hi all Patch revision 3 attached. It's a one-liner, with just the fix, and an explanatory note in the patch header. I'll leave the test changes for now, per Andres's feedback. I'll write up a proposed addition to the replication origin docs that explains the existence of separate origins for

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Craig Ringer
On 15 October 2015 at 19:04, Andres Freund wrote: > As far as I can see all the other places have it assigned. Ok, thanks. Not much need for a followup patch then, if you're not using the test changes part. >>table public.origin_tbl: INSERT: id[integer]:6 data[text]:'from

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Andres Freund
On 2015-10-15 20:52:41 +0800, Craig Ringer wrote: > You'll note that the tests fail. When the replication origin is reset > and set again with pg_replication_origin_xact_setup mid-xact, the > origin identity exposed to the decoding plugin callbacks for all > records (including those created before

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Andres Freund
On October 15, 2015 1:02:04 PM GMT+02:00, Craig Ringer wrote: >On 15 October 2015 at 17:43, Andres Freund wrote: > >>> I guess since it'll be InvalidRepOriginId otherwise, that makes >sense. >> >> That's not the point. XACT_XINFO_HAS_ORIGIN is about >>

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Craig Ringer
On 15 October 2015 at 17:43, Andres Freund wrote: >> I guess since it'll be InvalidRepOriginId otherwise, that makes sense. > > That's not the point. XACT_XINFO_HAS_ORIGIN is about > origin_lsn/timestamp, it doesn't have anything to do with the record > origin (which is

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Craig Ringer
On 15 October 2015 at 20:11, Craig Ringer wrote: > On 15 October 2015 at 19:04, Andres Freund wrote: > >> As far as I can see all the other places have it assigned. > > Ok, thanks. Not much need for a followup patch then, if you're not > using the test

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Andres Freund
On 2015-10-15 16:02:23 +0800, Craig Ringer wrote: > There's an oversight in replication origins support in logical > decoding, where the origin node ID isn't passed correctly to callbacks > except for the origin filter callback. All other callbacks see it as > InvalidRepOriginId. Only for the

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Craig Ringer
On 15 October 2015 at 16:48, Andres Freund wrote: > On 2015-10-15 16:02:23 +0800, Craig Ringer wrote: >> There's an oversight in replication origins support in logical >> decoding, where the origin node ID isn't passed correctly to callbacks >> except for the origin filter

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Andres Freund
On 2015-10-15 17:05:33 +0800, Craig Ringer wrote: > On 15 October 2015 at 16:48, Andres Freund wrote: > > On 2015-10-15 16:02:23 +0800, Craig Ringer wrote: > >> There's an oversight in replication origins support in logical > >> decoding, where the origin node ID isn't passed

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Craig Ringer
On 15 October 2015 at 20:55, Andres Freund wrote: > On 2015-10-15 20:52:41 +0800, Craig Ringer wrote: >> You'll note that the tests fail. When the replication origin is reset >> and set again with pg_replication_origin_xact_setup mid-xact, the >> origin identity exposed to the

Re: [HACKERS] PATCH: 9.5 replication origins fix for logical decoding

2015-10-15 Thread Craig Ringer
On 16 October 2015 at 11:51, Craig Ringer wrote: > Document it as a "don't do that, if you do it you get to keep the pieces"? Thinking about this some more, having per-change origins makes sense when you're not using origin LSNs, such as when you're not replaying from