Definition at line 69 of file pgrowlocks.c.
70{
81
83
84
87
91 errmsg(
"\"%s\" is a partitioned table",
93 errdetail(
"Partitioned tables do not contain rows.")));
97 errmsg(
"\"%s\" is not a table",
102 errmsg(
"only heap AM is supported")));
103
104
105
106
107
112
116
117
120
122
124
126 {
130
131
133
139
140
141
142
144 {
147
151 {
153 int nmembers;
154 bool first = true;
156
158
161 false);
162 if (nmembers == -1)
163 {
167 }
168 else
169 {
171
175
179
180 for (
j = 0;
j < nmembers;
j++)
181 {
183
184 if (!first)
185 {
189 }
192 switch (members[
j].status)
193 {
196 break;
199 break;
202 break;
205 break;
208 break;
211 break;
212 }
217
218 first = false;
219 }
220
224 }
225 }
226 else
227 {
229
232
235 {
241 {
244 else
246 }
247 else
248
250 "{transient upgrade status}");
251 }
252 else
253 {
256 else
258 }
259
263 }
264
266
267
270 }
271 else
272 {
274 }
275 }
276
280}
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 errcode(int sqlerrcode)
int errdetail(const char *fmt,...) pg_attribute_printf(1
#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, uint32 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, uint32 flags)
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, SO_NONE, 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.