Page 1 of 1

TUniAlerter causing 2 sessions in Postgresql

Posted: Tue 29 Mar 2022 11:23
by plevrier
Hi all,

I added simple interapplication-messaging into my application using TUniAlerter. It works fine but I get 2 sessions extra per application instance. Is this normal ? I would expect only one extra session.

A simple form with a TUniConnection, TPostgreSQLUniProvider and a TUniAlerter will already show this behaviour.

Regards,
Pascal

Re: TUniAlerter causing 2 sessions in Postgresql

Posted: Thu 31 Mar 2022 11:03
by evgeniym
Hi Pascal!
Thank you for contacting us!
Please note that PostgreSQL has a number of limitations that we cannot influence. In particular, according to the PostgreSQL documentation https://www.postgresql.org/docs/14/sql-listen.html , a separate connection must be opened to listen a channel.

Thus, when using TUniAlerter, two connections are opened, one for listening to the channel, the second one is for sending messages.

Best regards,
Evgeniy