| From: | Martijn van Oosterhout <kleptog(at)gmail(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: [PATCH] Improve performance of NOTIFY over many databases (v2) | 
| Date: | 2019-09-17 07:39:22 | 
| Message-ID: | CADWG95umrPAFAsALaggMFYAodLar10MMJdFHipC7gGLoS-p7kg@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hoi Tom,
On Mon, 16 Sep 2019 at 15:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Martijn van Oosterhout <kleptog(at)gmail(dot)com> writes:
> > I think I like the idea of having SignalBackend do the waking up a
> > slow backend but I'm not enthused by the "lets wake up (at once)
> > everyone that is behind". That's one of the issues I was explicitly
> > trying to solve. If there are any significant number of "slow"
> > backends then we get the "thundering herd" again.
>
> But do we care?  With asyncQueueAdvanceTail gone from the listeners,
> there's no longer an exclusive lock for them to contend on.  And,
> again, I failed to see any significant contention even in HEAD as it
> stands; so I'm unconvinced that you're solving a live problem.
You're right, they only acquire a shared lock which is much less of a
problem. And I forgot that we're still reducing the load from a few
hundred signals and exclusive locks per NOTIFY to perhaps a dozen
shared locks every thousand messages. You'd be hard pressed to
demonstrate there's a real problem here.
So I think your patch is fine as is.
Looking at the release cycle it looks like the earliest either of
these patches will appear in a release is PG13, right?
Thanks again.
-- 
Martijn van Oosterhout <kleptog(at)gmail(dot)com> http://svana.org/kleptog/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2019-09-17 07:51:43 | Re: pg_rewind docs correction | 
| Previous Message | Peter Eisentraut | 2019-09-17 07:36:30 | Re: Support for CALL statement in ecpg |