Skip to content

Commit

Permalink
Add simple fetch for VAR_OID_PREFETCH
Browse files Browse the repository at this point in the history
  • Loading branch information
timchang514 committed Jan 17, 2024
1 parent c1570bc commit 8d8bb1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backend/access/transam/varsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,14 @@ GetNewObjectId(void)
return result;
}

/*
* Simple function to get VAR_OID_PREFETCH when needed outside of this file.
*/
int GetVarOidPrefetch(void)
{
return VAR_OID_PREFETCH;
}

/*
* SetNextObjectId
*
Expand Down
2 changes: 2 additions & 0 deletions src/include/access/transam.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ extern bool ForceTransactionIdLimitUpdate(void);
extern Oid GetNewObjectId(void);
extern void StopGeneratingPinnedObjectIds(void);

extern int GetVarOidPrefetch(void);

typedef void (*GetNewObjectId_hook_type) (VariableCache variableCache);
extern PGDLLIMPORT GetNewObjectId_hook_type GetNewObjectId_hook;

Expand Down

0 comments on commit 8d8bb1f

Please sign in to comment.