Re: GetNamedLWLockTranche crashes on Windows in normal backend - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: GetNamedLWLockTranche crashes on Windows in normal backend
Date
Msg-id CAA5RZ0uCPdEngGPceCuqpOkeDR7uHA30M5hONhkJdcrmk+KLjQ@mail.gmail.com
Whole thread Raw
In response to Re: GetNamedLWLockTranche crashes on Windows in normal backend  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: GetNamedLWLockTranche crashes on Windows in normal backend
List pgsql-hackers
commit 38b602b certainly doesn't do us any favors here since it
> removed NamedLWLockTrancheArray.  Given the lack of reports from the field,
> I suspect the best path forward is to add an ERROR for unsafe accesses and
> to fix the documentation, as discussed upthread.

I suggest we set an in progres flag for shmem_startup_hook, as we do for
shmem_request_hook, and error out this function if called outside of this
hook. The error will be something like this:

```
ERROR:  cannot return the address of LWLocks outside of shmem_startup_hook
```

We can also update the docs.

If you agree with the above, I'll get the patch ready?

--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters