Re: Docs for 9.4's worker_spi?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Docs for 9.4's worker_spi?
Дата
Msg-id CA+TgmobewAVcMrB-gm29iR5nghkUYfLqTGJpFOn+vr9q116J7w@mail.gmail.com
обсуждение исходный текст
Ответ на Docs for 9.4's worker_spi?  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Docs for 9.4's worker_spi?
Список pgsql-hackers
On Mon, May 5, 2014 at 1:30 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Seems there is no documentation for the 9.4 worker_spi contrib module.  Is
> this OK?  The comment at the top of the C file says:
>
>  *      Sample background worker code that demonstrates various coding
>  *      patterns: establishing a database connection; starting and committing
>  *      transactions; using GUC variables, and heeding SIGHUP to reread
>  *      the configuration file; reporting to pg_stat_activity; using the
>  *      process latch to sleep and exit in case of postmaster death.

worker_spi is not new in 9.4; it was added in 9.3 by Alvaro in commit
da07a1e856511dca59cbb1357616e26baa64428e.  I agree that it should be
documented like all of the other contrib modules, and maybe I need to
be involved in that since I did make some changes in 9.4.

I'm actually pretty uncertain that worker_spi is a particularly good
example of how to write a useful background worker.  The initial
version was awfully buggy and incomplete and I'm not all that sure
we've fixed all of those problems.  Aside from that, now that we have
dynamic background workers and dynamic shared memory, I suspect it's
possible to write something a lot more useful than what we've got here
now, and I think maybe we should do that and then get rid of this
completely.  It's too late to do that for 9.4, but maybe I can pull
something together for 9.5.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg_shmem_allocations view
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Docs for 9.4's worker_spi?