Thread: Very small patch for decode.c

Very small patch for decode.c

From
Konstantin Knizhnik
Date:
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 2380ea2..a992662 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -488,7 +488,7 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf, {        XLogRecPtr
origin_lsn= InvalidXLogRecPtr;        TimestampTz     commit_time = parsed->xact_time;
 
-       XLogRecPtr      origin_id = XLogRecGetOrigin(buf->record);
+       RepOriginId     origin_id = XLogRecGetOrigin(buf->record);        int                     i;

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




Re: Very small patch for decode.c

From
Michael Paquier
Date:
On Thu, Mar 31, 2016 at 4:34 AM, Konstantin Knizhnik
<k.knizhnik@postgrespro.ru> wrote:
> diff --git a/src/backend/replication/logical/decode.c
> b/src/backend/replication/logical/decode.c
> index 2380ea2..a992662 100644
> --- a/src/backend/replication/logical/decode.c
> +++ b/src/backend/replication/logical/decode.c
> @@ -488,7 +488,7 @@ DecodeCommit(LogicalDecodingContext *ctx,
> XLogRecordBuffer *buf,
>  {
>         XLogRecPtr      origin_lsn = InvalidXLogRecPtr;
>         TimestampTz     commit_time = parsed->xact_time;
> -       XLogRecPtr      origin_id = XLogRecGetOrigin(buf->record);
> +       RepOriginId     origin_id = XLogRecGetOrigin(buf->record);
>         int                     i;

Good catch!
-- 
Michael



Re: Very small patch for decode.c

From
Craig Ringer
Date:
On 31 March 2016 at 03:34, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote:
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 2380ea2..a992662 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -488,7 +488,7 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
 {
        XLogRecPtr      origin_lsn = InvalidXLogRecPtr;
        TimestampTz     commit_time = parsed->xact_time;
-       XLogRecPtr      origin_id = XLogRecGetOrigin(buf->record);
+       RepOriginId     origin_id = XLogRecGetOrigin(buf->record);
        int                     i;

Even though it's trivial, created as https://commitfest.postgresql.org/10/594/ so we don't lose it. 

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Re: Very small patch for decode.c

From
Alvaro Herrera
Date:
Konstantin Knizhnik wrote:
> diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
> index 2380ea2..a992662 100644
> --- a/src/backend/replication/logical/decode.c
> +++ b/src/backend/replication/logical/decode.c
> @@ -488,7 +488,7 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
>  {
>         XLogRecPtr      origin_lsn = InvalidXLogRecPtr;
>         TimestampTz     commit_time = parsed->xact_time;
> -       XLogRecPtr      origin_id = XLogRecGetOrigin(buf->record);
> +       RepOriginId     origin_id = XLogRecGetOrigin(buf->record);
>         int                     i;

Pushed, thanks.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: Very small patch for decode.c

From
Andres Freund
Date:
On 2016-03-30 23:44:00 -0300, Alvaro Herrera wrote:
> Konstantin Knizhnik wrote:
> > diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
> > index 2380ea2..a992662 100644
> > --- a/src/backend/replication/logical/decode.c
> > +++ b/src/backend/replication/logical/decode.c
> > @@ -488,7 +488,7 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
> >  {
> >         XLogRecPtr      origin_lsn = InvalidXLogRecPtr;
> >         TimestampTz     commit_time = parsed->xact_time;
> > -       XLogRecPtr      origin_id = XLogRecGetOrigin(buf->record);
> > +       RepOriginId     origin_id = XLogRecGetOrigin(buf->record);
> >         int                     i;
> 
> Pushed, thanks.

Thanks for finding Konstantin, and pushing Alvaro.