@@ -942,7 +942,7 @@ confirm_block_size(const char *name, int blcksz)
942
942
char * endp ;
943
943
int block_size ;
944
944
945
- res = pgut_execute (backup_conn , "SELECT current_setting($1)" , 1 , & name , true);
945
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. current_setting($1)" , 1 , & name , true);
946
946
if (PQntuples (res ) != 1 || PQnfields (res ) != 1 )
947
947
elog (ERROR , "cannot get %s: %s" , name , PQerrorMessage (backup_conn ));
948
948
@@ -976,13 +976,13 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
976
976
params [1 ] = smooth ? "false" : "true" ;
977
977
if (!exclusive_backup )
978
978
res = pgut_execute (conn ,
979
- "SELECT pg_start_backup($1, $2, false)" ,
979
+ "SELECT pg_catalog. pg_start_backup($1, $2, false)" ,
980
980
2 ,
981
981
params ,
982
982
true);
983
983
else
984
984
res = pgut_execute (conn ,
985
- "SELECT pg_start_backup($1, $2)" ,
985
+ "SELECT pg_catalog. pg_start_backup($1, $2)" ,
986
986
2 ,
987
987
params ,
988
988
true);
@@ -1040,9 +1040,9 @@ pg_switch_wal(PGconn *conn)
1040
1040
PQclear (res );
1041
1041
1042
1042
if (server_version >= 100000 )
1043
- res = pgut_execute (conn , "SELECT * FROM pg_switch_wal()" , 0 , NULL , true);
1043
+ res = pgut_execute (conn , "SELECT * FROM pg_catalog. pg_switch_wal()" , 0 , NULL , true);
1044
1044
else
1045
- res = pgut_execute (conn , "SELECT * FROM pg_switch_xlog()" , 0 , NULL , true);
1045
+ res = pgut_execute (conn , "SELECT * FROM pg_catalog. pg_switch_xlog()" , 0 , NULL , true);
1046
1046
1047
1047
PQclear (res );
1048
1048
}
@@ -1067,7 +1067,7 @@ pg_ptrack_support(void)
1067
1067
PQclear (res_db );
1068
1068
1069
1069
res_db = pgut_execute (backup_conn ,
1070
- "SELECT ptrack_version()" ,
1070
+ "SELECT pg_catalog. ptrack_version()" ,
1071
1071
0 , NULL , true);
1072
1072
if (PQntuples (res_db ) == 0 )
1073
1073
{
@@ -1127,7 +1127,7 @@ pg_is_in_recovery(void)
1127
1127
{
1128
1128
PGresult * res_db ;
1129
1129
1130
- res_db = pgut_execute (backup_conn , "SELECT pg_is_in_recovery()" , 0 , NULL , true);
1130
+ res_db = pgut_execute (backup_conn , "SELECT pg_catalog. pg_is_in_recovery()" , 0 , NULL , true);
1131
1131
1132
1132
if (PQgetvalue (res_db , 0 , 0 )[0 ] == 't' )
1133
1133
{
@@ -1166,11 +1166,11 @@ pg_ptrack_clear(void)
1166
1166
tblspcOid = atoi (PQgetvalue (res_db , i , 2 ));
1167
1167
1168
1168
tmp_conn = pgut_connect (dbname );
1169
- res = pgut_execute (tmp_conn , "SELECT pg_ptrack_clear()" , 0 , NULL , true);
1169
+ res = pgut_execute (tmp_conn , "SELECT pg_catalog. pg_ptrack_clear()" , 0 , NULL , true);
1170
1170
1171
1171
sprintf (params [0 ], "%i" , dbOid );
1172
1172
sprintf (params [1 ], "%i" , tblspcOid );
1173
- res = pgut_execute (tmp_conn , "SELECT pg_ptrack_get_and_clear_db($1, $2)" ,
1173
+ res = pgut_execute (tmp_conn , "SELECT pg_catalog. pg_ptrack_get_and_clear_db($1, $2)" ,
1174
1174
2 , (const char * * )params , true);
1175
1175
PQclear (res );
1176
1176
@@ -1217,7 +1217,7 @@ pg_ptrack_get_and_clear_db(Oid dbOid, Oid tblspcOid)
1217
1217
1218
1218
sprintf (params [0 ], "%i" , dbOid );
1219
1219
sprintf (params [1 ], "%i" , tblspcOid );
1220
- res = pgut_execute (backup_conn , "SELECT pg_ptrack_get_and_clear_db($1, $2)" ,
1220
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. pg_ptrack_get_and_clear_db($1, $2)" ,
1221
1221
2 , (const char * * )params , true);
1222
1222
1223
1223
if (PQnfields (res ) != 1 )
@@ -1278,7 +1278,7 @@ pg_ptrack_get_and_clear(Oid tablespace_oid, Oid db_oid, Oid rel_filenode,
1278
1278
tmp_conn = pgut_connect (dbname );
1279
1279
sprintf (params [0 ], "%i" , tablespace_oid );
1280
1280
sprintf (params [1 ], "%i" , rel_filenode );
1281
- res = pgut_execute (tmp_conn , "SELECT pg_ptrack_get_and_clear($1, $2)" ,
1281
+ res = pgut_execute (tmp_conn , "SELECT pg_catalog. pg_ptrack_get_and_clear($1, $2)" ,
1282
1282
2 , (const char * * )params , true);
1283
1283
1284
1284
if (PQnfields (res ) != 1 )
@@ -1296,7 +1296,7 @@ pg_ptrack_get_and_clear(Oid tablespace_oid, Oid db_oid, Oid rel_filenode,
1296
1296
*/
1297
1297
sprintf (params [0 ], "%i" , tablespace_oid );
1298
1298
sprintf (params [1 ], "%i" , rel_filenode );
1299
- res = pgut_execute (backup_conn , "SELECT pg_ptrack_get_and_clear($1, $2)" ,
1299
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. pg_ptrack_get_and_clear($1, $2)" ,
1300
1300
2 , (const char * * )params , true);
1301
1301
1302
1302
if (PQnfields (res ) != 1 )
@@ -1477,10 +1477,10 @@ wait_replica_wal_lsn(XLogRecPtr lsn, bool is_start_backup)
1477
1477
if (is_start_backup )
1478
1478
{
1479
1479
if (server_version >= 100000 )
1480
- res = pgut_execute (backup_conn , "SELECT pg_last_wal_replay_lsn()" ,
1480
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. pg_last_wal_replay_lsn()" ,
1481
1481
0 , NULL , true);
1482
1482
else
1483
- res = pgut_execute (backup_conn , "SELECT pg_last_xlog_replay_location()" ,
1483
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. pg_last_xlog_replay_location()" ,
1484
1484
0 , NULL , true);
1485
1485
}
1486
1486
/*
@@ -1490,10 +1490,10 @@ wait_replica_wal_lsn(XLogRecPtr lsn, bool is_start_backup)
1490
1490
else
1491
1491
{
1492
1492
if (server_version >= 100000 )
1493
- res = pgut_execute (backup_conn , "SELECT pg_last_wal_receive_lsn()" ,
1493
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. pg_last_wal_receive_lsn()" ,
1494
1494
0 , NULL , true);
1495
1495
else
1496
- res = pgut_execute (backup_conn , "SELECT pg_last_xlog_receive_location()" ,
1496
+ res = pgut_execute (backup_conn , "SELECT pg_catalog. pg_last_xlog_receive_location()" ,
1497
1497
0 , NULL , true);
1498
1498
}
1499
1499
@@ -1577,7 +1577,7 @@ pg_stop_backup(pgBackup *backup)
1577
1577
base36enc (backup -> start_time ));
1578
1578
params [0 ] = name ;
1579
1579
1580
- res = pgut_execute (conn , "SELECT pg_create_restore_point($1)" ,
1580
+ res = pgut_execute (conn , "SELECT pg_catalog. pg_create_restore_point($1)" ,
1581
1581
1 , params , true);
1582
1582
PQclear (res );
1583
1583
}
@@ -1602,22 +1602,22 @@ pg_stop_backup(pgBackup *backup)
1602
1602
*/
1603
1603
sent = pgut_send (conn ,
1604
1604
"SELECT"
1605
- " txid_snapshot_xmax(txid_current_snapshot()),"
1605
+ " pg_catalog. txid_snapshot_xmax(pg_catalog. txid_current_snapshot()),"
1606
1606
" current_timestamp(0)::timestamptz,"
1607
1607
" lsn,"
1608
1608
" labelfile,"
1609
1609
" spcmapfile"
1610
- " FROM pg_stop_backup(false)" ,
1610
+ " FROM pg_catalog. pg_stop_backup(false)" ,
1611
1611
0 , NULL , WARNING );
1612
1612
}
1613
1613
else
1614
1614
{
1615
1615
1616
1616
sent = pgut_send (conn ,
1617
1617
"SELECT"
1618
- " txid_snapshot_xmax(txid_current_snapshot()),"
1618
+ " pg_catalog. txid_snapshot_xmax(pg_catalog. txid_current_snapshot()),"
1619
1619
" current_timestamp(0)::timestamptz,"
1620
- " pg_stop_backup() as lsn" ,
1620
+ " pg_catalog. pg_stop_backup() as lsn" ,
1621
1621
0 , NULL , WARNING );
1622
1622
}
1623
1623
pg_stop_backup_is_sent = true;
@@ -2139,8 +2139,8 @@ parse_backup_filelist_filenames(parray *files, const char *root)
2139
2139
continue ;
2140
2140
}
2141
2141
2142
- /* Check files located inside database directories */
2143
- if (filename [0 ] != '\0' && file -> dbOid != 0 )
2142
+ /* Check files located inside database directories including directory 'global' */
2143
+ if (filename [0 ] != '\0' && file -> tblspcOid != 0 )
2144
2144
{
2145
2145
if (strcmp (filename , "pg_internal.init" ) == 0 )
2146
2146
{
@@ -2700,7 +2700,7 @@ get_last_ptrack_lsn(void)
2700
2700
uint32 xrecoff ;
2701
2701
XLogRecPtr lsn ;
2702
2702
2703
- res = pgut_execute (backup_conn , "select pg_ptrack_control_lsn()" , 0 , NULL , true);
2703
+ res = pgut_execute (backup_conn , "select pg_catalog. pg_ptrack_control_lsn()" , 0 , NULL , true);
2704
2704
2705
2705
/* Extract timeline and LSN from results of pg_start_backup() */
2706
2706
XLogDataFromLSN (PQgetvalue (res , 0 , 0 ), & xlogid , & xrecoff );
@@ -2748,7 +2748,7 @@ pg_ptrack_get_block(backup_files_args *arguments,
2748
2748
//elog(LOG, "db %i pg_ptrack_get_block(%i, %i, %u)",dbOid, tblsOid, relOid, blknum);
2749
2749
res = pgut_execute_parallel (arguments -> thread_backup_conn ,
2750
2750
arguments -> thread_cancel_conn ,
2751
- "SELECT pg_ptrack_get_block_2($1, $2, $3, $4)" ,
2751
+ "SELECT pg_catalog. pg_ptrack_get_block_2($1, $2, $3, $4)" ,
2752
2752
4 , (const char * * )params , true);
2753
2753
2754
2754
if (PQnfields (res ) != 1 )
0 commit comments