Problems running the WorkerSpi sample

From: <david(at)andl(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Problems running the WorkerSpi sample
Date: 2016-04-26 06:04:10
Message-ID: 00f301d19f81$754af7e0$5fe0e7a0$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I’ve been trying to get the WorkerSpi sample working on a Windows installation, VS 2015, x64. So far, the following problems.

1. Does not compile OOB. Added the following lines.

PGDLLEXPORT void _PG_init(void);

PGDLLEXPORT Datum worker_spi_launch(PG_FUNCTION_ARGS);

PGDLLEXPORT void worker_spi_main(Datum);

2. Two warnings about int usage. Ignored.

3. Documentation is a bit light on, but copying the control file into the right folder makes the extension visible.

4. Extension installs but does nothing. No log messages. No schema. No table.

The variable worker_spi.naptime appears in pg_settings but worker_spi.total_workers does not.

5. Extension uninstalls without error, but does not release the DLL.

6. Tried to restart server with pg_ctl but it does nothing. No error, no log message, nada. [Is this a known problem with Windows?]

7. Restarted server using Task Manager. And so back to the beginning and try again.

The worker_spi.c code contains this sequence:

DefineCustomIntVariable("worker_spi.naptime",

"Duration between each check (in seconds).",

<omitted>

if (!process_shared_preload_libraries_in_progress)

return;

DefineCustomIntVariable("worker_spi.total_workers",

"Number of workers.",

From this I deduce that process_shared_preload_libraries_in_progress was false. So this appears to be an extension that must be preloaded. That does not seem to be documented anywhere.

It would be helpful to get some suggestions about what changes would be needed to allow it to be loaded on demand.

Regards

David M Bennett FACS

_____

Andl - A New Database Language - andl.org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shulgin, Oleksandr 2016-04-26 07:40:48 Re: Add relcreated (timestamp) column to pg_class catalog to record the time an object was created
Previous Message Alvaro Herrera 2016-04-26 02:40:00 Re: Add relcreated (timestamp) column to pg_class catalog to record the time an object was created