diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-04-12 11:42:06 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-04-12 11:42:06 -0400 |
commit | 5713f03973e26ad6df6df5ac8b9efa0123d68062 (patch) | |
tree | c526803a22b48a7f42cd383ec69a88f9a67e5bed /contrib/bloom/blinsert.c | |
parent | bdf7db81921deb99fd9d489cbcc635906c89e215 (diff) |
Improve API of GenericXLogRegister().
Rename this function to GenericXLogRegisterBuffer() to make it clearer
what it does, and leave room for other sorts of "register" actions in
future. Also, replace its "bool isNew" argument with an integer flags
argument, so as to allow adding more flags in future without an API
break.
Alexander Korotkov, adjusted slightly by me
Diffstat (limited to 'contrib/bloom/blinsert.c')
-rw-r--r-- | contrib/bloom/blinsert.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/bloom/blinsert.c b/contrib/bloom/blinsert.c index 330d7fd7692..4e3fe2feb2e 100644 --- a/contrib/bloom/blinsert.c +++ b/contrib/bloom/blinsert.c @@ -49,7 +49,7 @@ flushCachedPage(Relation index, BloomBuildState *buildstate) GenericXLogState *state; state = GenericXLogStart(index); - page = GenericXLogRegister(state, buffer, true); + page = GenericXLogRegisterBuffer(state, buffer, GENERIC_XLOG_FULL_IMAGE); memcpy(page, buildstate->data, BLCKSZ); GenericXLogFinish(state); UnlockReleaseBuffer(buffer); @@ -221,7 +221,7 @@ blinsert(Relation index, Datum *values, bool *isnull, LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); state = GenericXLogStart(index); - page = GenericXLogRegister(state, buffer, false); + page = GenericXLogRegisterBuffer(state, buffer, 0); if (BloomPageAddItem(&blstate, page, itup)) { @@ -268,7 +268,7 @@ blinsert(Relation index, Datum *values, bool *isnull, state = GenericXLogStart(index); /* get modifiable copy of metapage */ - metaPage = GenericXLogRegister(state, metaBuffer, false); + metaPage = GenericXLogRegisterBuffer(state, metaBuffer, 0); metaData = BloomPageGetMeta(metaPage); if (nStart >= metaData->nEnd) @@ -279,7 +279,7 @@ blinsert(Relation index, Datum *values, bool *isnull, buffer = ReadBuffer(index, blkno); LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); - page = GenericXLogRegister(state, buffer, false); + page = GenericXLogRegisterBuffer(state, buffer, 0); if (BloomPageAddItem(&blstate, page, itup)) { @@ -305,7 +305,7 @@ blinsert(Relation index, Datum *values, bool *isnull, */ buffer = BloomNewBuffer(index); - page = GenericXLogRegister(state, buffer, true); + page = GenericXLogRegisterBuffer(state, buffer, GENERIC_XLOG_FULL_IMAGE); BloomInitPage(page, 0); if (!BloomPageAddItem(&blstate, page, itup)) |