PostgreSQL Source Code git master
Loading...
Searching...
No Matches
test_multixact.c
Go to the documentation of this file.
1/*--------------------------------------------------------------------------
2 *
3 * test_multixact.c
4 * Support code for multixact testing
5 *
6 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 * IDENTIFICATION
10 * src/test/modules/test_slru/test_multixact.c
11 *
12 * -------------------------------------------------------------------------
13 */
14
15#include "postgres.h"
16
17#include "access/multixact.h"
18#include "access/xact.h"
19#include "fmgr.h"
20
23
24/*
25 * Produces multixact with 2 current xids
26 */
37
38/*
39 * Reads given multixact. Discards local cache to make a real read.
40 */
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}
TransactionId MultiXactId
Definition c.h:676
#define ERROR
Definition elog.h:39
#define elog(elevel,...)
Definition elog.h:226
#define PG_RETURN_VOID()
Definition fmgr.h:350
#define PG_FUNCTION_INFO_V1(funcname)
Definition fmgr.h:417
#define PG_RETURN_TRANSACTIONID(x)
Definition fmgr.h:366
#define PG_GETARG_TRANSACTIONID(n)
Definition fmgr.h:280
#define PG_FUNCTION_ARGS
Definition fmgr.h:193
void MultiXactIdSetOldestMember(void)
Definition multixact.c:537
MultiXactId MultiXactIdCreate(TransactionId xid1, MultiXactStatus status1, TransactionId xid2, MultiXactStatus status2)
Definition multixact.c:299
void AtEOXact_MultiXact(void)
Definition multixact.c:1568
int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members, bool from_pgupgrade, bool isLockOnly)
Definition multixact.c:1113
@ MultiXactStatusForShare
Definition multixact.h:39
@ MultiXactStatusUpdate
Definition multixact.h:45
uint64_t Datum
Definition postgres.h:70
Datum test_create_multixact(PG_FUNCTION_ARGS)
Datum test_read_multixact(PG_FUNCTION_ARGS)
TransactionId GetCurrentTransactionId(void)
Definition xact.c:455