@@ -255,7 +255,6 @@ pg_tde_delete_tde_files(Oid dbOid)
255
255
{
256
256
char db_map_path [MAXPGPATH ] = {0 };
257
257
258
- /* Set the file paths */
259
258
pg_tde_set_db_file_path (dbOid , db_map_path );
260
259
261
260
/* Remove file without emitting any error */
@@ -295,7 +294,6 @@ pg_tde_save_principal_key(const TDEPrincipalKey *principal_key, bool write_xlog)
295
294
char db_map_path [MAXPGPATH ] = {0 };
296
295
TDESignedPrincipalKeyInfo signed_key_Info ;
297
296
298
- /* Set the file paths */
299
297
pg_tde_set_db_file_path (principal_key -> keyInfo .databaseId , db_map_path );
300
298
301
299
ereport (DEBUG2 , errmsg ("pg_tde_save_principal_key" ));
@@ -430,7 +428,6 @@ pg_tde_write_key_map_entry(const RelFileLocator *rlocator, InternalKey *rel_key_
430
428
431
429
Assert (rlocator );
432
430
433
- /* Set the file paths */
434
431
pg_tde_set_db_file_path (rlocator -> dbOid , db_map_path );
435
432
436
433
pg_tde_sign_principal_key_info (& signed_key_Info , principal_key );
@@ -478,7 +475,6 @@ pg_tde_write_key_map_entry(const RelFileLocator *rlocator, InternalKey *rel_key_
478
475
curr_pos = prev_pos ;
479
476
pg_tde_write_one_map_entry (map_fd , & write_map_entry , & prev_pos , db_map_path );
480
477
481
- /* Let's close the file. */
482
478
close (map_fd );
483
479
}
484
480
@@ -496,7 +492,6 @@ pg_tde_write_key_map_entry_redo(const TDEMapEntry *write_map_entry, TDESignedPri
496
492
off_t curr_pos = 0 ;
497
493
off_t prev_pos = 0 ;
498
494
499
- /* Set the file paths */
500
495
pg_tde_set_db_file_path (signed_key_info -> data .databaseId , db_map_path );
501
496
502
497
LWLockAcquire (tde_lwlock_enc_keys (), LW_EXCLUSIVE );
@@ -529,7 +524,6 @@ pg_tde_write_key_map_entry_redo(const TDEMapEntry *write_map_entry, TDESignedPri
529
524
curr_pos = prev_pos ;
530
525
pg_tde_write_one_map_entry (map_fd , write_map_entry , & prev_pos , db_map_path );
531
526
532
- /* Let's close the file. */
533
527
close (map_fd );
534
528
535
529
LWLockRelease (tde_lwlock_enc_keys ());
@@ -716,7 +710,6 @@ pg_tde_write_map_keydata_file(off_t file_size, char *file_data)
716
710
/* Let's get the header. Buff should start with the map file header. */
717
711
fheader = (TDEFileHeader * ) file_data ;
718
712
719
- /* Set the file paths */
720
713
pg_tde_set_db_file_path (fheader -> signed_key_info .data .databaseId , db_map_path );
721
714
722
715
/* Initialize the new file and set the name */
@@ -860,7 +853,6 @@ pg_tde_get_key_from_file(const RelFileLocator *rlocator, uint32 key_type)
860
853
861
854
Assert (rlocator );
862
855
863
- /* Get the file paths */
864
856
pg_tde_set_db_file_path (rlocator -> dbOid , db_map_path );
865
857
866
858
if (access (db_map_path , F_OK ) == -1 )
@@ -1090,7 +1082,6 @@ pg_tde_get_principal_key_info(Oid dbOid)
1090
1082
off_t bytes_read = 0 ;
1091
1083
char db_map_path [MAXPGPATH ] = {0 };
1092
1084
1093
- /* Set the file paths */
1094
1085
pg_tde_set_db_file_path (dbOid , db_map_path );
1095
1086
1096
1087
/*
0 commit comments