| From: | Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: introduce dynamic shared memory registry |
| Date: | 2023-12-21 06:50:43 |
| Message-ID: | 8d5b2883-8f55-413c-9548-097748709fc4@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 20/12/2023 17:33, Nathan Bossart wrote:
> On Wed, Dec 20, 2023 at 11:02:58AM +0200, Andrei Lepikhov wrote:
>> In that case, maybe change the test case to make it closer to real-life
>> usage - with locks and concurrent access (See attachment)?
>
> I'm not following why we should make this test case more complicated. It
> is only intended to test the DSM registry machinery, and setting/retrieving
> an atomic variable seems like a realistic use-case to me.
I could provide you at least two reasons here:
1. A More complicated example would be a tutorial on using the feature
correctly. It will reduce the number of questions in mailing lists.
2. Looking into existing extensions, I see that the most common case of
using a shared memory segment is maintaining some hash table or state
structure that needs at least one lock.
Try to rewrite the pg_prewarm according to this new feature, and you
will realize how difficult it is.
--
regards,
Andrei Lepikhov
Postgres Professional
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2023-12-21 07:31:57 | Re: Remove MSVC scripts from the tree |
| Previous Message | Dilip Kumar | 2023-12-21 06:49:20 | Re: index prefetching |