Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f3c0587

Browse files
committedAug 15, 2022
don't include libpq-int.h
1 parent 9f2ded0 commit f3c0587

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed
 

‎src/backup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,6 +2270,7 @@ check_external_for_tablespaces(parray *external_list, PGconn *backup_conn)
22702270
PGresult *res;
22712271
int i = 0;
22722272
int j = 0;
2273+
int ntups;
22732274
char *tablespace_path = NULL;
22742275
char *query = "SELECT pg_catalog.pg_tablespace_location(oid) "
22752276
"FROM pg_catalog.pg_tablespace "
@@ -2281,7 +2282,8 @@ check_external_for_tablespaces(parray *external_list, PGconn *backup_conn)
22812282
if (!res)
22822283
elog(ERROR, "Failed to get list of tablespaces");
22832284

2284-
for (i = 0; i < res->ntups; i++)
2285+
ntups = PQntuples(res);
2286+
for (i = 0; i < ntups; i++)
22852287
{
22862288
tablespace_path = PQgetvalue(res, i, 0);
22872289
Assert (strlen(tablespace_path) > 0);

‎src/catchup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ catchup_check_tablespaces_existance_in_tbsmapping(PGconn *conn)
238238
{
239239
PGresult *res;
240240
int i;
241+
int ntups;
241242
char *tablespace_path = NULL;
242243
const char *linked_path = NULL;
243244
char *query = "SELECT pg_catalog.pg_tablespace_location(oid) "
@@ -249,7 +250,8 @@ catchup_check_tablespaces_existance_in_tbsmapping(PGconn *conn)
249250
if (!res)
250251
elog(ERROR, "Failed to get list of tablespaces");
251252

252-
for (i = 0; i < res->ntups; i++)
253+
ntups = PQntuples(res);
254+
for (i = 0; i < ntups; i++)
253255
{
254256
tablespace_path = PQgetvalue(res, i, 0);
255257
Assert (strlen(tablespace_path) > 0);

‎src/pg_probackup.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "postgres_fe.h"
1515
#include "libpq-fe.h"
16-
#include "libpq-int.h"
1716

1817
#include "access/xlog_internal.h"
1918
#include "utils/pg_crc.h"

‎src/utils/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "pg_probackup.h"
55
/* sys/stat.h must be included after pg_probackup.h (see problems with compilation for windows described in PGPRO-5750) */
66
#include <sys/stat.h>
7+
#include <signal.h>
78

89
#include "file.h"
910
#include "storage/checksum.h"

0 commit comments

Comments
 (0)
Please sign in to comment.