PostgreSQL Source Code git master
test_multixact.c File Reference
#include "postgres.h"
#include "access/multixact.h"
#include "access/xact.h"
#include "fmgr.h"
Include dependency graph for test_multixact.c:

Go to the source code of this file.

Functions

 PG_FUNCTION_INFO_V1 (test_create_multixact)
 
 PG_FUNCTION_INFO_V1 (test_read_multixact)
 
Datum test_create_multixact (PG_FUNCTION_ARGS)
 
Datum test_read_multixact (PG_FUNCTION_ARGS)
 

Function Documentation

◆ PG_FUNCTION_INFO_V1() [1/2]

PG_FUNCTION_INFO_V1 ( test_create_multixact  )

◆ PG_FUNCTION_INFO_V1() [2/2]

PG_FUNCTION_INFO_V1 ( test_read_multixact  )

◆ test_create_multixact()

Datum test_create_multixact ( PG_FUNCTION_ARGS  )

Definition at line 28 of file test_multixact.c.

29{
30 MultiXactId id;
31
36}
TransactionId MultiXactId
Definition: c.h:670
#define PG_RETURN_TRANSACTIONID(x)
Definition: fmgr.h:364
void MultiXactIdSetOldestMember(void)
Definition: multixact.c:657
MultiXactId MultiXactIdCreate(TransactionId xid1, MultiXactStatus status1, TransactionId xid2, MultiXactStatus status2)
Definition: multixact.c:418
@ MultiXactStatusForShare
Definition: multixact.h:41
@ MultiXactStatusUpdate
Definition: multixact.h:47
TransactionId GetCurrentTransactionId(void)
Definition: xact.c:455

References GetCurrentTransactionId(), MultiXactIdCreate(), MultiXactIdSetOldestMember(), MultiXactStatusForShare, MultiXactStatusUpdate, and PG_RETURN_TRANSACTIONID.

◆ test_read_multixact()

Datum test_read_multixact ( PG_FUNCTION_ARGS  )

Definition at line 42 of file test_multixact.c.

43{
45 MultiXactMember *members;
46
47 /* discard caches */
49
50 if (GetMultiXactIdMembers(id, &members, false, false) == -1)
51 elog(ERROR, "MultiXactId not found");
52
54}
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
#define PG_RETURN_VOID()
Definition: fmgr.h:349
#define PG_GETARG_TRANSACTIONID(n)
Definition: fmgr.h:279
void AtEOXact_MultiXact(void)
Definition: multixact.c:1796
int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members, bool from_pgupgrade, bool isLockOnly)
Definition: multixact.c:1334

References AtEOXact_MultiXact(), elog, ERROR, GetMultiXactIdMembers(), PG_GETARG_TRANSACTIONID, and PG_RETURN_VOID.