mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +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:
@ -1674,7 +1674,6 @@ ApplyWorkerMain(Datum main_arg)
|
||||
RepOriginId originid;
|
||||
TimeLineID startpointTLI;
|
||||
char *err;
|
||||
int server_version;
|
||||
|
||||
myslotname = MySubscription->slotname;
|
||||
|
||||
@ -1708,8 +1707,7 @@ ApplyWorkerMain(Datum main_arg)
|
||||
* We don't really use the output identify_system for anything but it
|
||||
* does some initializations on the upstream so let's still call it.
|
||||
*/
|
||||
(void) walrcv_identify_system(wrconn, &startpointTLI,
|
||||
&server_version);
|
||||
(void) walrcv_identify_system(wrconn, &startpointTLI);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user