Re: track_planning causing performance regression - Mailing list pgsql-hackers

From Andres Freund
Subject Re: track_planning causing performance regression
Date
Msg-id 20200701165425.urkb2dtckms5bena@alap3.anarazel.de
Whole thread Raw
In response to Re: track_planning causing performance regression  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: track_planning causing performance regression  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
Hi,

On 2020-07-01 22:20:50 +0900, Fujii Masao wrote:
> On 2020/07/01 4:03, Andres Freund wrote:
> > Why did you add the hashing here? It seems a lot better to just add an
> > lwlock in-place instead of the spinlock? The added size is neglegible
> > compared to the size of pgssEntry.
> 
> Because pgssEntry is not array entry but hashtable entry. First I was
> thinking to assign per-process lwlock to each entry in the array at the
> startup. But each entry is created every time new entry is required.
> So lwlock needs to be assigned to each entry at that creation time.
> We cannnot easily assign lwlock to all the entries at the startup.

But why not just do it exactly at the place the SpinLockInit() is done
currently?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode
Next
From: David Steele
Date:
Subject: Re: max_slot_wal_keep_size and wal_keep_segments