Re: archive status ".ready" files may be created too early - Mailing list pgsql-hackers

From Robert Haas
Subject Re: archive status ".ready" files may be created too early
Date
Msg-id CA+TgmoZqGTUjykNjTs11HrD8tmRD7S_xRPC_8txsUkrZTSeBxw@mail.gmail.com
Whole thread Raw
In response to Re: archive status ".ready" files may be created too early  ("alvherre@alvh.no-ip.org" <alvherre@alvh.no-ip.org>)
Responses Re: archive status ".ready" files may be created too early  ("Bossart, Nathan" <bossartn@amazon.com>)
List pgsql-hackers
On Fri, Aug 20, 2021 at 1:52 PM alvherre@alvh.no-ip.org
<alvherre@alvh.no-ip.org> wrote:
> Actually, you were right.  Hash tables in shared memory can be expanded.
> There are some limitations (the hash "directory" is fixed size, which
> means the hash table get less efficient if it grows too much), but you
> can definitely create more hash entries than the initial size.  See for
> example element_alloc(), which covers the case of a hash table being
> IS_PARTITIONED -- something that only shmem hash tables can be.  Note
> that ShmemInitHash passes the HASH_ALLOC flag and uses ShmemAllocNoError
> as allocation function, which acquires memory from the shared segment.

I realize that the code supports this ... but I thought we had
established a policy that only the main lock manager's shared hash
tables, and not any others, are actually allowed to make use of this
functionality.  See commit 7c797e7194d969f974abf579cacf30ffdccdbb95.

It seems like a dangerous thing to rely on in any case, since we can't
predict how much extra shared memory might actually be available.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Use extended statistics to estimate (Var op Var) clauses
Next
From: Mark Dilger
Date:
Subject: Re: Minor pg_amcheck fixes spotted while reading code