Skip to content

Commit

Permalink
Merge pull request #271 from dutow/nofork
Browse files Browse the repository at this point in the history
PG-981: Renamed PERCONA_FORK to PERCONA_EXT
  • Loading branch information
dutow authored Sep 3, 2024
2 parents 99e3770 + b9a0def commit 6970853
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/access/pg_tde_xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "access/pg_tde_tdemap.h"
#include "access/pg_tde_xlog.h"
#include "encryption/enc_tde.h"
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
#include "catalog/tde_global_space.h"

static char *TDEXLogEncryptBuf = NULL;
Expand Down Expand Up @@ -140,7 +140,7 @@ tdeheap_rmgr_identify(uint8 info)
return NULL;
}

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT

/*
* -------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/catalog/tde_global_space.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "postgres.h"

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT

#include "catalog/pg_tablespace_d.h"
#include "nodes/pg_list.h"
Expand Down Expand Up @@ -181,4 +181,4 @@ create_principal_key(const char *key_name, GenericKeyring * keyring,

return principalKey;
}
#endif /* PERCONA_FORK */
#endif /* PERCONA_EXT */
2 changes: 1 addition & 1 deletion src/catalog/tde_principal_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ pg_tde_rotate_principal_key_internal(PG_FUNCTION_ARGS)
ensure_new_key = PG_GETARG_BOOL(2);
is_global = PG_GETARG_BOOL(3);

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
if (is_global)
{
dbOid = GLOBAL_DATA_TDE_OID;
Expand Down
4 changes: 2 additions & 2 deletions src/include/access/pg_tde_xlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "postgres.h"
#include "access/xlog.h"
#include "access/xlog_internal.h"
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
#include "access/xlog_smgr.h"
#endif

Expand All @@ -38,7 +38,7 @@ static const RmgrData tdeheap_rmgr = {
.rm_identify = tdeheap_rmgr_identify
};

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT

/* XLog encryption staff */

Expand Down
8 changes: 4 additions & 4 deletions src/pg_tde.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "utils/builtins.h"
#include "pg_tde_defs.h"
#include "smgr/pg_tde_smgr.h"
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
#include "catalog/tde_global_space.h"
#endif

Expand Down Expand Up @@ -66,7 +66,7 @@ tde_shmem_request(void)
Size sz = TdeRequiredSharedMemorySize();
int required_locks = TdeRequiredLocksCount();

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
sz = add_size(sz, XLOG_TDE_ENC_BUFF_ALIGNED_SIZE);
#endif

Expand All @@ -86,7 +86,7 @@ tde_shmem_startup(void)
TdeShmemInit();
AesInit();

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
TDEInitGlobalKeys();

TDEXLogShmemInit();
Expand All @@ -105,7 +105,7 @@ _PG_init(void)
keyringRegisterVariables();
InitializePrincipalKeyInfo();
InitializeKeyProviderInfo();
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
XLogInitGUC();
#endif
prev_shmem_request_hook = shmem_request_hook;
Expand Down
4 changes: 2 additions & 2 deletions src/pg_tde_event_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Datum
pg_tde_ddl_command_start_capture(PG_FUNCTION_ARGS)
{
/* TODO: verify update_compare_indexes failure related to this */
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
EventTriggerData *trigdata;
Node *parsetree;

Expand Down Expand Up @@ -117,7 +117,7 @@ pg_tde_ddl_command_start_capture(PG_FUNCTION_ARGS)
Datum
pg_tde_ddl_command_end_capture(PG_FUNCTION_ARGS)
{
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
/* Ensure this function is being called as an event trigger */
if (!CALLED_AS_EVENT_TRIGGER(fcinfo)) /* internal error */
ereport(ERROR,
Expand Down
4 changes: 2 additions & 2 deletions src/smgr/pg_tde_smgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "access/pg_tde_tdemap.h"
#include "pg_tde_event_capture.h"

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT

// TODO: implement proper IV
// iv should be based on blocknum + relfile, available in the API
Expand Down Expand Up @@ -222,4 +222,4 @@ void RegisterStorageMgr(void)
void RegisterStorageMgr(void)
{
}
#endif /* PERCONA_FORK */
#endif /* PERCONA_EXT */
4 changes: 2 additions & 2 deletions src16/access/pg_tdeam_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include "utils/rel.h"

PG_FUNCTION_INFO_V1(pg_tdeam_basic_handler);
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
PG_FUNCTION_INFO_V1(pg_tdeam_handler);
#endif

Expand Down Expand Up @@ -2637,7 +2637,7 @@ pg_tdeam_basic_handler(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(&pg_tdeam_methods);
}

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
Datum
pg_tdeam_handler(PG_FUNCTION_ARGS)
{
Expand Down
4 changes: 2 additions & 2 deletions src17/access/pg_tdeam_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#include "utils/rel.h"

PG_FUNCTION_INFO_V1(pg_tdeam_basic_handler);
#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
PG_FUNCTION_INFO_V1(pg_tdeam_handler);
#endif

Expand Down Expand Up @@ -2684,7 +2684,7 @@ pg_tdeam_basic_handler(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(&pg_tdeam_methods);
}

#ifdef PERCONA_FORK
#ifdef PERCONA_EXT
Datum
pg_tdeam_handler(PG_FUNCTION_ARGS)
{
Expand Down

0 comments on commit 6970853

Please sign in to comment.