RE: get_database_name() from background worker

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: 'Koichi Suzuki' <koichi(at)2ndquadrant(dot)com>
Cc: ROS Didier <didier(dot)ros(at)edf(dot)fr>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: get_database_name() from background worker
Date: 2019-12-12 01:04:28
Message-ID: OSAPR01MB50731135DADE11BF9749FECFFE550@OSAPR01MB5073.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Koichi Suzuki <koichi(at)2ndquadrant(dot)com>
> I'm not using this. Is this the must to use get_database_name()?

I don't think pg_background is a must, but the system catalog access by get_database_name() should require database connection and transaction. See src/test/modules/worker_spi/worker_spi.c for an example of background worker. That uses both of them.

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2019-12-12 01:20:29 Re: get_database_name() from background worker
Previous Message Tom Lane 2019-12-12 00:14:50 Re: Runtime pruning problem