本文整理汇总了C++中ItemPointerToString函数的典型用法代码示例。如果您正苦于以下问题:C++ ItemPointerToString函数的具体用法?C++ ItemPointerToString怎么用?C++ ItemPointerToString使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ItemPointerToString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PersistentStore_GetFreeTuple
static bool PersistentStore_GetFreeTuple(
PersistentStoreData *storeData,
PersistentStoreSharedData *storeSharedData,
ItemPointer freeTid)
{
ItemPointerData previousFreeTid;
MemSet(freeTid, 0, sizeof(ItemPointerData));
if (Debug_persistent_store_print)
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_GetFreeTuple: Enter: maximum free order number " INT64_FORMAT ", free TID %s ('%s')",
storeSharedData->maxFreeOrderNum,
ItemPointerToString(&storeSharedData->freeTid),
storeData->tableName);
if (storeSharedData->maxFreeOrderNum == 0)
{
return false; /* No free tuples. */
}
if (gp_persistent_skip_free_list)
{
if (Debug_persistent_store_print)
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_GetFreeTuple: Skipping because gp_persistent_skip_free_list GUC is ON ('%s')",
storeData->tableName);
return false; /* Pretend no free tuples. */
}
Assert(storeSharedData->freeTid.ip_posid != 0);
if (!PersistentStore_ValidateFreeTID(
storeData,
storeSharedData,
&previousFreeTid))
return false;
*freeTid = storeSharedData->freeTid;
storeSharedData->maxFreeOrderNum--;
ItemPointerCopy(&previousFreeTid /* previousFreeTid set inside the ValidateFreeTID function */,
&storeSharedData->freeTid);
if (Debug_persistent_store_print)
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_GetFreeTuple: Exit: maximum free order number " INT64_FORMAT ", free TID %s ('%s')",
storeSharedData->maxFreeOrderNum,
ItemPointerToString(&storeSharedData->freeTid),
storeData->tableName);
if (validate_previous_free_tid &&
!PersistentStore_ValidateFreeTID(
storeData,
storeSharedData,
&previousFreeTid))
return false;
return true;
}
示例2: PersistentEndXactRec_Print
void PersistentEndXactRec_Print(
char *procName,
PersistentEndXactRecObjects *objects)
{
int i;
elog(Persistent_DebugPrintLevel(),
"%s: file-system action count %d, Append-Only mirror resync EOFs count %d",
procName,
objects->typed.fileSysActionInfosCount,
objects->typed.appendOnlyMirrorResyncEofsCount);
for (i = 0; i < objects->typed.fileSysActionInfosCount; i++)
{
PersistentEndXactFileSysActionInfo *fileSysActionInfos =
&objects->typed.fileSysActionInfos[i];
elog(Persistent_DebugPrintLevel(),
"%s: [%d] action '%s' %s, relation storage manager '%s', persistent serial num " INT64_FORMAT ", TID %s",
procName,
i,
PersistentEndXactFileSysAction_Name(fileSysActionInfos->action),
PersistentFileSysObjName_TypeAndObjectName(&fileSysActionInfos->fsObjName),
PersistentFileSysRelStorageMgr_Name(fileSysActionInfos->relStorageMgr),
fileSysActionInfos->persistentSerialNum,
ItemPointerToString(&fileSysActionInfos->persistentTid));
}
for (i = 0; i < objects->typed.appendOnlyMirrorResyncEofsCount; i++)
{
PersistentEndXactAppendOnlyMirrorResyncEofs *eofs =
&objects->typed.appendOnlyMirrorResyncEofs[i];
elog(Persistent_DebugPrintLevel(),
"%s: [%d] Append-Only Mirror Resync EOFs %u/%u/%u, segment file #%d -- persistent serial num " INT64_FORMAT ", TID %s, mirror loss EOF " INT64_FORMAT ", mirror new EOF " INT64_FORMAT,
procName,
i,
eofs->relFileNode.spcNode,
eofs->relFileNode.dbNode,
eofs->relFileNode.relNode,
eofs->segmentFileNum,
eofs->persistentSerialNum,
ItemPointerToString(&eofs->persistentTid),
eofs->mirrorLossEof,
eofs->mirrorNewEof);
}
}
示例3: AppendOnlyMirrorResyncEofs_Remove
static void
AppendOnlyMirrorResyncEofs_Remove(char *procName,
AppendOnlyMirrorResyncEofs *entry)
{
Assert(AppendOnlyMirrorResyncEofsTable != NULL);
if (Debug_persistent_print ||
Debug_persistent_appendonly_commit_count_print)
elog(Persistent_DebugPrintLevel(),
"Storage Manager (%s): Remove Append-Only mirror resync eofs entry: "
"%u/%u/%u, segment file #%d, relation name '%s' (transaction nest level %d, persistent TID %s, persistent serial number " INT64_FORMAT ", mirror catchup required %s, saved mirror new EOF " INT64_FORMAT ")",
procName,
entry->key.relFileNode.spcNode,
entry->key.relFileNode.dbNode,
entry->key.relFileNode.relNode,
entry->key.segmentFileNum,
(entry->relationName == NULL ? "<null>" : entry->relationName),
entry->key.nestLevel,
ItemPointerToString(&entry->persistentTid),
entry->persistentSerialNum,
(entry->mirrorCatchupRequired ? "true" : "false"),
entry->mirrorNewEof);
if (entry->relationName != NULL)
pfree(entry->relationName);
hash_search(AppendOnlyMirrorResyncEofsTable,
(void *) &entry->key,
HASH_REMOVE,
NULL);
}
示例4: DatabaseInfo_Trace
/*
* DatabaseInfo_Trace()
* Output debugging information about the DatabaseInfo
*/
void DatabaseInfo_Trace(DatabaseInfo *info)
{
int t;
int sr;
int rsf;
int grn;
int m;
for (t = 0; t < info->tablespacesCount; t++)
elog(WARNING, "Database Info: Tablespace #%d is %u",
t, info->tablespaces[t]);
for (sr = 0; sr < info->pgClassStoredRelationsCount; sr++)
elog(WARNING, "Database Info: Stored relation (tablespace %u, relation %u, isBufferPoolRealtion %s, TID %s)",
info->pgClassStoredRelations[sr].tablespaceRelFile.tablespace,
info->pgClassStoredRelations[sr].tablespaceRelFile.relation,
(info->pgClassStoredRelations[sr].isBufferPoolRelation ? "true" : "false"),
ItemPointerToString(&info->pgClassStoredRelations[sr].pgClassTid));
for (rsf = 0; rsf < info->relSegFilesCount; rsf++)
elog(WARNING, "Database Info: Relation segment file (tablespace %u, relation %u, segment file num %d)",
info->relSegFiles[rsf].tablespaceRelFile.tablespace,
info->relSegFiles[rsf].tablespaceRelFile.relation,
info->relSegFiles[rsf].segmentFileNum);
for (grn = 0; grn < info->gpRelationNodesCount; grn++)
elog(WARNING, "Database Info: Tablespace %u, relation %u node information (persistent TID %s, perstent serial number " INT64_FORMAT ")",
info->gpRelationNodes[grn].tablespaceRelFile.tablespace,
info->gpRelationNodes[grn].tablespaceRelFile.relation,
ItemPointerToString(&info->gpRelationNodes[grn].persistentTid),
info->gpRelationNodes[grn].persistentSerialNum);
for (m = 0; m < info->miscEntriesCount; m++)
elog(WARNING, "Database Info: Misc entry #%d (tablespace %u, directory = %s, name '%s')",
m,
info->miscEntries[m].tablespace,
(info->miscEntries[m].isDir ? "true" : "false"),
info->miscEntries[m].name);
}
示例5: PersistentTablespace_Reset
void
PersistentTablespace_Reset(void)
{
WRITE_PERSISTENT_STATE_ORDERED_LOCK_DECLARE;
HASH_SEQ_STATUS stat;
TablespaceDirEntry tablespaceDirEntry;
hash_seq_init(&stat, persistentTablespaceSharedHashTable);
WRITE_PERSISTENT_STATE_ORDERED_LOCK;
WRITE_TABLESPACE_HASH_LOCK;
while (true)
{
TablespaceDirEntry removeTablespaceDirEntry;
PersistentFileSysObjName fsObjName;
tablespaceDirEntry = hash_seq_search(&stat);
if (tablespaceDirEntry == NULL)
break;
PersistentFileSysObjName_SetTablespaceDir(
&fsObjName,
tablespaceDirEntry->key.tablespaceOid);
if (Debug_persistent_print)
elog(Persistent_DebugPrintLevel(),
"Persistent tablespace directory: Resetting '%s' serial number " INT64_FORMAT " at TID %s",
PersistentFileSysObjName_ObjectName(&fsObjName),
tablespaceDirEntry->persistentSerialNum,
ItemPointerToString(&tablespaceDirEntry->persistentTid));
removeTablespaceDirEntry =
(TablespaceDirEntry)
hash_search(persistentTablespaceSharedHashTable,
(void *) &tablespaceDirEntry->key,
HASH_REMOVE,
NULL);
if (removeTablespaceDirEntry == NULL)
elog(ERROR, "Trying to delete entry that does not exist");
}
WRITE_TABLESPACE_HASH_UNLOCK;
WRITE_PERSISTENT_STATE_ORDERED_UNLOCK;
}
示例6: PersistentStore_InsertTuple
static void PersistentStore_InsertTuple(
PersistentStoreData *storeData,
PersistentStoreSharedData *storeSharedData,
Datum *values,
bool flushToXLog,
/* When true, the XLOG record for this change will be flushed to disk. */
ItemPointer persistentTid)
/* TID of the stored tuple. */
{
Relation persistentRel;
#ifdef USE_ASSERT_CHECKING
if (storeSharedData == NULL ||
!PersistentStoreSharedData_EyecatcherIsValid(storeSharedData))
elog(ERROR, "Persistent store shared-memory not valid");
#endif
if (Debug_persistent_store_print)
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_InsertTuple: Going to insert new tuple ('%s', shared data %p)",
storeData->tableName,
storeSharedData);
persistentRel = (*storeData->openRel)();
PersistentStore_DoInsertTuple(
storeData,
storeSharedData,
persistentRel,
values,
flushToXLog,
persistentTid);
(*storeData->closeRel)(persistentRel);
if (Debug_persistent_store_print)
{
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_InsertTuple: Inserted new tuple at TID %s ('%s')",
ItemPointerToString(persistentTid),
storeData->tableName);
(*storeData->printTupleCallback)(
PersistentStore_DebugPrintLevel(),
"STORE INSERT TUPLE",
persistentTid,
values);
}
}
示例7: MirroredBufferPool_BeginBulkLoad
void MirroredBufferPool_BeginBulkLoad(
RelFileNode *relFileNode,
/* The tablespace, database, and relation OIDs for the relation. */
ItemPointer persistentTid,
int64 persistentSerialNum,
MirroredBufferPoolBulkLoadInfo *bulkLoadInfo)
{
MIRROREDLOCK_BUFMGR_DECLARE;
MemSet(bulkLoadInfo, 0, sizeof(MirroredBufferPoolBulkLoadInfo));
// -------- MirroredLock ----------
MIRROREDLOCK_BUFMGR_LOCK;
/*
* Make this call while under the MirroredLock (unless we are a resync worker).
*/
bulkLoadInfo->mirrorDataLossTrackingState =
FileRepPrimary_GetMirrorDataLossTrackingSessionNum(
&bulkLoadInfo->mirrorDataLossTrackingSessionNum);
MIRROREDLOCK_BUFMGR_UNLOCK;
// -------- MirroredLock ----------
bulkLoadInfo->relFileNode = *relFileNode;
bulkLoadInfo->persistentTid = *persistentTid;
bulkLoadInfo->persistentSerialNum = persistentSerialNum;
if (Debug_persistent_print)
{
SUPPRESS_ERRCONTEXT_DECLARE;
SUPPRESS_ERRCONTEXT_PUSH();
elog(Persistent_DebugPrintLevel(),
"MirroredBufferPool_BeginBulkLoad %u/%u/%u: mirror data loss tracking (state '%s', session num " INT64_FORMAT "), persistent serial num " INT64_FORMAT ", TID %s",
relFileNode->spcNode,
relFileNode->dbNode,
relFileNode->relNode,
MirrorDataLossTrackingState_Name(bulkLoadInfo->mirrorDataLossTrackingState),
bulkLoadInfo->mirrorDataLossTrackingSessionNum,
persistentSerialNum,
ItemPointerToString(persistentTid));
SUPPRESS_ERRCONTEXT_POP();
}
}
示例8: PersistentRelation_Reset
void PersistentRelation_Reset(void)
{
HASH_SEQ_STATUS stat;
RelationDirEntry relationDirEntry;
hash_seq_init(&stat, persistentRelationSharedHashTable);
while (true)
{
RelationDirEntry removeRelationDirEntry;
PersistentFileSysObjName fsObjName;
RelFileNode relFileNode;
relationDirEntry = hash_seq_search(&stat);
if (relationDirEntry == NULL)
{
break;
}
relFileNode.spcNode = relationDirEntry->key.tablespaceOid;
relFileNode.dbNode = relationDirEntry->key.databaseOid;
relFileNode.relNode = relationDirEntry->key.relfilenodeOid;
PersistentFileSysObjName_SetRelationDir(
&fsObjName,
&relFileNode,
is_tablespace_shared);
if (Debug_persistent_print)
{
elog(Persistent_DebugPrintLevel(),
"Persistent relation directory: Resetting '%s' serial number " INT64_FORMAT " at TID %s",
PersistentFileSysObjName_ObjectName(&fsObjName),
relationDirEntry->persistentSerialNum,
ItemPointerToString(&relationDirEntry->persistentTid));
}
removeRelationDirEntry = (RelationDirEntry)
hash_search(persistentRelationSharedHashTable,
(void *) &relationDirEntry->key,
HASH_REMOVE,
NULL);
if (removeRelationDirEntry == NULL)
{
elog(ERROR, "Trying to delete entry that does not exist");
}
}
}
示例9: PersistentStore_FreeTuple
void PersistentStore_FreeTuple(
PersistentStoreData *storeData,
PersistentStoreSharedData *storeSharedData,
ItemPointer persistentTid,
/* TID of the stored tuple. */
Datum *freeValues,
bool flushToXLog)
/* When true, the XLOG record for this change will be flushed to disk. */
{
Relation persistentRel;
XLogRecPtr xlogEndLoc;
/* The end location of the UPDATE XLOG record. */
Assert( LWLockHeldByMe(PersistentObjLock) );
#ifdef USE_ASSERT_CHECKING
if (storeSharedData == NULL ||
!PersistentStoreSharedData_EyecatcherIsValid(storeSharedData))
elog(ERROR, "Persistent store shared-memory not valid");
#endif
if (Debug_persistent_store_print)
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_FreeTuple: Going to free tuple at TID %s ('%s', shared data %p)",
ItemPointerToString(persistentTid),
storeData->tableName,
storeSharedData);
Assert(ItemPointerIsValid(persistentTid));
persistentRel = (*storeData->openRel)();
simple_heap_delete_xid(persistentRel, persistentTid, FrozenTransactionId);
/*
* XLOG location of the UPDATE tuple's XLOG record.
*/
xlogEndLoc = XLogLastInsertEndLoc();
(*storeData->closeRel)(persistentRel);
storeSharedData->inUseCount--;
if (flushToXLog)
{
XLogFlush(xlogEndLoc);
XLogRecPtr_Zero(&nowaitXLogEndLoc);
}
else
nowaitXLogEndLoc = xlogEndLoc;
}
示例10: PersistentDatabase_Reset
extern void PersistentDatabase_Reset(void)
{
DatabaseDirEntry databaseDirEntry;
databaseDirEntry = NULL;
SharedOidSearch_Iterate(
&persistentDatabaseSharedData->databaseDirSearchTable,
(SharedOidSearchObjHeader**)&databaseDirEntry);
while (true)
{
PersistentFileSysObjName fsObjName;
DatabaseDirEntry nextDatabaseDirEntry;
if (databaseDirEntry == NULL)
{
break;
}
PersistentFileSysObjName_SetDatabaseDir(
&fsObjName,
/* tablespaceOid */ databaseDirEntry->header.oid2,
/* databaseOid */ databaseDirEntry->header.oid1,
NULL);
if (Debug_persistent_print)
elog(Persistent_DebugPrintLevel(),
"Persistent database directory: Resetting '%s' serial number " INT64_FORMAT " at TID %s",
PersistentFileSysObjName_ObjectName(&fsObjName),
databaseDirEntry->persistentSerialNum,
ItemPointerToString(&databaseDirEntry->persistentTid));
nextDatabaseDirEntry = databaseDirEntry;
SharedOidSearch_Iterate(
&persistentDatabaseSharedData->databaseDirSearchTable,
(SharedOidSearchObjHeader**)&nextDatabaseDirEntry);
SharedOidSearch_Delete(
&persistentDatabaseSharedData->databaseDirSearchTable,
&databaseDirEntry->header);
databaseDirEntry = nextDatabaseDirEntry;
}
}
示例11: PersistentStore_InitScanAddFreeEntry
static void PersistentStore_InitScanAddFreeEntry(
PersistentStoreData *storeData,
PersistentStoreSharedData *storeSharedData,
ItemPointer persistentTid,
ItemPointer previousFreeTid,
int64 freeOrderNum)
{
PersistentFreeEntryKey key;
PersistentFreeEntry *entry;
bool found;
if (PersistentStore_IsZeroTid(persistentTid))
{
PersistentStore_DiagnoseDumpTable(storeData, storeSharedData);
elog(ERROR, "Expected persistent TID to not be (0,0)");
}
if (PersistentStore_IsZeroTid(previousFreeTid))
{
elog(ERROR, "Expected previous free TID to not be (0,0)");
}
if (freeEntryHashTable == NULL)
PersistentStore_FreeEntryHashTableInit();
MemSet(&key, 0, sizeof(key));
key.persistentTid = *persistentTid;
entry =
(PersistentFreeEntry*)
hash_search(freeEntryHashTable,
(void *) &key,
HASH_ENTER,
&found);
if (found)
{
PersistentStore_DiagnoseDumpTable(storeData, storeSharedData);
elog(ERROR, "Duplicate free persistent TID entry %s",
ItemPointerToString(persistentTid));
}
entry->previousFreeTid = *previousFreeTid;
entry->freeOrderNum = freeOrderNum;
}
示例12: PersistentFilespace_Reset
void PersistentFilespace_Reset(void)
{
HASH_SEQ_STATUS stat;
FilespaceDirEntry filespaceDirEntry;
hash_seq_init(&stat, persistentFilespaceSharedHashTable);
while (true)
{
FilespaceDirEntry removeFilespaceDirEntry;
PersistentFileSysObjName fsObjName;
filespaceDirEntry = hash_seq_search(&stat);
if (filespaceDirEntry == NULL)
break;
PersistentFileSysObjName_SetFilespaceDir(
&fsObjName,
filespaceDirEntry->key.filespaceOid,
is_filespace_shared);
if (Debug_persistent_print)
elog(Persistent_DebugPrintLevel(),
"Persistent filespace directory: Resetting '%s' serial number " INT64_FORMAT " at TID %s",
PersistentFileSysObjName_ObjectName(&fsObjName),
filespaceDirEntry->persistentSerialNum,
ItemPointerToString(&filespaceDirEntry->persistentTid));
removeFilespaceDirEntry =
(FilespaceDirEntry)
hash_search(persistentFilespaceSharedHashTable,
(void *) &filespaceDirEntry->key,
HASH_REMOVE,
NULL);
if (removeFilespaceDirEntry == NULL)
elog(ERROR, "Trying to delete entry that does not exist");
}
}
示例13: GlobalSequence_ReadTuple
static void GlobalSequence_ReadTuple(
GpGlobalSequence gpGlobalSequence,
int64 *currentSequenceNum)
{
Relation gpGlobalSequenceRel;
bool nulls[Anum_gp_global_sequence_sequence_num];
Datum values[Anum_gp_global_sequence_sequence_num];
HeapTupleData globalSequenceTuple;
Buffer buffer;
gpGlobalSequenceRel =
DirectOpen_GpGlobalSequenceOpenShared();
GlobalSequence_MakeTid(
gpGlobalSequence,
&globalSequenceTuple.t_self);
if (!heap_fetch(gpGlobalSequenceRel, SnapshotAny,
&globalSequenceTuple, &buffer, false, NULL))
elog(ERROR, "Failed to fetch global sequence tuple at %s",
ItemPointerToString(&globalSequenceTuple.t_self));
heap_deform_tuple(
&globalSequenceTuple,
gpGlobalSequenceRel->rd_att,
values,
nulls);
GpGlobalSequence_GetValues(
values,
currentSequenceNum);
ReleaseBuffer(buffer);
DirectOpen_GpGlobalSequenceClose(gpGlobalSequenceRel);
}
示例14: PersistentTablespace_MarkCreatePending
//.........这里部分代码省略.........
PersistentTablespace_MarkCreatePending(
Oid filespaceOid,
/* The filespace where the tablespace lives. */
Oid tablespaceOid,
/* The tablespace OID for the create. */
MirroredObjectExistenceState mirrorExistenceState,
ItemPointer persistentTid,
/* TID of the gp_persistent_rel_files tuple for the rel file */
int64 *persistentSerialNum,
bool flushToXLog)
/* When true, the XLOG record for this change will be flushed to disk. */
{
WRITE_PERSISTENT_STATE_ORDERED_LOCK_DECLARE;
PersistentFileSysObjName fsObjName;
TablespaceDirEntry tablespaceDirEntry;
TransactionId topXid;
if (Persistent_BeforePersistenceWork())
{
if (Debug_persistent_print)
elog(Persistent_DebugPrintLevel(),
"Skipping persistent tablespace %u because we are before persistence work",
tablespaceOid);
return;
/*
* The initdb process will load the persistent table once we out of
* bootstrap mode.
*/
}
PersistentTablespace_VerifyInitScan();
PersistentFileSysObjName_SetTablespaceDir(&fsObjName, tablespaceOid);
topXid = GetTopTransactionId();
WRITE_PERSISTENT_STATE_ORDERED_LOCK;
PersistentTablespace_AddTuple(
filespaceOid,
tablespaceOid,
PersistentFileSysState_CreatePending,
/* createMirrorDataLossTrackingSessionNum */ 0,
mirrorExistenceState,
/* reserved */ 0,
/* parentXid */ topXid,
flushToXLog,
persistentTid,
persistentSerialNum);
WRITE_TABLESPACE_HASH_LOCK;
tablespaceDirEntry =
PersistentTablespace_CreateEntryUnderLock(filespaceOid, tablespaceOid);
Assert(tablespaceDirEntry != NULL);
tablespaceDirEntry->state = PersistentFileSysState_CreatePending;
ItemPointerCopy(persistentTid, &tablespaceDirEntry->persistentTid);
tablespaceDirEntry->persistentSerialNum = *persistentSerialNum;
WRITE_TABLESPACE_HASH_UNLOCK;
/*
* This XLOG must be generated under the persistent write-lock.
*/
#ifdef MASTER_MIRROR_SYNC
mmxlog_log_create_tablespace(
filespaceOid,
tablespaceOid);
#endif
SIMPLE_FAULT_INJECTOR(FaultBeforePendingDeleteTablespaceEntry);
/*
* MPP-18228 To make adding 'Create Pending' entry to persistent table and
* adding to the PendingDelete list atomic
*/
PendingDelete_AddCreatePendingEntryWrapper(
&fsObjName,
persistentTid,
*persistentSerialNum);
WRITE_PERSISTENT_STATE_ORDERED_UNLOCK;
if (Debug_persistent_print)
elog(Persistent_DebugPrintLevel(),
"Persistent tablespace directory: Add '%s' in state 'Created', mirror existence state '%s', serial number " INT64_FORMAT " at TID %s",
PersistentFileSysObjName_ObjectName(&fsObjName),
MirroredObjectExistenceState_Name(mirrorExistenceState),
*persistentSerialNum,
ItemPointerToString(persistentTid));
}
示例15: PersistentStore_InsertTuple
static void PersistentStore_InsertTuple(
PersistentStoreData *storeData,
PersistentStoreSharedData *storeSharedData,
Datum *values,
bool flushToXLog,
/* When true, the XLOG record for this change will be flushed to disk. */
ItemPointer persistentTid)
/* TID of the stored tuple. */
{
Relation persistentRel;
#ifdef USE_ASSERT_CHECKING
if (storeSharedData == NULL ||
!PersistentStoreSharedData_EyecatcherIsValid(storeSharedData))
elog(ERROR, "Persistent store shared-memory not valid");
#endif
if (Debug_persistent_store_print)
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_InsertTuple: Going to insert new tuple ('%s', shared data %p)",
storeData->tableName,
storeSharedData);
persistentRel = (*storeData->openRel)();
PersistentStore_DoInsertTuple(
storeData,
storeSharedData,
persistentRel,
values,
flushToXLog,
persistentTid);
#ifdef FAULT_INJECTOR
if (FaultInjector_InjectFaultIfSet(SyncPersistentTable,
DDLNotSpecified,
"" /* databaseName */,
"" /* tableName */)== FaultInjectorTypeSkip)
{
FlushRelationBuffers(persistentRel);
smgrimmedsync(persistentRel->rd_smgr);
}
#endif
(*storeData->closeRel)(persistentRel);
if (Debug_persistent_store_print)
{
elog(PersistentStore_DebugPrintLevel(),
"PersistentStore_InsertTuple: Inserted new tuple at TID %s ('%s')",
ItemPointerToString(persistentTid),
storeData->tableName);
(*storeData->printTupleCallback)(
PersistentStore_DebugPrintLevel(),
"STORE INSERT TUPLE",
persistentTid,
values);
}
}