Replication protocol question for logical replication.

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Replication protocol question for logical replication.
Date: 2018-07-23 14:13:50
Message-ID: CAKt_ZfvVmrP5Z-7mrz3g3u=eu7axhtjFERWHVfx_stg5SRcLzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

While we are building a streaming logical backup solution for our data
warehouse environment, we made a surprising discovery that select
statements could be executed in a replication connection but I cannot find
any clear documentation that says this is supported but I think it ought to
be since that way you can, for example, copy a table to stdout.

Is this expected?

Chriss-MBP:postgres christravers$ PGSSLMODE=prefer psql "host=localhost
port=5432 dbname=postgres replication=database" -c "IDENTIFY_SYSTEM"

systemid | timeline | xlogpos | dbname

---------------------+----------+------------+----------

6562045063708868894 | 1 | 0/CC9F4920 | postgres

(1 row)

Chriss-MBP:postgres christravers$ PGSSLMODE=prefer psql "host=localhost
port=5432 dbname=postgres replication=database" -c "SELECT VERSION()"

version

---------------------------------------------------------------------------------------------------------------

PostgreSQL 10.4 on x86_64-apple-darwin17.5.0, compiled by Apple LLVM
version 9.1.0 (clang-902.0.39.2), 64-bit

(1 row)

I am asking because if this is clearly intended to be supported we would
like to work with upstream library vendors to make sure this functionality
is included. My reading of the docs is that parameterized queries are not
possible but simple queries are. Is this correct?

--
Best Wishes,
Chris Travers

Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-07-23 14:14:48 Re: Improving pg_dump performance
Previous Message Andres Freund 2018-07-23 14:11:40 Re: Improving pg_dump performance