Skip to content

Commit 15bf8bf

Browse files

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/writer_direct.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,16 +672,20 @@ open_data_file(
672672
#else
673673
RelFileNodeBackend bknode;
674674
bknode.node = rnode;
675-
#endif
675+
#endif /* PG_VERSION_NUM >= 160000 */
676676
#if PG_VERSION_NUM >= 170000
677677
bknode.backend = istemp ? MyBackendType : InvalidCommandId;
678678
#else
679679
bknode.backend = istemp ? MyBackendId : InvalidBackendId;
680-
#endif
680+
#endif /* PG_VERSION_NUM >= 170000 */
681+
#if PG_VERSION_NUM >= 180000
682+
fname = pstrdup(relpath(bknode, MAIN_FORKNUM).str);
683+
#else
681684
fname = relpath(bknode, MAIN_FORKNUM);
685+
#endif /* PG_VERSION_NUM >= 180000 */
682686
#else
683687
fname = relpath(rnode, MAIN_FORKNUM);
684-
#endif
688+
#endif /* PG_VERSION_NUM >= 90100 */
685689
segno = blknum / RELSEG_SIZE;
686690
if (segno > 0)
687691
{

0 commit comments

Comments
 (0)