]> granicus.if.org Git - postgresql/commitdiff
Fix some long-obsolete references to XLogOpenRelation.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Dec 2011 23:26:52 +0000 (18:26 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Dec 2011 23:26:52 +0000 (18:26 -0500)
These were missed in commit a213f1ee6c5a1bbe1f074ca201975e76ad2ed50c,
which removed that function.

src/backend/access/transam/README
src/backend/catalog/storage.c

index 57b4b9d08b37aee48775a5f644f79140134e3bc5..de72f71ebca69b0b5e27f454d7337d025266e9ab 100644 (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
 standard replay-routine pattern for this case is
 
-       reln = XLogOpenRelation(rnode);
-       buffer = XLogReadBuffer(reln, blkno, true);
+       buffer = XLogReadBuffer(rnode, blkno, true);
        Assert(BufferIsValid(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)
                << do nothing, page was rewritten from logged copy >>;
 
-       reln = XLogOpenRelation(rnode);
-       buffer = XLogReadBuffer(reln, blkno, false);
+       buffer = XLogReadBuffer(rnode, blkno, false);
        if (!BufferIsValid(buffer))
                << do nothing, page has been deleted >>;
        page = (Page) BufferGetPage(buffer);
index d02736117031b787b91969cc8e5a37b576223e75..fff933d403e7ca5e7b551b987e1684cd6a6e98a7 100644 (file)
@@ -505,7 +505,7 @@ smgr_redo(XLogRecPtr lsn, XLogRecord *record)
                /*
                 * Forcibly create relation if it doesn't exist (which suggests that
                 * 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.
                 */
                smgrcreate(reln, MAIN_FORKNUM, true);