On Thu, Feb 22, 2024 at 12:49 AM Heikki Linnakangas wrote:
> That's fair, I can see those reasons. Nevertheless, I do think it was a
> bad tradeoff. A little bit of repetition would be better here, or we can
> extract the common parts to smaller functions.
>
> I came up with the attached:
>
>2
On 22/02/2024 01:03, Thomas Munro wrote:
On Thu, Feb 22, 2024 at 10:30 AM Thomas Munro wrote:
collisions arbitrarily far apart (just decide how many bits to use).
. o O ( Perhaps if you also allocated slots using a FIFO freelist,
instead of the current linear search for the first free slot, y
On Thu, Feb 22, 2024 at 10:30 AM Thomas Munro wrote:
> collisions arbitrarily far apart (just decide how many bits to use).
. o O ( Perhaps if you also allocated slots using a FIFO freelist,
instead of the current linear search for the first free slot, you
could maximise the time before a slot is
On Thu, Feb 22, 2024 at 8:19 AM Heikki Linnakangas wrote:
> - Separate dsm_handle, used by backend code to interact with the high
> level interface in dsm.c, from dsm_impl_handle, which is used to
> interact with the low-level functions in dsm_impl.c. This gets rid of
> the convention in dsm.c of
On Tue, Feb 13, 2024 at 7:53 PM Heikki Linnakangas wrote:
> However, I must say that the dsm_impl_op() interface is absolutely
> insane. It's like someone looked at ioctl() and thought, "hey that's a
> great idea!".
As the person who wrote that code, this made me laugh.
I agree it's not the pret
On Wed, Feb 14, 2024 at 3:23 AM Heikki Linnakangas wrote:
> On 29/01/2024 14:06, Heikki Linnakangas wrote:
> > If you call dsa_allocate_extended(DSA_ALLOC_NO_OOM), it will still
> > ereport an error if you run out of space (originally reported at [0]).
> >
> > Attached patch adds code to test_dsa.
(moving to pgsql-hackers)
On 29/01/2024 14:06, Heikki Linnakangas wrote:
If you call dsa_allocate_extended(DSA_ALLOC_NO_OOM), it will still
ereport an error if you run out of space (originally reported at [0]).
Attached patch adds code to test_dsa.c to demonstrate that:
postgres=# select test_