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.