@@ -67,7 +67,7 @@ static SMgrId OurSMgrId = MaxSMgrId;
67
67
static void tde_smgr_save_temp_key (const RelFileLocator * newrlocator , const InternalKey * key );
68
68
static InternalKey * tde_smgr_get_temp_key (const RelFileLocator * rel );
69
69
static bool tde_smgr_has_temp_key (const RelFileLocator * rel );
70
- static void tde_smgr_remove_temp_key (const RelFileLocator * rel );
70
+ static void tde_smgr_delete_temp_key (const RelFileLocator * rel );
71
71
static void CalcBlockIv (ForkNumber forknum , BlockNumber bn , const unsigned char * base_iv , unsigned char * iv );
72
72
73
73
static void
@@ -77,11 +77,11 @@ tde_smgr_log_create_key(const RelFileLocator *rlocator)
77
77
78
78
XLogBeginInsert ();
79
79
XLogRegisterData ((char * ) & xlrec , sizeof (xlrec ));
80
- XLogInsert (RM_TDERMGR_ID , XLOG_TDE_ADD_RELATION_KEY );
80
+ XLogInsert (RM_TDERMGR_ID , XLOG_TDE_CREATE_RELATION_KEY );
81
81
}
82
82
83
83
static void
84
- tde_smgr_log_delete_key (const RelFileLocator * rlocator )
84
+ tde_smgr_log_delete_leftover_key (const RelFileLocator * rlocator )
85
85
{
86
86
XLogRelKey xlrec = {.rlocator = * rlocator };
87
87
@@ -122,26 +122,26 @@ tde_smgr_create_key_redo(const RelFileLocator *rlocator)
122
122
}
123
123
124
124
static void
125
- tde_smgr_remove_key (const RelFileLocatorBackend * smgr_rlocator )
125
+ tde_smgr_delete_key (const RelFileLocatorBackend * smgr_rlocator )
126
126
{
127
127
if (RelFileLocatorBackendIsTemp (* smgr_rlocator ))
128
- tde_smgr_remove_temp_key (& smgr_rlocator -> locator );
128
+ tde_smgr_delete_temp_key (& smgr_rlocator -> locator );
129
129
else
130
130
pg_tde_free_key_map_entry (smgr_rlocator -> locator );
131
131
}
132
132
133
133
static void
134
- tde_smgr_delete_key (const RelFileLocatorBackend * smgr_rlocator )
134
+ tde_smgr_delete_leftover_key (const RelFileLocatorBackend * smgr_rlocator )
135
135
{
136
136
if (!RelFileLocatorBackendIsTemp (* smgr_rlocator ))
137
137
{
138
138
pg_tde_free_key_map_entry (smgr_rlocator -> locator );
139
- tde_smgr_log_delete_key (& smgr_rlocator -> locator );
139
+ tde_smgr_log_delete_leftover_key (& smgr_rlocator -> locator );
140
140
}
141
141
}
142
142
143
143
void
144
- tde_smgr_delete_key_redo (const RelFileLocator * rlocator )
144
+ tde_smgr_delete_leftover_key_redo (const RelFileLocator * rlocator )
145
145
{
146
146
pg_tde_free_key_map_entry (* rlocator );
147
147
}
@@ -271,7 +271,7 @@ tde_mdunlink(RelFileLocatorBackend rlocator, ForkNumber forknum, bool isRedo)
271
271
if (forknum == MAIN_FORKNUM || forknum == InvalidForkNumber )
272
272
{
273
273
if (tde_smgr_is_encrypted (& rlocator ))
274
- tde_smgr_remove_key (& rlocator );
274
+ tde_smgr_delete_key (& rlocator );
275
275
}
276
276
}
277
277
@@ -391,7 +391,7 @@ tde_mdcreate(RelFileLocator relold, SMgrRelation reln, ForkNumber forknum, bool
391
391
* If we're in redo, a separate WAL record will make sure the key is
392
392
* removed.
393
393
*/
394
- tde_smgr_delete_key (& reln -> smgr_rlocator );
394
+ tde_smgr_delete_leftover_key (& reln -> smgr_rlocator );
395
395
396
396
if (!tde_smgr_should_encrypt (& reln -> smgr_rlocator , & relold ))
397
397
{
@@ -514,7 +514,7 @@ tde_smgr_has_temp_key(const RelFileLocator *rel)
514
514
}
515
515
516
516
static void
517
- tde_smgr_remove_temp_key (const RelFileLocator * rel )
517
+ tde_smgr_delete_temp_key (const RelFileLocator * rel )
518
518
{
519
519
Assert (TempRelKeys );
520
520
hash_search (TempRelKeys , rel , HASH_REMOVE , NULL );
0 commit comments