1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-01 01:04:50 +03:00

Fix some long-obsolete references to XLogOpenRelation.

These were missed in commit a213f1ee6c5a1bbe1f074ca201975e76ad2ed50c,
which removed that function.
This commit is contained in:
Tom Lane 2011-12-17 18:26:52 -05:00
parent 85df5dbf5a
commit dd45d3ad33
2 changed files with 3 additions and 5 deletions

View File

@ -481,8 +481,7 @@ rdata array, even if some of the rdata items point into the buffer. This is
because you don't want XLogInsert to log the whole page contents. The because you don't want XLogInsert to log the whole page contents. The
standard replay-routine pattern for this case is standard replay-routine pattern for this case is
reln = XLogOpenRelation(rnode); buffer = XLogReadBuffer(rnode, blkno, true);
buffer = XLogReadBuffer(reln, blkno, true);
Assert(BufferIsValid(buffer)); Assert(BufferIsValid(buffer));
page = (Page) BufferGetPage(buffer); page = (Page) BufferGetPage(buffer);
@ -501,8 +500,7 @@ The standard replay-routine pattern for this case is
if (record->xl_info & XLR_BKP_BLOCK_n) if (record->xl_info & XLR_BKP_BLOCK_n)
<< do nothing, page was rewritten from logged copy >>; << do nothing, page was rewritten from logged copy >>;
reln = XLogOpenRelation(rnode); buffer = XLogReadBuffer(rnode, blkno, false);
buffer = XLogReadBuffer(reln, blkno, false);
if (!BufferIsValid(buffer)) if (!BufferIsValid(buffer))
<< do nothing, page has been deleted >>; << do nothing, page has been deleted >>;
page = (Page) BufferGetPage(buffer); page = (Page) BufferGetPage(buffer);

View File

@ -505,7 +505,7 @@ smgr_redo(XLogRecPtr lsn, XLogRecord *record)
/* /*
* Forcibly create relation if it doesn't exist (which suggests that * Forcibly create relation if it doesn't exist (which suggests that
* it was dropped somewhere later in the WAL sequence). As in * it was dropped somewhere later in the WAL sequence). As in
* XLogOpenRelation, we prefer to recreate the rel and replay the log * XLogReadBuffer, we prefer to recreate the rel and replay the log
* as best we can until the drop is seen. * as best we can until the drop is seen.
*/ */
smgrcreate(reln, MAIN_FORKNUM, true); smgrcreate(reln, MAIN_FORKNUM, true);