| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Nathan Bossart <nathan(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent |
| Date: | 2025-11-20 23:09:31 |
| Message-ID: | aR-fqzfZYSd3TVKa@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers pgsql-hackers |
On Thu, Nov 20, 2025 at 01:18:56PM -0500, Robert Haas wrote:
> What I'd be inclined to do after a failure is tear down the entire
> segment. Even if there's no mechanism to retry, you're saving the
> memory that the segment would have consumed.
Unpinning/detaching the segment/DSA/dshash table and deleting the DSM
registry entry in a PG_CATCH block scares me a little, but it might be
doable.
> Or maybe that's all too complicated for too little utility. I'm not sure.
That's ultimately where I landed.
> My perception is that this is setting a significantly lower standard for
> error tolerance than what we typically seek to achieve, but sometimes my
> perceptions are wrong, and sometimes better options are hard to come by.
Another thing that might be subconsciously guiding my decisions here is the
existing behavior when a shmem request/startup hook ERRORs (server startup
fails). I'd expect DSM registry users to be doing similar things in their
initialization callbacks, and AFAIK this behavior hasn't been a source of
complaints.
--
nathan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2025-11-20 23:09:36 | Re: Add support for COPY TO in tablesync for partitioned tables. |
| Previous Message | Corey Huinker | 2025-11-20 23:08:02 | Re: Extended Statistics set/restore/clear functions. |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Masahiko Sawada | 2025-11-20 22:51:52 | pgsql: Use "COPY table TO" for partitioned tables in initial table sync |