aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-04-09 16:39:30 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-04-09 16:39:30 -0400
commit08e785436f84f8824149a2182b0cb9ce2c28e31d (patch)
treeedcc85eee9bbfae0bd19d87e471d5c979ca5eabd /src/backend/access
parent80cf18910c8edf2575c306dde9ead192bdb0863a (diff)
downloadpostgresql-08e785436f84f8824149a2182b0cb9ce2c28e31d.tar.gz
postgresql-08e785436f84f8824149a2182b0cb9ce2c28e31d.zip
Get rid of GenericXLogUnregister().
This routine is unsafe as implemented, because it invalidates the page image pointers returned by previous GenericXLogRegister() calls. Rather than complicate the API or the implementation to avoid that, let's just get rid of it; the use-case for having it seems much too thin to justify a lot of work here. While at it, do some wordsmithing on the SGML docs for generic WAL.
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/transam/generic_xlog.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/backend/access/transam/generic_xlog.c b/src/backend/access/transam/generic_xlog.c
index a32f1711cf3..7092d372523 100644
--- a/src/backend/access/transam/generic_xlog.c
+++ b/src/backend/access/transam/generic_xlog.c
@@ -258,35 +258,6 @@ GenericXLogRegister(GenericXLogState *state, Buffer buffer, bool isNew)
}
/*
- * Unregister particular buffer for generic xlog record.
- *
- * XXX this is dangerous and should go away.
- */
-void
-GenericXLogUnregister(GenericXLogState *state, Buffer buffer)
-{
- int block_id;
-
- /* Find block in array to unregister */
- for (block_id = 0; block_id < MAX_GENERIC_XLOG_PAGES; block_id++)
- {
- if (state->pages[block_id].buffer == buffer)
- {
- /*
- * Preserve order of pages in array because it could matter for
- * concurrency.
- */
- memmove(&state->pages[block_id], &state->pages[block_id + 1],
- (MAX_GENERIC_XLOG_PAGES - block_id - 1) * sizeof(PageData));
- state->pages[MAX_GENERIC_XLOG_PAGES - 1].buffer = InvalidBuffer;
- return;
- }
- }
-
- elog(ERROR, "registered generic xlog buffer not found");
-}
-
-/*
* Apply changes represented by GenericXLogState to the actual buffers,
* and emit a generic xlog record.
*/