Re: get_database_name() from background worker

2019-12-12 Thread Craig Ringer
On Thu, 12 Dec 2019 at 16:21, ROS Didier wrote: > 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 . > >

RE: get_database_name() from background worker

2019-12-12 Thread ROS Didier
origine- De : tsunakawa.ta...@fujitsu.com [mailto:tsunakawa.ta...@fujitsu.com] Envoyé : jeudi 12 décembre 2019 02:04 À : 'Koichi Suzuki' Cc : ROS Didier ; pgsql-hackers@lists.postgresql.org Objet : RE: get_database_name() from background worker From: Koichi Suzuki > I'm not usin

Re: get_database_name() from background worker

2019-12-11 Thread Craig Ringer
On Wed, 11 Dec 2019 at 14:38, Koichi Suzuki wrote: > Hello PG hackers; > > 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 >

RE: get_database_name() from background worker

2019-12-11 Thread tsunakawa.ta...@fujitsu.com
From: Koichi Suzuki > 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 o

Re: get_database_name() from background worker

2019-12-11 Thread Michael Paquier
On Wed, Dec 11, 2019 at 05:17:00PM +0900, Koichi Suzuki wrote: > Not using this extension, sorry. I have no idea what you are trying to do, but get_database_name() accesses the system cache, which means two things: - The access needs to be done in the context of a transaction. That's a trick we u

RE: get_database_name() from background worker

2019-12-11 Thread ROS Didier
@lists.postgresql.org Objet : Re: get_database_name() from background worker I'm not using this. Is this the must to use get_database_name()? --- Koichi Suzuki 2019年12月11日(水) 16:26 ROS Didier mailto:didier@edf.fr>>: Hi I would like to know : Are you using pg_background extension to

Re: get_database_name() from background worker

2019-12-11 Thread Koichi Suzuki
rtise SGBD > EDF - DTEO - DSIT - IT DMA > > > -Message d'origine- > De : tsunakawa.ta...@fujitsu.com [mailto:tsunakawa.ta...@fujitsu.com] > Envoyé : mercredi 11 décembre 2019 08:21 > À : 'Koichi Suzuki' > Cc : pgsql-hackers@lists.postgresql.org >

Re: get_database_name() from background worker

2019-12-11 Thread Koichi Suzuki
est Regards > > Didier ROS > Expertise SGBD > EDF - DTEO - DSIT - IT DMA > > > -Message d'origine- > De : tsunakawa.ta...@fujitsu.com [mailto:tsunakawa.ta...@fujitsu.com] > Envoyé : mercredi 11 décembre 2019 08:21 > À : 'Koichi Suzuki' > Cc :

RE: get_database_name() from background worker

2019-12-10 Thread ROS Didier
wa.ta...@fujitsu.com] Envoyé : mercredi 11 décembre 2019 08:21 À : 'Koichi Suzuki' Cc : pgsql-hackers@lists.postgresql.org Objet : RE: get_database_name() from background worker From: Koichi Suzuki > I'm writing an extension running on background workers and found > get_database_na

RE: get_database_name() from background worker

2019-12-10 Thread tsunakawa.ta...@fujitsu.com
From: Koichi Suzuki > 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 corr

get_database_name() from background worker

2019-12-10 Thread Koichi Suzuki
Hello PG hackers; 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. Rega