RE: get_database_name() from background worker

From: ROS Didier <didier(dot)ros(at)edf(dot)fr>
To: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, "'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-12 08:21:03
Message-ID: 80fcaf2a456946a7a6cfa230d93a5f35@PCYINTPEXMU001.NEOPROD.EDF.FR
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi
With pg_background extension ,it is possible to make "autonomous transaction" which means possibility to commit in a transaction.
It is like a client which connects to a postgresql instance. So you can execute any sql orders .

Best Regards
Didier ROS
-----Message d'origine-----
De : tsunakawa(dot)takay(at)fujitsu(dot)com [mailto:tsunakawa(dot)takay(at)fujitsu(dot)com]
Envoyé : jeudi 12 décembre 2019 02:04
À : '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
Objet : RE: get_database_name() from background worker

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

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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-12-12 08:33:32 Re: Add .editorconfig
Previous Message Amit Kapila 2019-12-12 06:43:50 Re: Wrong assert in TransactionGroupUpdateXidStatus