From f3c0587f19bc372c353d4ebdfd0f5c4d99359b1b Mon Sep 17 00:00:00 2001 From: Yura Sokolov Date: Mon, 15 Aug 2022 15:40:14 +0300 Subject: [PATCH] don't include libpq-int.h --- src/backup.c | 4 +++- src/catchup.c | 4 +++- src/pg_probackup.h | 1 - src/utils/file.c | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/backup.c b/src/backup.c index 9a451e72a..440c5a44f 100644 --- a/src/backup.c +++ b/src/backup.c @@ -2270,6 +2270,7 @@ check_external_for_tablespaces(parray *external_list, PGconn *backup_conn) PGresult *res; int i = 0; int j = 0; + int ntups; char *tablespace_path = NULL; char *query = "SELECT pg_catalog.pg_tablespace_location(oid) " "FROM pg_catalog.pg_tablespace " @@ -2281,7 +2282,8 @@ check_external_for_tablespaces(parray *external_list, PGconn *backup_conn) if (!res) elog(ERROR, "Failed to get list of tablespaces"); - for (i = 0; i < res->ntups; i++) + ntups = PQntuples(res); + for (i = 0; i < ntups; i++) { tablespace_path = PQgetvalue(res, i, 0); Assert (strlen(tablespace_path) > 0); diff --git a/src/catchup.c b/src/catchup.c index 79e3361a8..ce0651cc6 100644 --- a/src/catchup.c +++ b/src/catchup.c @@ -238,6 +238,7 @@ catchup_check_tablespaces_existance_in_tbsmapping(PGconn *conn) { PGresult *res; int i; + int ntups; char *tablespace_path = NULL; const char *linked_path = NULL; char *query = "SELECT pg_catalog.pg_tablespace_location(oid) " @@ -249,7 +250,8 @@ catchup_check_tablespaces_existance_in_tbsmapping(PGconn *conn) if (!res) elog(ERROR, "Failed to get list of tablespaces"); - for (i = 0; i < res->ntups; i++) + ntups = PQntuples(res); + for (i = 0; i < ntups; i++) { tablespace_path = PQgetvalue(res, i, 0); Assert (strlen(tablespace_path) > 0); diff --git a/src/pg_probackup.h b/src/pg_probackup.h index e583d7745..eaa512a92 100644 --- a/src/pg_probackup.h +++ b/src/pg_probackup.h @@ -13,7 +13,6 @@ #include "postgres_fe.h" #include "libpq-fe.h" -#include "libpq-int.h" #include "access/xlog_internal.h" #include "utils/pg_crc.h" diff --git a/src/utils/file.c b/src/utils/file.c index 7103c8f1d..706a90d05 100644 --- a/src/utils/file.c +++ b/src/utils/file.c @@ -4,6 +4,7 @@ #include "pg_probackup.h" /* sys/stat.h must be included after pg_probackup.h (see problems with compilation for windows described in PGPRO-5750) */ #include +#include #include "file.h" #include "storage/checksum.h" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy