mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Fix the logical replication from HEAD to lower versions.
Commit 464824323e changed the logical replication protocol to allow the
streaming of in-progress transactions and used the new version of protocol
irrespective of the server version. Use the appropriate version of the
protocol based on the server version.
Reported-by: Ashutosh Sharma
Author: Dilip Kumar
Reviewed-by: Ashutosh Sharma and Amit Kapila
Discussion: https://postgr.es/m/CAE9k0P=9OpXcNrcU5Gsvd5MZ8GFpiN833vNHzX6Uc=8+h1ft1Q@mail.gmail.com
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
/*
|
||||
* Protocol capabilities
|
||||
*
|
||||
* LOGICALREP_PROTO_VERSION_NUM is our native protocol and the greatest version
|
||||
* we can support. LOGICALREP_PROTO_MIN_VERSION_NUM is the oldest version we
|
||||
* LOGICALREP_PROTO_VERSION_NUM is our native protocol.
|
||||
* LOGICALREP_PROTO_MAX_VERSION_NUM is the greatest version we can support.
|
||||
* LOGICALREP_PROTO_MIN_VERSION_NUM is the oldest version we
|
||||
* have backwards compatibility for. The client requests protocol version at
|
||||
* connect time.
|
||||
*
|
||||
@@ -28,8 +29,9 @@
|
||||
* support for streaming large transactions.
|
||||
*/
|
||||
#define LOGICALREP_PROTO_MIN_VERSION_NUM 1
|
||||
#define LOGICALREP_PROTO_VERSION_NUM 1
|
||||
#define LOGICALREP_PROTO_STREAM_VERSION_NUM 2
|
||||
#define LOGICALREP_PROTO_VERSION_NUM 2
|
||||
#define LOGICALREP_PROTO_MAX_VERSION_NUM LOGICALREP_PROTO_STREAM_VERSION_NUM
|
||||
|
||||
/*
|
||||
* This struct stores a tuple received via logical replication.
|
||||
|
||||
Reference in New Issue
Block a user