* ReadBufferWithoutRelcache -- like ReadBufferExtended, but doesn't require * a relcache entry for the relation. * * NB: At present, this function may only be used on permanent relations, which * is OK, because we only use it during XLOG replay. If in the future we * want to use it on temporary or unlogged relations, we could pass additional * parameters. */
| 867 | * parameters. |
| 868 | */ |
| 869 | Buffer |
| 870 | ReadBufferWithoutRelcache(RelFileNode rnode, ForkNumber forkNum, |
| 871 | BlockNumber blockNum, ReadBufferMode mode, |
| 872 | BufferAccessStrategy strategy) |
| 873 | { |
| 874 | bool hit; |
| 875 | |
| 876 | /* |
| 877 | * Use default SMGR implementation when opening a relation backed by |
| 878 | * shared buffers |
| 879 | */ |
| 880 | SMgrRelation smgr = smgropen(rnode, InvalidBackendId, 0, NULL); |
| 881 | |
| 882 | Assert(InRecovery); |
| 883 | |
| 884 | return ReadBuffer_common(smgr, RELPERSISTENCE_PERMANENT, forkNum, blockNum, |
| 885 | mode, strategy, &hit); |
| 886 | } |
| 887 | |
| 888 | |
| 889 | /* |
no test coverage detected