RE: get_database_name() from background worker - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: get_database_name() from background worker
Date
Msg-id OSAPR01MB50732BCC8366D548755D5062FE5A0@OSAPR01MB5073.jpnprd01.prod.outlook.com
Whole thread Raw
In response to get_database_name() from background worker  (Koichi Suzuki <koichi@2ndquadrant.com>)
Responses RE: get_database_name() from background worker
List pgsql-hackers
From: Koichi Suzuki <koichi@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Koichi Suzuki
Date:
Subject: get_database_name() from background worker
Next
From: ROS Didier
Date:
Subject: RE: get_database_name() from background worker