@@ -93,7 +93,6 @@ typedef struct DSMRegistryEntry
9393{
9494char name [NAMEDATALEN ];
9595DSMREntryType type ;
96- bool initialized ;
9796union
9897{
9998NamedDSMState dsm ;
@@ -217,7 +216,6 @@ GetNamedDSMSegment(const char *name, size_t size,
217216dsm_segment * seg ;
218217
219218entry -> type = DSMR_ENTRY_TYPE_DSM ;
220- entry -> initialized = false;
221219
222220/* Initialize the segment. */
223221seg = dsm_create (size ,0 );
@@ -230,21 +228,13 @@ GetNamedDSMSegment(const char *name, size_t size,
230228
231229if (init_callback )
232230(* init_callback ) (ret );
233-
234- entry -> initialized = true;
235231}
236232else if (entry -> type != DSMR_ENTRY_TYPE_DSM )
237233ereport (ERROR ,
238- (errmsg ("requested DSM segment \"%s\" does not match type of existing entry" ,
239- name )));
240- else if (!entry -> initialized )
241- ereport (ERROR ,
242- (errmsg ("requested DSM segment \"%s\" failed initialization" ,
243- name )));
234+ (errmsg ("requested DSM segment does not match type of existing entry" )));
244235else if (entry -> dsm .size != size )
245236ereport (ERROR ,
246- (errmsg ("requested DSM segment \"%s\" does not match size of existing entry" ,
247- name )));
237+ (errmsg ("requested DSM segment size does not match size of existing segment" )));
248238else
249239{
250240NamedDSMState * state = & entry -> dsm ;
@@ -307,7 +297,6 @@ GetNamedDSA(const char *name, bool *found)
307297NamedDSAState * state = & entry -> dsa ;
308298
309299entry -> type = DSMR_ENTRY_TYPE_DSA ;
310- entry -> initialized = false;
311300
312301/* Initialize the LWLock tranche for the DSA. */
313302state -> tranche = LWLockNewTrancheId (name );
@@ -319,17 +308,10 @@ GetNamedDSA(const char *name, bool *found)
319308
320309/* Store handle for other backends to use. */
321310state -> handle = dsa_get_handle (ret );
322-
323- entry -> initialized = true;
324311}
325312else if (entry -> type != DSMR_ENTRY_TYPE_DSA )
326313ereport (ERROR ,
327- (errmsg ("requested DSA \"%s\" does not match type of existing entry" ,
328- name )));
329- else if (!entry -> initialized )
330- ereport (ERROR ,
331- (errmsg ("requested DSA \"%s\" failed initialization" ,
332- name )));
314+ (errmsg ("requested DSA does not match type of existing entry" )));
333315else
334316{
335317NamedDSAState * state = & entry -> dsa ;
@@ -390,7 +372,6 @@ GetNamedDSHash(const char *name, const dshash_parameters *params, bool *found)
390372dsa_area * dsa ;
391373
392374entry -> type = DSMR_ENTRY_TYPE_DSH ;
393- entry -> initialized = false;
394375
395376/* Initialize the LWLock tranche for the hash table. */
396377dsh_state -> tranche = LWLockNewTrancheId (name );
@@ -408,17 +389,10 @@ GetNamedDSHash(const char *name, const dshash_parameters *params, bool *found)
408389/* Store handles for other backends to use. */
409390dsh_state -> dsa_handle = dsa_get_handle (dsa );
410391dsh_state -> dsh_handle = dshash_get_hash_table_handle (ret );
411-
412- entry -> initialized = true;
413392}
414393else if (entry -> type != DSMR_ENTRY_TYPE_DSH )
415394ereport (ERROR ,
416- (errmsg ("requested DSHash \"%s\" does not match type of existing entry" ,
417- name )));
418- else if (!entry -> initialized )
419- ereport (ERROR ,
420- (errmsg ("requested DSHash \"%s\" failed initialization" ,
421- name )));
395+ (errmsg ("requested DSHash does not match type of existing entry" )));
422396else
423397{
424398NamedDSHState * dsh_state = & entry -> dsh ;