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

From Koichi Suzuki
Subject Re: get_database_name() from background worker
Date
Msg-id CABWPsHG4nTJrbDzi6eggNn8B-O9H9B_Rt0LYWH_PpJxWPLjD9A@mail.gmail.com
Whole thread Raw
In response to RE: get_database_name() from background worker  (ROS Didier <didier.ros@edf.fr>)
Responses Re: get_database_name() from background worker  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Not using this extension, sorry.
---
Koichi Suzuki


2019年12月11日(水) 16:26 ROS Didier <didier.ros@edf.fr>:
Hi
        I would like to know : Are you using pg_background extension to work with backgroud workers ?

        Thanks in advance

Best Regards

Didier ROS
Expertise SGBD
EDF - DTEO - DSIT - IT DMA


-----Message d'origine-----
De : tsunakawa.takay@fujitsu.com [mailto:tsunakawa.takay@fujitsu.com]
Envoyé : mercredi 11 décembre 2019 08:21
À : 'Koichi Suzuki' <koichi@2ndquadrant.com>
Cc : pgsql-hackers@lists.postgresql.org
Objet : RE: get_database_name() from background worker

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





Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

pgsql-hackers by date:

Previous
From: Koichi Suzuki
Date:
Subject: Re: get_database_name() from background worker
Next
From: Peter Eisentraut
Date:
Subject: Re: about allow_system_table_mods and SET STATISTICS