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: "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-11 07:21:29
Message-ID: OSAPR01MB50732BCC8366D548755D5062FE5A0@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 writing an extension running on background workers and found
> get_database_name() causes SEGV and found internally resource owner was
> wet to NULL. Could anybody let me know how it happens and how I can use
> this function. Argument to get_database_name() looks correct.

Did you specify BGWORKER_BACKGROUND_DATABASE_CONNECTION when registering the background worker?
Did you start transaction by calling StartTransactionCommand()?

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ROS Didier 2019-12-11 07:26:29 RE: get_database_name() from background worker
Previous Message Koichi Suzuki 2019-12-11 06:38:03 get_database_name() from background worker