Re[2]: Async_Notify

From: Арсен Арутюнян <arutar(at)bk(dot)ru>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re[2]: Async_Notify
Date: 2019-12-13 11:30:21
Message-ID: 1576236621.238859707@f116.i.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I'm trying to send a notification from the PG extension directly.
It turns out the mechanism that is used in the async file. (Async_Notify) does not suit me since the function uses oldcontext = MemoryContextSwitchTo (CurTransactionContext); and MemoryContextSwitchTo (oldcontext);
And I did not find the ability to add notification except the Async_Notify function.
 
Now only SPI_execute works ("NOTIFY chanel,’message’", false, 0);
 
P.S. In my extension, there is already a higher function started with oldcontext = MemoryContextSwitchTo (CurTransactionContext); and MemoryContextSwitchTo (oldcontext);
 
   
>Пятница, 13 декабря 2019, 12:19 +03:00 от Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

>Hi  
>pá 13. 12. 2019 v 10:00 odesílatel Арсен Арутюнян < arutar(at)bk(dot)ru > napsal:
>>Hello! I wrote my extension for PG and am trying to run Async_Notify from it. But messages come very late! Sometimes only after I execute the notify command from the shell. What am I doing wrong? How to use Async_Notify correctly.
>> 

>I am not sure what mechanism do you use.

>Notify messages are send after successful  end of transaction.

>Regards

>Pavel

>>--
>>Арсен Арутюнян
 
 
--
Арсен Арутюнян
 

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-12-13 12:16:49 Re: Re[2]: Async_Notify
Previous Message k.jamison@fujitsu.com 2019-12-13 10:18:46 RE: [Patch] Optimize dropping of relation buffers using dlist