From 2e26d8df0374db517f7d21d4886601a82161567a Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Mon, 25 Mar 2019 13:47:48 +0100 Subject: [PATCH] Document simple protocol on ReplicationConn --- replication.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/replication.go b/replication.go index d3fdd046..52e6b915 100644 --- a/replication.go +++ b/replication.go @@ -171,6 +171,17 @@ func ReplicationConnect(config ConnConfig) (r *ReplicationConn, err error) { return &ReplicationConn{c}, nil } +// ReplicationConn is a PostgreSQL connection handle established in the +// replication mode which enables a special set of commands for streaming WAL +// changes from the server. +// +// When in replication mode, only the simple query protocol can be used +// (see PreferSimpleProtocol in ConnConfig). Execution of normal SQL queries on +// the connection is possible but may be limited in available functionality. +// Most notably, prepared statements won't work. +// +// See https://www.postgresql.org/docs/11/protocol-replication.html for +// details. type ReplicationConn struct { *Conn }