Re: LISTEN/NOTIFY ultra slow speed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Арсен Арутюнян <arutar(at)bk(dot)ru>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: LISTEN/NOTIFY ultra slow speed
Date: 2022-03-14 15:29:54
Message-ID: 179961.1647271794@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?B?0JDRgNGB0LXQvSDQkNGA0YPRgtGO0L3Rj9C9?= <arutar(at)bk(dot)ru> writes:
>     Hello! I'm having trouble with LISTEN/NOTIFY speed. Now I have about 100-200 (few?) clients who are actively messaging. But recently I started to notice a drop in speed. Changing the log_min_duration_statement parameter did not show slow queries in the log.
>     As it turned out, the pg_notify(text ,text) function
>           or the
>           NOTIFY text, 'text' queries takes an extremely long time (0.7-1.5sec),
>     but the select pg_notification_queue_usage() query always returns 0.

What PG version is this exactly? What is in $PGDATA/pg_notify/ ?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message George Woodring 2022-03-14 19:59:34 Re: foreign key on delete cascade order?
Previous Message Adrian Klaver 2022-03-14 14:55:50 Re: Restoring using PG_DUMP in PG12 results in