Skip to content

Commit eb36d1a

Browse files
committed
Fix oversight in RelFileNodeBackend patch: CreateFakeRelcacheEntry needs to
initialize the rd_backend field of a fake Relation entry correctly. Fortunately, that is easy, since only non-temp relations should ever be mentioned in the WAL stream.
1 parent ac791d3 commit eb36d1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/access/transam/xlogutils.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/backend/access/transam/xlogutils.c,v 1.72 2010/08/13 20:10:50 rhaas Exp $
14+
* $PostgreSQL: pgsql/src/backend/access/transam/xlogutils.c,v 1.73 2010/08/30 16:46:23 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -377,6 +377,8 @@ CreateFakeRelcacheEntry(RelFileNode rnode)
377377

378378
rel->rd_rel = &fakeentry->pgc;
379379
rel->rd_node = rnode;
380+
/* We will never be working with temp rels during recovery */
381+
rel->rd_backend = InvalidBackendId;
380382

381383
/* We don't know the name of the relation; use relfilenode instead */
382384
sprintf(RelationGetRelationName(rel), "%u", rnode.relNode);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy