Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d98f67c

Browse files
committed
reload cache after all backends disconnected
1 parent 68543b7 commit d98f67c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

init.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ HTAB *relations = NULL;
1818
HTAB *range_restrictions = NULL;
1919
bool initialization_needed = true;
2020

21-
typedef struct ShmemConfig
22-
{
23-
bool config_loaded;
24-
} ShmemConfig;
25-
ShmemConfig *shmem_cfg;
26-
2721
static FmgrInfo *qsort_type_cmp_func;
2822
static bool globalByVal;
2923

@@ -34,12 +28,8 @@ static int cmp_range_entries(const void *p1, const void *p2);
3428
void
3529
init_shmem_config()
3630
{
37-
bool found;
3831
create_relations_hashtable();
3932
create_range_restrictions_hashtable();
40-
shmem_cfg = (ShmemConfig *)
41-
ShmemInitStruct("pathman shmem config", sizeof(ShmemConfig), &found);
42-
shmem_cfg->config_loaded = false;
4333
}
4434

4535
/*
@@ -54,12 +44,11 @@ load_config(void)
5444
new_segment_created = init_dsm_segment(INITIAL_BLOCKS_COUNT, 32);
5545

5646
/* if config is not loaded */
57-
if (shmem_cfg && !shmem_cfg->config_loaded)
47+
if (new_segment_created)
5848
{
5949
LWLockAcquire(load_config_lock, LW_EXCLUSIVE);
6050
load_relations_hashtable(new_segment_created);
6151
LWLockRelease(load_config_lock);
62-
shmem_cfg->config_loaded = true;
6352
}
6453
}
6554

0 commit comments

Comments
 (0)