pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix logical replication slot initialization
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix logical replication slot initialization
@ 2018-08-01 22:11 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-08-01 22:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix logical replication slot initialization

This was broken in commit 9c7d06d60680, which inadvertently gave the
wrong value to fast_forward in one StartupDecodingContext call.  Fix by
flipping the value.  Add a test for the obvious error, namely trying to
initialize a replication slot with an nonexistent output plugin.

While at it, move the CreateDecodingContext call earlier, so that any
errors are reported before sending the CopyBoth message.

Author: Dave Cramer <davecramer@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CADK3HHLVkeRe1v4P02-5hj55H3_yJg3AEtpXyEY5T3wuzO2jSg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c40489e449ea08e154cd62fa055785873f7bdac8

Modified Files
--------------
contrib/test_decoding/expected/slot.out   |  2 ++
contrib/test_decoding/sql/slot.sql        |  2 ++
src/backend/replication/logical/logical.c |  2 +-
src/backend/replication/walsender.c       | 23 +++++++++++++----------
4 files changed, 18 insertions(+), 11 deletions(-)



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

* pgsql: Fix logical replication slot initialization
@ 2018-08-01 22:11 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-08-01 22:11 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix logical replication slot initialization

This was broken in commit 9c7d06d60680, which inadvertently gave the
wrong value to fast_forward in one StartupDecodingContext call.  Fix by
flipping the value.  Add a test for the obvious error, namely trying to
initialize a replication slot with an nonexistent output plugin.

While at it, move the CreateDecodingContext call earlier, so that any
errors are reported before sending the CopyBoth message.

Author: Dave Cramer <davecramer@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CADK3HHLVkeRe1v4P02-5hj55H3_yJg3AEtpXyEY5T3wuzO2jSg@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7326a7d63801673d3569def65cb7955d6486f254

Modified Files
--------------
contrib/test_decoding/expected/slot.out   |  2 ++
contrib/test_decoding/sql/slot.sql        |  2 ++
src/backend/replication/logical/logical.c |  2 +-
src/backend/replication/walsender.c       | 23 +++++++++++++----------
4 files changed, 18 insertions(+), 11 deletions(-)



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


end of thread, other threads:[~2018-08-01 22:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 22:11 pgsql: Fix logical replication slot initialization Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-08-01 22:11 pgsql: Fix logical replication slot initialization Alvaro Herrera <alvherre@alvh.no-ip.org>

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