On 26 October 2016 at 06:56, Chapman Flack <c...@anastigmatix.net> wrote:
> My main question is, what state do I need to examine at startup
> in order to distinguish these cases?
For loaded in shared_preload_libraries, test
IsPostmasterEnvironment && !IsUnderPostmaster
> Do I detect I'm in a BGW by
> a non-null MyBgworkerEntry?
Use IsBackgroundWorker, same place as above.
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: