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 noticing the issue, Thanks

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 (pgsql-hackers@

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 commitfest. It's just 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 eac

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 another PostgreSQL instance.

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 decoding plugin call

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 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 changes part. Here's what I used for my tes

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 second >>origin' -- or

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 >> origin_lsn/timestamp, it doesn't have anyth

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 included in many more type

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 correctly to callback

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 callback. All other call

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 tran

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

2015-10-15 Thread Craig Ringer
Hi all 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. It's a one-line fix, but I've added support in test_decoding to val