Definition at line 68 of file pgrowlocks.c.
69{
80
82
83
86
90 errmsg(
"\"%s\" is a partitioned table",
92 errdetail(
"Partitioned tables do not contain rows.")));
96 errmsg(
"\"%s\" is not a table",
101 errmsg(
"only heap AM is supported")));
102
103
104
105
106
111
115
116
119
121
123
125 {
129
130
132
138
139
140
141
143 {
146
150 {
152 int nmembers;
153 bool first = true;
155
157
160 false);
161 if (nmembers == -1)
162 {
166 }
167 else
168 {
170
174
178
179 for (
j = 0;
j < nmembers;
j++)
180 {
182
183 if (!first)
184 {
188 }
191 switch (members[
j].status)
192 {
195 break;
198 break;
201 break;
204 break;
207 break;
210 break;
211 }
216
217 first = false;
218 }
219
223 }
224 }
225 else
226 {
228
231
234 {
240 {
243 else
245 }
246 else
247
249 "{transient upgrade status}");
250 }
251 else
252 {
255 else
257 }
258
262 }
263
265
266
269 }
270 else
271 {
273 }
274 }
275
279}
bool has_privs_of_role(Oid member, Oid role)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult pg_class_aclcheck(Oid table_oid, Oid roleid, AclMode mode)
static Datum values[MAXATTR]
static void LockBuffer(Buffer buffer, BufferLockMode mode)
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
AttInMetadata * TupleDescGetAttInMetadata(TupleDesc tupdesc)
#define PG_GETARG_TEXT_PP(n)
#define DirectFunctionCall1(func, arg1)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
HeapTuple heap_getnext(TableScanDesc sscan, ScanDirection direction)
struct HeapScanDescData * HeapScanDesc
TM_Result HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, Buffer buffer)
#define HEAP_KEYS_UPDATED
static bool HEAP_XMAX_IS_SHR_LOCKED(uint16 infomask)
#define HEAP_XMAX_LOCK_ONLY
static TransactionId HeapTupleHeaderGetRawXmax(const HeapTupleHeaderData *tup)
#define HEAP_XMAX_IS_MULTI
static bool HEAP_XMAX_IS_KEYSHR_LOCKED(uint16 infomask)
static bool HEAP_XMAX_IS_EXCL_LOCKED(uint16 infomask)
static bool HEAP_LOCKED_UPGRADED(uint16 infomask)
char * pstrdup(const char *in)
int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members, bool from_pgupgrade, bool isLockOnly)
@ MultiXactStatusForShare
@ MultiXactStatusForNoKeyUpdate
@ MultiXactStatusNoKeyUpdate
@ MultiXactStatusForUpdate
@ MultiXactStatusForKeyShare
RangeVar * makeRangeVarFromNameList(const List *names)
ObjectType get_relkind_objtype(char relkind)
static char buf[DEFAULT_XLOG_SEG_SIZE]
static Datum PointerGetDatum(const void *X)
static char * DatumGetCString(Datum X)
int BackendXidGetPid(TransactionId xid)
#define RelationGetRelid(relation)
#define RelationGetRelationName(relation)
Snapshot GetActiveSnapshot(void)
Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
void table_close(Relation relation, LOCKMODE lockmode)
static void table_endscan(TableScanDesc scan)
static TableScanDesc table_beginscan(Relation rel, Snapshot snapshot, int nkeys, ScanKeyData *key)
Datum tidout(PG_FUNCTION_ARGS)
void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)
List * textToQualifiedNameList(text *textval)
CommandId GetCurrentCommandId(bool used)
References AccessShareLock, ACL_SELECT, aclcheck_error(), ACLCHECK_NO_PRIV, ACLCHECK_OK, Atnum_ismulti, Atnum_modes, Atnum_pids, Atnum_tid, Atnum_xids, Atnum_xmax, BackendXidGetPid(), buf, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BuildTupleFromCStrings(), DatumGetCString(), DirectFunctionCall1, ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), ForwardScanDirection, get_relkind_objtype(), GetActiveSnapshot(), GetCurrentCommandId(), GetMultiXactIdMembers(), GetUserId(), has_privs_of_role(), heap_getnext(), HEAP_KEYS_UPDATED, HEAP_LOCKED_UPGRADED(), HEAP_XMAX_IS_EXCL_LOCKED(), HEAP_XMAX_IS_KEYSHR_LOCKED(), HEAP_XMAX_IS_MULTI, HEAP_XMAX_IS_SHR_LOCKED(), HEAP_XMAX_LOCK_ONLY, HeapTupleHeaderGetRawXmax(), HeapTupleSatisfiesUpdate(), InitMaterializedSRF(), j, LockBuffer(), makeRangeVarFromNameList(), MultiXactStatusForKeyShare, MultiXactStatusForNoKeyUpdate, MultiXactStatusForShare, MultiXactStatusForUpdate, MultiXactStatusNoKeyUpdate, MultiXactStatusUpdate, NCHARS, palloc(), pg_class_aclcheck(), PG_GETARG_TEXT_PP, PointerGetDatum(), pstrdup(), RelationData::rd_rel, relation_openrv(), RelationGetRelationName, RelationGetRelid, relname, snprintf, HeapTupleData::t_data, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, HeapTupleData::t_self, table_beginscan(), table_close(), table_endscan(), textToQualifiedNameList(), tidout(), TM_BeingModified, TupleDescGetAttInMetadata(), tuplestore_puttuple(), and values.