From e63dee393a30e0d7e31d46737d9f380771d28beb Mon Sep 17 00:00:00 2001 From: dhwei Date: Thu, 6 Jun 2024 13:58:26 +0800 Subject: [PATCH] bugfix: use raw fd to lseek --- src/access/pg_tde_tdemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/access/pg_tde_tdemap.c b/src/access/pg_tde_tdemap.c index 0f3b1307..3367e668 100644 --- a/src/access/pg_tde_tdemap.c +++ b/src/access/pg_tde_tdemap.c @@ -627,7 +627,7 @@ pg_tde_process_map_entry(const RelFileLocator *rlocator, char *db_map_path, off_ */ if (should_delete == true && *offset > 0) { - curr_pos = lseek(map_file, *offset, SEEK_SET); + curr_pos = lseek(FileGetRawDesc(map_file), *offset, SEEK_SET); if (curr_pos == -1) { @@ -1198,4 +1198,4 @@ pg_tde_write_map_keydata_files(off_t map_size, char *m_file_data, off_t keydata_ LWLockRelease(lock_files); return true; -} \ No newline at end of file +}