Skip to content

Commit fa96fbe

Browse files
committed
PG-1444 Remove dead code for relation key deletion redo
This code is dead and there is no plan to re-use it any time soon.
1 parent ca37d73 commit fa96fbe

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

Diff for: contrib/pg_tde/src/access/pg_tde_xlog.c

-14
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ tdeheap_rmgr_redo(XLogReaderState *record)
5454

5555
pg_tde_write_key_map_entry_redo(&xlrec->mapEntry, &xlrec->pkInfo);
5656
}
57-
else if (info == XLOG_TDE_REMOVE_RELATION_KEY)
58-
{
59-
RelFileLocator *xlrec = (RelFileLocator *) XLogRecGetData(record);
60-
61-
pg_tde_free_key_map_entry(xlrec, 0);
62-
}
6357
else if (info == XLOG_TDE_ADD_PRINCIPAL_KEY)
6458
{
6559
TDESignedPrincipalKeyInfo *mkey = (TDESignedPrincipalKeyInfo *) XLogRecGetData(record);
@@ -101,12 +95,6 @@ tdeheap_rmgr_desc(StringInfo buf, XLogReaderState *record)
10195

10296
appendStringInfo(buf, "rel: %u/%u/%u", xlrec->mapEntry.spcOid, xlrec->pkInfo.data.databaseId, xlrec->mapEntry.relNumber);
10397
}
104-
else if (info == XLOG_TDE_REMOVE_RELATION_KEY)
105-
{
106-
RelFileLocator *xlrec = (RelFileLocator *) XLogRecGetData(record);
107-
108-
appendStringInfo(buf, "rel: %u/%u/%u", xlrec->spcOid, xlrec->dbOid, xlrec->relNumber);
109-
}
11098
else if (info == XLOG_TDE_ADD_PRINCIPAL_KEY)
11199
{
112100
TDEPrincipalKeyInfo *xlrec = (TDEPrincipalKeyInfo *) XLogRecGetData(record);
@@ -140,8 +128,6 @@ tdeheap_rmgr_identify(uint8 info)
140128
{
141129
case XLOG_TDE_ADD_RELATION_KEY:
142130
return "ADD_RELATION_KEY";
143-
case XLOG_TDE_REMOVE_RELATION_KEY:
144-
return "REMOVE_RELATION_KEY";
145131
case XLOG_TDE_ADD_PRINCIPAL_KEY:
146132
return "ADD_PRINCIPAL_KEY";
147133
case XLOG_TDE_ROTATE_PRINCIPAL_KEY:

Diff for: contrib/pg_tde/src/include/access/pg_tde_xlog.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515

1616
/* TDE XLOG record types */
1717
#define XLOG_TDE_ADD_RELATION_KEY 0x00
18-
#define XLOG_TDE_REMOVE_RELATION_KEY 0x10
19-
#define XLOG_TDE_ADD_PRINCIPAL_KEY 0x20
20-
#define XLOG_TDE_ROTATE_PRINCIPAL_KEY 0x30
21-
#define XLOG_TDE_WRITE_KEY_PROVIDER 0x40
22-
#define XLOG_TDE_INSTALL_EXTENSION 0x50
18+
#define XLOG_TDE_ADD_PRINCIPAL_KEY 0x10
19+
#define XLOG_TDE_ROTATE_PRINCIPAL_KEY 0x20
20+
#define XLOG_TDE_WRITE_KEY_PROVIDER 0x30
21+
#define XLOG_TDE_INSTALL_EXTENSION 0x40
2322

2423
/* ID 140 is registered for Percona TDE extension: https://wiki.postgresql.org/wiki/CustomWALResourceManagers */
2524
#define RM_TDERMGR_ID 140

0 commit comments

Comments
 (0)