@@ -942,7 +942,7 @@ confirm_block_size(const char *name, int blcksz)
942942 char * endp ;
943943 int block_size ;
944944
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);
946946 if (PQntuples (res ) != 1 || PQnfields (res ) != 1 )
947947 elog (ERROR , "cannot get %s: %s" , name , PQerrorMessage (backup_conn ));
948948
@@ -976,13 +976,13 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
976976 params [1 ] = smooth ? "false" : "true" ;
977977 if (!exclusive_backup )
978978 res = pgut_execute (conn ,
979- "SELECT pg_start_backup($1, $2, false)" ,
979+ "SELECT pg_catalog. pg_start_backup($1, $2, false)" ,
980980 2 ,
981981 params ,
982982 true);
983983 else
984984 res = pgut_execute (conn ,
985- "SELECT pg_start_backup($1, $2)" ,
985+ "SELECT pg_catalog. pg_start_backup($1, $2)" ,
986986 2 ,
987987 params ,
988988 true);
@@ -1040,9 +1040,9 @@ pg_switch_wal(PGconn *conn)
10401040 PQclear (res );
10411041
10421042 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);
10441044 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);
10461046
10471047 PQclear (res );
10481048}
@@ -1067,7 +1067,7 @@ pg_ptrack_support(void)
10671067 PQclear (res_db );
10681068
10691069 res_db = pgut_execute (backup_conn ,
1070- "SELECT ptrack_version()" ,
1070+ "SELECT pg_catalog. ptrack_version()" ,
10711071 0 , NULL , true);
10721072 if (PQntuples (res_db ) == 0 )
10731073 {
@@ -1127,7 +1127,7 @@ pg_is_in_recovery(void)
11271127{
11281128 PGresult * res_db ;
11291129
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);
11311131
11321132 if (PQgetvalue (res_db , 0 , 0 )[0 ] == 't' )
11331133 {
@@ -1166,11 +1166,11 @@ pg_ptrack_clear(void)
11661166 tblspcOid = atoi (PQgetvalue (res_db , i , 2 ));
11671167
11681168 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);
11701170
11711171 sprintf (params [0 ], "%i" , dbOid );
11721172 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)" ,
11741174 2 , (const char * * )params , true);
11751175 PQclear (res );
11761176
@@ -1217,7 +1217,7 @@ pg_ptrack_get_and_clear_db(Oid dbOid, Oid tblspcOid)
12171217
12181218 sprintf (params [0 ], "%i" , dbOid );
12191219 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)" ,
12211221 2 , (const char * * )params , true);
12221222
12231223 if (PQnfields (res ) != 1 )
@@ -1278,7 +1278,7 @@ pg_ptrack_get_and_clear(Oid tablespace_oid, Oid db_oid, Oid rel_filenode,
12781278 tmp_conn = pgut_connect (dbname );
12791279 sprintf (params [0 ], "%i" , tablespace_oid );
12801280 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)" ,
12821282 2 , (const char * * )params , true);
12831283
12841284 if (PQnfields (res ) != 1 )
@@ -1296,7 +1296,7 @@ pg_ptrack_get_and_clear(Oid tablespace_oid, Oid db_oid, Oid rel_filenode,
12961296 */
12971297 sprintf (params [0 ], "%i" , tablespace_oid );
12981298 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)" ,
13001300 2 , (const char * * )params , true);
13011301
13021302 if (PQnfields (res ) != 1 )
@@ -1477,10 +1477,10 @@ wait_replica_wal_lsn(XLogRecPtr lsn, bool is_start_backup)
14771477 if (is_start_backup )
14781478 {
14791479 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()" ,
14811481 0 , NULL , true);
14821482 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()" ,
14841484 0 , NULL , true);
14851485 }
14861486 /*
@@ -1490,10 +1490,10 @@ wait_replica_wal_lsn(XLogRecPtr lsn, bool is_start_backup)
14901490 else
14911491 {
14921492 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()" ,
14941494 0 , NULL , true);
14951495 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()" ,
14971497 0 , NULL , true);
14981498 }
14991499
@@ -1577,7 +1577,7 @@ pg_stop_backup(pgBackup *backup)
15771577 base36enc (backup -> start_time ));
15781578 params [0 ] = name ;
15791579
1580- res = pgut_execute (conn , "SELECT pg_create_restore_point($1)" ,
1580+ res = pgut_execute (conn , "SELECT pg_catalog. pg_create_restore_point($1)" ,
15811581 1 , params , true);
15821582 PQclear (res );
15831583 }
@@ -1602,22 +1602,22 @@ pg_stop_backup(pgBackup *backup)
16021602 */
16031603 sent = pgut_send (conn ,
16041604 "SELECT"
1605- " txid_snapshot_xmax(txid_current_snapshot()),"
1605+ " pg_catalog. txid_snapshot_xmax(pg_catalog. txid_current_snapshot()),"
16061606 " current_timestamp(0)::timestamptz,"
16071607 " lsn,"
16081608 " labelfile,"
16091609 " spcmapfile"
1610- " FROM pg_stop_backup(false)" ,
1610+ " FROM pg_catalog. pg_stop_backup(false)" ,
16111611 0 , NULL , WARNING );
16121612 }
16131613 else
16141614 {
16151615
16161616 sent = pgut_send (conn ,
16171617 "SELECT"
1618- " txid_snapshot_xmax(txid_current_snapshot()),"
1618+ " pg_catalog. txid_snapshot_xmax(pg_catalog. txid_current_snapshot()),"
16191619 " current_timestamp(0)::timestamptz,"
1620- " pg_stop_backup() as lsn" ,
1620+ " pg_catalog. pg_stop_backup() as lsn" ,
16211621 0 , NULL , WARNING );
16221622 }
16231623 pg_stop_backup_is_sent = true;
@@ -2139,8 +2139,8 @@ parse_backup_filelist_filenames(parray *files, const char *root)
21392139 continue ;
21402140 }
21412141
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 )
21442144 {
21452145 if (strcmp (filename , "pg_internal.init" ) == 0 )
21462146 {
@@ -2700,7 +2700,7 @@ get_last_ptrack_lsn(void)
27002700 uint32 xrecoff ;
27012701 XLogRecPtr lsn ;
27022702
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);
27042704
27052705 /* Extract timeline and LSN from results of pg_start_backup() */
27062706 XLogDataFromLSN (PQgetvalue (res , 0 , 0 ), & xlogid , & xrecoff );
@@ -2748,7 +2748,7 @@ pg_ptrack_get_block(backup_files_args *arguments,
27482748 //elog(LOG, "db %i pg_ptrack_get_block(%i, %i, %u)",dbOid, tblsOid, relOid, blknum);
27492749 res = pgut_execute_parallel (arguments -> thread_backup_conn ,
27502750 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)" ,
27522752 4 , (const char * * )params , true);
27532753
27542754 if (PQnfields (res ) != 1 )
0 commit comments