8000 Move fixed value to struct initializer · percona/postgres@79c8372 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79c8372

Browse files
committed
Move fixed value to struct initializer
1 parent d67ad2a commit 79c8372

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/pg_tde/src/catalog/tde_principal_key.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ static dshash_parameters principal_key_dsh_params = {
7979
.entry_size = sizeof(TDEPrincipalKey),
8080
.compare_function = dshash_memcmp,
8181
.hash_function = dshash_memhash,
82+
#if PG_VERSION_NUM >= 170000
83+
.copy_function = dshash_memcpy,
84+
#endif
8285
};
8386

8487
static TdePrincipalKeylocalState principalKeyLocalState;
@@ -189,9 +192,6 @@ initialize_objects_in_dsa_area(dsa_area *dsa, void *raw_dsa_area)
189192
sharedState->rawDsaArea = raw_dsa_area;
190193
sharedState->hashTrancheId = LWLockNewTrancheId();
191194
principal_key_dsh_params.tranche_id = sharedState->hashTrancheId;
192-
#if PG_VERSION_NUM >= 170000
193-
principal_key_dsh_params.copy_function = dshash_memcpy;
194-
#endif
195195
dsh = dshash_create(dsa, &principal_key_dsh_params, 0);
196196
sharedState->hashHandle = dshash_get_hash_table_handle(dsh);
197197
dshash_detach(dsh);

0 commit comments

Comments
 (0)
0