worker_spi.naptime in worker_spi example

From: Jeremy Finzel <finzelj(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: worker_spi.naptime in worker_spi example
Date: 2018-03-15 14:59:43
Message-ID: CAMa1XUgWQAFm+UFdrystTR2J0A4YnM7WB2EzoeBeB2oiS0NBFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I am trying to create a background worker where I can pass in via SQL
interface the naptime. I'm not sure how to do this. In the worker_spi
example, _PG_init creates a configuration using the static variable
worker_spi_naptime, but then it appears to call in worker_spi_main in the
WaitLatch function the same variable worker_spi_naptime without referencing
the configuration created in _PG_init. Am I missing something here?

I could see how to pass in an int for naptime via the SQL interface but I'm
not sure what the function is of this configuration.

Thanks!
Jeremy

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-03-15 15:01:56 Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath
Previous Message Ildar Musin 2018-03-15 14:31:50 Re: using index or check in ALTER TABLE SET NOT NULL