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

Commit305e4bd

Browse files
committed
Expose global snapshot funcs for (user-defined) 2PC on coordinator.
1 parent1896708 commit305e4bd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎src/backend/access/transam/twophase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
25482548
* This function is a counterpart of GlobalSnapshotPrepareCurrent() for
25492549
* twophase transactions.
25502550
*/
2551-
staticGlobalCSN
2551+
GlobalCSN
25522552
GlobalSnapshotPrepareTwophase(constchar*gid)
25532553
{
25542554
GlobalTransactiongxact;
@@ -2619,7 +2619,7 @@ pg_global_snapshot_prepare(PG_FUNCTION_ARGS)
26192619
* This function is a counterpart of GlobalSnapshotAssignCsnCurrent() for
26202620
* twophase transactions.
26212621
*/
2622-
staticvoid
2622+
void
26232623
GlobalSnapshotAssignCsnTwoPhase(constchar*gid,GlobalCSNglobal_csn)
26242624
{
26252625
GlobalTransactiongxact;

‎src/include/access/twophase.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,9 @@ extern void PrepareRedoAdd(char *buf, XLogRecPtr start_lsn,
6161
XLogRecPtrend_lsn,RepOriginIdorigin_id);
6262
externvoidPrepareRedoRemove(TransactionIdxid,boolgiveWarning);
6363
externvoidrestoreTwoPhaseData(void);
64+
65+
/* Global snapshots support for 2PC on coordinator */
66+
externGlobalCSNGlobalSnapshotPrepareTwophase(constchar*gid);
67+
externvoidGlobalSnapshotAssignCsnTwoPhase(constchar*gid,GlobalCSNglobal_csn);
68+
6469
#endif/* TWOPHASE_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp