if [ "x$1" = "x1" -o "x$1" = "x2" ]; then
echo "
WARNING: The veil shared library is not defined in shared_preload_libraries
-(which is defined in postgresql.conf) Without this definition Veil will not run
-"
+(which is defined in postgresql.conf) Without this definition you will be
+unable to define veil.dbs_in_cluster, veil.shared_hash_elems, and
+veil.shmem_context_size which will limit the amount of shared memory
+available to veil."
elif [ "x$1" = "x3" ]; then
echo "
WARNING: The version of veil.so in shared_preload_libraries (defined in
preload_library_message ${preload_status}
fi
-exit ${STATUS}
\ No newline at end of file
+exit ${STATUS}
* shared memory. It is initialised in _PG_init() to a lock id that is
* distinct from any that will be dynamically allocated.
*/
-static LWLockId VeilLWLock;
+static LWLockId VeilLWLock = 0;
/**
* The LWLock to be used while initially setting up shared memory and
* allocating a veil database-specific LWLock. Initialised in
* _PG_Init()
*/
-static LWLockId InitialLWLock;
+static LWLockId InitialLWLock = 0;
/**
* Return the index of the other context from the one supplied.
int veil_dbs;
/* See definitions of the following two variables, for comments. */
+ fprintf(stderr, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n");
VeilLWLock = AddinShmemInitLock;
InitialLWLock = AddinShmemInitLock;
/* Define GUCs for veil */
veil_config_init();
veil_dbs = veil_dbs_in_cluster();
-
+
/* Request a Veil-specific shared memory context */
RequestAddinShmemSpace(2 * veil_shmem_context_size() * veil_dbs);
static void
shmalloc_init(void)
{
+ VeilLWLock = AddinShmemInitLock;
+ InitialLWLock = AddinShmemInitLock;
+
if (!shared_meminfo) {
VarEntry *var;
MemContext *context0;