Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit97d3291

Browse files
committed
Merge commit 'cd96f2b374039b468ee4bd53909cf15747ed1e84' into PGPRO9_6
2 parentse19f8be +cd96f2b commit97d3291

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

‎contrib/pg_probackup/backup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void pg_start_backup(const char *label, bool smooth, pgBackup *backup);
6464
staticvoidpg_stop_backup(pgBackup*backup);
6565
staticboolpg_is_standby(void);
6666
staticvoidget_lsn(PGconn*conn,PGresult*res,XLogRecPtr*lsn,boolstop_backup);
67-
staticvoidget_xid(PGresult*res,uint32*xid);
67+
staticvoidget_xid(PGresult*res,TransactionId*xid);
6868
staticvoidpg_ptrack_clear(void);
6969
staticboolpg_ptrack_support(void);
7070
staticboolpg_ptrack_enable(void);
@@ -1042,14 +1042,14 @@ get_lsn(PGconn *conn, PGresult *res, XLogRecPtr *lsn, bool stop_backup)
10421042
* Get XID from result of txid_current() after pg_stop_backup().
10431043
*/
10441044
staticvoid
1045-
get_xid(PGresult*res,uint32*xid)
1045+
get_xid(PGresult*res,TransactionId*xid)
10461046
{
10471047
if (res==NULL||PQntuples(res)!=1||PQnfields(res)!=1)
10481048
elog(ERROR,
10491049
"result of txid_current() is invalid: %s",
10501050
PQerrorMessage(connection));
10511051

1052-
if (sscanf(PQgetvalue(res,0,0),"%u",xid)!=1)
1052+
if (sscanf(PQgetvalue(res,0,0),XID_FMT,xid)!=1)
10531053
{
10541054
elog(ERROR,
10551055
"result of txid_current() is invalid: %s",

‎contrib/pg_probackup/catalog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ catalog_read_ini(const char *path)
337337
{'s',0,"stop-lsn",NULL,SOURCE_ENV },
338338
{'t',0,"start-time",NULL,SOURCE_ENV },
339339
{'t',0,"end-time",NULL,SOURCE_ENV },
340-
{'u',0,"recovery-xid",NULL,SOURCE_ENV },
340+
{'U',0,"recovery-xid",NULL,SOURCE_ENV },
341341
{'t',0,"recovery-time",NULL,SOURCE_ENV },
342342
{'I',0,"data-bytes",NULL,SOURCE_ENV },
343343
{'u',0,"block-size",NULL,SOURCE_ENV },

‎contrib/pg_probackup/pg_probackup.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
#defineDIR_PERMISSION(0700)
4646
#defineFILE_PERMISSION(0600)
4747

48+
#ifndefPGPRO_EE
49+
#defineXID_FMT "%u"
50+
#endif
51+
4852
/* backup mode file */
4953
typedefstructpgFile
5054
{
@@ -119,7 +123,7 @@ typedef struct pgBackup
119123
time_tstart_time;
120124
time_tend_time;
121125
time_trecovery_time;
122-
uint32recovery_xid;
126+
TransactionIdrecovery_xid;
123127

124128
/* Different sizes (-1 means nothing was backed up) */
125129
/*
@@ -159,7 +163,7 @@ typedef struct pgRecoveryTarget
159163
booltime_specified;
160164
time_trecovery_target_time;
161165
boolxid_specified;
162-
unsignedintrecovery_target_xid;
166+
TransactionIdrecovery_target_xid;
163167
boolrecovery_target_inclusive;
164168
}pgRecoveryTarget;
165169

‎contrib/pg_probackup/restore.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ checkIfCreateRecoveryConf(const char *target_time,
775775
constchar*target_inclusive)
776776
{
777777
time_tdummy_time;
778-
unsignedintdummy_xid;
778+
TransactionIddummy_xid;
779779
booldummy_bool;
780780
pgRecoveryTarget*rt;
781781

@@ -798,7 +798,11 @@ checkIfCreateRecoveryConf(const char *target_time,
798798
if (target_xid)
799799
{
800800
rt->xid_specified= true;
801-
if (parse_uint32(target_xid,&dummy_xid))
801+
#ifdefPGPRO_EE
802+
if (parse_uint64(target_xid,&dummy_xid))
803+
#else
804+
if (parse_uint32(target_xid,&dummy_xid))
805+
#endif
802806
rt->recovery_target_xid=dummy_xid;
803807
else
804808
elog(ERROR,"cannot create recovery.conf with %s",target_xid);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp