Re: pg_init

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Natarajan R <nataraj3098(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_init
Date: 2019-10-09 23:52:17
Message-ID: CAMsr+YFp8QJOeMSBqnKs4sFwu+6EuJuqZOHgv+SBm+zY8crRAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 9 Oct 2019 at 00:33, Natarajan R <nataraj3098(at)gmail(dot)com> wrote:

> I want to read pg_database from pg_init...
>
> Is using heap_open() is possible? or else any other way is there ?
>

It's not possible from _PG_init .

I replied to a similar thread with details on how bgworkers can access
different databases; look at the archives.

The gist is that you have to register a bgworker that attaches to shared
memory and to a database (or use InvalidOid if you only want shared catalog
access), then do your work from there.

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

  • pg_init at 2019-10-08 16:33:03 from Natarajan R

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2019-10-10 00:04:55 Re: Shared memory
Previous Message Craig Ringer 2019-10-09 23:47:46 Re: Transparent Data Encryption (TDE) and encrypted files