You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Add a variant of txid_current() that returns NULL if no transaction IDis assigned. This version can be used even on a standby server,although it will always return NULL since no transaction IDs can beassigned during recovery.Craig Ringer, per suggestion from Jim Nasby. Reviewed by Petr Jelinekand by me.
Copy file name to clipboardExpand all lines: src/include/catalog/pg_proc.h
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4904,6 +4904,8 @@ DATA(insert OID = 2942 ( txid_snapshot_sendPGNSP PGUID 12 1 0 0 0 f f f f t
4904
4904
DESCR("I/O");
4905
4905
DATA(insert OID = 2943 ( txid_currentPGNSP PGUID 12 1 0 0 0 f f f f t f s u 0 0 20 "" _null_ _null_ _null_ _null_ _null_ txid_current _null_ _null_ _null_ ));
4906
4906
DESCR("get current transaction ID");
4907
+
DATA(insert OID = 3348 ( txid_current_if_assignedPGNSP PGUID 12 1 0 0 0 f f f f t f s u 0 0 20 "" _null_ _null_ _null_ _null_ _null_ txid_current_if_assigned _null_ _null_ _null_ ));
4908
+
DESCR("get current transaction ID");
4907
4909
DATA(insert OID = 2944 ( txid_current_snapshotPGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 2970 "" _null_ _null_ _null_ _null_ _null_ txid_current_snapshot _null_ _null_ _null_ ));
4908
4910
DESCR("get current snapshot");
4909
4911
DATA(insert OID = 2945 ( txid_snapshot_xminPGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 20 "2970" _null_ _null_ _null_ _null_ _null_ txid_snapshot_xmin _null_ _null_ _null_ ));