mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Add walreceiver API to get remote server version
Add a separate walreceiver API function walrcv_server_version() to get the version of the remote server, instead of doing it as part of walrcv_identify_system(). This allows the server version to be available even for uses that don't call IDENTIFY_SYSTEM, and it seems cleaner anyway. This is for an upcoming patch, not currently used. Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/20190115071359.GF1433@paquier.xyz
This commit is contained in:
@@ -330,7 +330,6 @@ WalReceiverMain(void)
|
||||
{
|
||||
char *primary_sysid;
|
||||
char standby_sysid[32];
|
||||
int server_version;
|
||||
WalRcvStreamOptions options;
|
||||
|
||||
/*
|
||||
@@ -338,8 +337,7 @@ WalReceiverMain(void)
|
||||
* IDENTIFY_SYSTEM replication command.
|
||||
*/
|
||||
EnableWalRcvImmediateExit();
|
||||
primary_sysid = walrcv_identify_system(wrconn, &primaryTLI,
|
||||
&server_version);
|
||||
primary_sysid = walrcv_identify_system(wrconn, &primaryTLI);
|
||||
|
||||
snprintf(standby_sysid, sizeof(standby_sysid), UINT64_FORMAT,
|
||||
GetSystemIdentifier());
|
||||
|
||||
Reference in New Issue
Block a user