Skip to content

Commit c3be893

Browse files
committed
[PBCKP-245] don't include libpq-int.h
There's really no need to. But doing it pulls bad dependency.
1 parent 2121b9e commit c3be893

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
@@ -2179,6 +2179,7 @@ check_external_for_tablespaces(parray *external_list, PGconn *backup_conn)
21792179
PGresult *res;
21802180
int i = 0;
21812181
int j = 0;
2182+
int ntups;
21822183
char *tablespace_path = NULL;
21832184
char *query = "SELECT pg_catalog.pg_tablespace_location(oid) "
21842185
"FROM pg_catalog.pg_tablespace "
@@ -2190,7 +2191,8 @@ check_external_for_tablespaces(parray *external_list, PGconn *backup_conn)
21902191
if (!res)
21912192
elog(ERROR, "Failed to get list of tablespaces");
21922193

2193-
for (i = 0; i < res->ntups; i++)
2194+
ntups = PQntuples(res);
2195+
for (i = 0; i < ntups; i++)
21942196
{
21952197
tablespace_path = PQgetvalue(res, i, 0);
21962198
Assert (strlen(tablespace_path) > 0);

src/catchup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ catchup_check_tablespaces_existance_in_tbsmapping(PGconn *conn)
230230
{
231231
PGresult *res;
232232
int i;
233+
int ntups;
233234
char *tablespace_path = NULL;
234235
const char *linked_path = NULL;
235236
char *query = "SELECT pg_catalog.pg_tablespace_location(oid) "
@@ -241,7 +242,8 @@ catchup_check_tablespaces_existance_in_tbsmapping(PGconn *conn)
241242
if (!res)
242243
elog(ERROR, "Failed to get list of tablespaces");
243244

244-
for (i = 0; i < res->ntups; i++)
245+
ntups = PQntuples(res);
246+
for (i = 0; i < ntups; i++)
245247
{
246248
tablespace_path = PQgetvalue(res, i, 0);
247249
Assert (strlen(tablespace_path) > 0);

src/pg_probackup.h

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

1515
#include "postgres_fe.h"
1616
#include "libpq-fe.h"
17-
#include "libpq-int.h"
1817

1918
#include "access/xlog_internal.h"
2019
#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)