Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion snowflake.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "postgres.h"

#include <time.h>

#include "access/bufmask.h"
#include "access/htup_details.h"
#include "access/multixact.h"
Expand All @@ -35,6 +37,9 @@
#include "catalog/storage_xlog.h"
#include "commands/defrem.h"
#include "commands/sequence.h"
#if PG_VERSION_NUM >= 190000
#include "commands/sequence_xlog.h"
#endif
#include "commands/tablecmds.h"
#include "funcapi.h"
#include "miscadmin.h"
Expand All @@ -61,6 +66,7 @@ PG_MODULE_MAGIC;
*/
#define SEQ_LOG_VALS 32

#if PG_VERSION_NUM < 190000
/*
* The "special area" of a sequence's buffer page looks like this.
*/
Expand All @@ -70,6 +76,7 @@ typedef struct sequence_magic
{
uint32 magic;
} sequence_magic;
#endif

/*
* We store a SeqTable item for every sequence we have touched in the current
Expand Down Expand Up @@ -186,7 +193,6 @@ snowflake_nextval(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("value for snowflake.node is not set")));


/* open and lock sequence */
init_sequence(relid, &elm, &seqrel);
Expand Down
Loading