Обсуждение: Is child process of postmaster able to access all the databases?

Поиск
Список
Период
Сортировка

Is child process of postmaster able to access all the databases?

От
Hubert Zhang
Дата:
Hello all.

background worker can use SPI to read a database, but it can call BackgroundWorkerInitializeConnection(dbname) only once.

I wonder if there is a way to let a child process of postmaster to access all the databases one by one?


--
Thanks

Hubert Zhang

Re: Is child process of postmaster able to access all the databases?

От
Tom Lane
Дата:
Hubert Zhang <hzhang@pivotal.io> writes:
> I wonder if there is a way to let a child process of postmaster to access
> all the databases one by one?

No.  For starters, you'd need some way to flush all database-specific
information from relcache, catcache, and a boatload of other places;
but that logic does not exist.

            regards, tom lane