Would a BGW need shmem_access or database_connection to enumerate databases?

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Would a BGW need shmem_access or database_connection to enumerate databases?
Date: 2017-11-29 22:48:16
Message-ID: 214143fa-eb18-f875-257e-4d3127eae902@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm thinking of writing a background worker that will enumerate
the databases present, and spin off, for each one, another BGW
that will establish a connection and do stuff.

For the "master" one, what capabilities will it need to simply
enumerate the current names of known databases? I suppose I could
have it connect to the null dbname and query pg_database. Would
that be the civilized way to do it, or am I missing a simpler way?

-Chap

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-11-29 22:49:19 Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
Previous Message Daniel Gustafsson 2017-11-29 22:40:49 Re: [HACKERS] Refactoring identifier checks to consistently use strcmp