@@ -98,7 +98,7 @@ typedef struct DSMRegistryEntry
98
98
NamedDSMState dsm ;
99
99
NamedDSAState dsa ;
100
100
NamedDSHState dsh ;
101
- }data ;
101
+ };
102
102
}DSMRegistryEntry ;
103
103
104
104
static const dshash_parameters dsh_params = {
@@ -212,7 +212,7 @@ GetNamedDSMSegment(const char *name, size_t size,
212
212
entry = dshash_find_or_insert (dsm_registry_table ,name ,found );
213
213
if (!(* found ))
214
214
{
215
- NamedDSMState * state = & entry -> data . dsm ;
215
+ NamedDSMState * state = & entry -> dsm ;
216
216
dsm_segment * seg ;
217
217
218
218
entry -> type = DSMR_ENTRY_TYPE_DSM ;
@@ -232,12 +232,12 @@ GetNamedDSMSegment(const char *name, size_t size,
232
232
else if (entry -> type != DSMR_ENTRY_TYPE_DSM )
233
233
ereport (ERROR ,
234
234
(errmsg ("requested DSM segment does not match type of existing entry" )));
235
- else if (entry -> data . dsm .size != size )
235
+ else if (entry -> dsm .size != size )
236
236
ereport (ERROR ,
237
237
(errmsg ("requested DSM segment size does not match size of existing segment" )));
238
238
else
239
239
{
240
- NamedDSMState * state = & entry -> data . dsm ;
240
+ NamedDSMState * state = & entry -> dsm ;
241
241
dsm_segment * seg ;
242
242
243
243
/* If the existing segment is not already attached, attach it now. */
@@ -294,7 +294,7 @@ GetNamedDSA(const char *name, bool *found)
294
294
entry = dshash_find_or_insert (dsm_registry_table ,name ,found );
295
295
if (!(* found ))
296
296
{
297
- NamedDSAState * state = & entry -> data . dsa ;
297
+ NamedDSAState * state = & entry -> dsa ;
298
298
299
299
entry -> type = DSMR_ENTRY_TYPE_DSA ;
300
300
@@ -314,7 +314,7 @@ GetNamedDSA(const char *name, bool *found)
314
314
(errmsg ("requested DSA does not match type of existing entry" )));
315
315
else
316
316
{
317
- NamedDSAState * state = & entry -> data . dsa ;
317
+ NamedDSAState * state = & entry -> dsa ;
318
318
319
319
if (dsa_is_attached (state -> handle ))
320
320
ereport (ERROR ,
@@ -367,7 +367,7 @@ GetNamedDSHash(const char *name, const dshash_parameters *params, bool *found)
367
367
entry = dshash_find_or_insert (dsm_registry_table ,name ,found );
368
368
if (!(* found ))
369
369
{
370
- NamedDSHState * dsh_state = & entry -> data . dsh ;
370
+ NamedDSHState * dsh_state = & entry -> dsh ;
371
371
dshash_parameters params_copy ;
372
372
dsa_area * dsa ;
373
373
@@ -395,7 +395,7 @@ GetNamedDSHash(const char *name, const dshash_parameters *params, bool *found)
395
395
(errmsg ("requested DSHash does not match type of existing entry" )));
396
396
else
397
397
{
398
- NamedDSHState * dsh_state = & entry -> data . dsh ;
398
+ NamedDSHState * dsh_state = & entry -> dsh ;
399
399
dsa_area * dsa ;
400
400
401
401
/* XXX: Should we verify params matches what table was created with? */
@@ -447,7 +447,7 @@ pg_get_dsm_registry_allocations(PG_FUNCTION_ARGS)
447
447
* attaching to them, return NULL for those.
448
448
*/
449
449
if (entry -> type == DSMR_ENTRY_TYPE_DSM )
450
- vals [2 ]= Int64GetDatum (entry -> data . dsm .size );
450
+ vals [2 ]= Int64GetDatum (entry -> dsm .size );
451
451
else
452
452
nulls [2 ]= true;
453
453