pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: logical decoding: fix decoding of a commit's commit time.
2+ messages / 1 participants
[nested] [flat]

* pgsql: logical decoding: fix decoding of a commit's commit time.
@ 2016-03-03 07:46  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2016-03-03 07:46 UTC (permalink / raw)
  To: pgsql-committers

logical decoding: fix decoding of a commit's commit time.

When adding replication origins in 5aa235042, I somehow managed to set
the timestamp of decoded transactions to InvalidXLogRecptr when decoding
one made without a replication origin. Fix that, and the wrong type of
the new commit_time variable.

This didn't trigger a regression test failure because we explicitly
don't show commit timestamps in the regression tests, as they obviously
are variable. Add a test that checks that a decoded commit's timestamp
is within minutes of NOW() from before the commit.

Reported-By: Weiping Qu
Diagnosed-By: Artur Zakirov
Discussion: 56D4197E.9050706@informatik.uni-kl.de,
    56D42918.1010108@postgrespro.ru
Backpatch: 9.5, where 5aa235042 originates.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7c17aac69dcae610b08c5965161151cd282f16bc

Modified Files
--------------
contrib/test_decoding/Makefile           |  2 +-
contrib/test_decoding/expected/time.out  | 40 ++++++++++++++++++++++++++++++++
contrib/test_decoding/sql/time.sql       | 22 ++++++++++++++++++
src/backend/replication/logical/decode.c |  2 +-
4 files changed, 64 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: logical decoding: fix decoding of a commit's commit time.
@ 2016-03-03 07:46  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2016-03-03 07:46 UTC (permalink / raw)
  To: pgsql-committers

logical decoding: fix decoding of a commit's commit time.

When adding replication origins in 5aa235042, I somehow managed to set
the timestamp of decoded transactions to InvalidXLogRecptr when decoding
one made without a replication origin. Fix that, and the wrong type of
the new commit_time variable.

This didn't trigger a regression test failure because we explicitly
don't show commit timestamps in the regression tests, as they obviously
are variable. Add a test that checks that a decoded commit's timestamp
is within minutes of NOW() from before the commit.

Reported-By: Weiping Qu
Diagnosed-By: Artur Zakirov
Discussion: 56D4197E.9050706@informatik.uni-kl.de,
    56D42918.1010108@postgrespro.ru
Backpatch: 9.5, where 5aa235042 originates.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f8a75881f90f88f4dc54f3692e4e1691cf2c0a91

Modified Files
--------------
contrib/test_decoding/Makefile           |  2 +-
contrib/test_decoding/expected/time.out  | 40 ++++++++++++++++++++++++++++++++
contrib/test_decoding/sql/time.sql       | 22 ++++++++++++++++++
src/backend/replication/logical/decode.c |  2 +-
4 files changed, 64 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-03-03 07:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-03 07:46 pgsql: logical decoding: fix decoding of a commit's commit time. Andres Freund <andres@anarazel.de>
2016-03-03 07:46 pgsql: logical decoding: fix decoding of a commit's commit time. Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox