Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-09 Thread Nathan Bossart
On Thu, Jun 06, 2024 at 02:51:42PM -0500, Nathan Bossart wrote: > On Thu, Jun 06, 2024 at 03:31:53PM -0400, Robert Haas wrote: >> I do think the name could use some more thought, though. >> semaphores_required would end up being the same kind of thing as >> shared_memory_size_in_huge_pages, but

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-06 Thread Nathan Bossart
On Thu, Jun 06, 2024 at 03:31:53PM -0400, Robert Haas wrote: > I don't really like making this a GUC, but what's the other option? > It's reasonable for people to want to ask the server how many > resources it will need to start, and -C is the only tool we have for > that right now. So I feel like

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-06 Thread Robert Haas
On Thu, Jun 6, 2024 at 3:21 PM Nathan Bossart wrote: > Here is a rebased version of the patch for v18 that adds a runtime-computed > GUC. As I noted earlier, there still isn't a consensus on this approach. I don't really like making this a GUC, but what's the other option? It's reasonable for

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-06 Thread Nathan Bossart
Here is a rebased version of the patch for v18 that adds a runtime-computed GUC. As I noted earlier, there still isn't a consensus on this approach. -- nathan >From 74f638f7df9c51f5ab47b282bb7107c4ba6cb5b6 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Tue, 21 May 2024 14:02:22 -0500

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-05 Thread Nathan Bossart
On Mon, Jun 03, 2024 at 02:04:19PM -0500, Nathan Bossart wrote: > Of course, as soon as I committed this, I noticed another missing reference > to max_wal_senders in the paragraph about POSIX semaphores. I plan to > commit/back-patch the attached patch within the next couple days. Committed. --

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-03 Thread Nathan Bossart
On Mon, Jun 03, 2024 at 12:18:21PM -0500, Nathan Bossart wrote: > On Tue, May 21, 2024 at 11:15:14PM +, Imseih (AWS), Sami wrote: >> As far as backpatching the present inconsistencies in the docs, >> [0] looks good to me. > > Committed. Of course, as soon as I committed this, I noticed

Re: problems with "Shared Memory and Semaphores" section of docs

2024-06-03 Thread Nathan Bossart
On Tue, May 21, 2024 at 11:15:14PM +, Imseih (AWS), Sami wrote: >> Any concerns with doing something like this [0] for the back-branches? The >> constant would be 6 instead of 7 on v14 through v16. > > As far as backpatching the present inconsistencies in the docs, > [0] looks good to me.

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-21 Thread Imseih (AWS), Sami
> Any concerns with doing something like this [0] for the back-branches? The > constant would be 6 instead of 7 on v14 through v16. As far as backpatching the present inconsistencies in the docs, [0] looks good to me. [0]

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-21 Thread Nathan Bossart
On Fri, May 17, 2024 at 02:21:23PM -0500, Nathan Bossart wrote: > On Fri, May 17, 2024 at 12:48:37PM -0500, Nathan Bossart wrote: >> Cool. I'll at least fix the back-branches as-is, but I'll see about >> revamping this stuff for v18. > > Attached is probably the absolute least we should do for

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Imseih (AWS), Sami
> postgres -D pgdev-dev -c shared_buffers=16MB -C > shared_memory_size_in_huge_pages > 13 > postgres -D pgdev-dev -c shared_buffers=16MB -c huge_page_size=1GB -C > shared_memory_size_in_huge_pages > 1 > Which is very useful to be able to actually configure that number of huge > pages. I don't

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Andres Freund
Hi, On 2024-05-17 18:30:08 +, Imseih (AWS), Sami wrote: > > The advantage of the GUC is that its value could be seen before trying to > > actually start the server. > > Only if they have a sample in postgresql.conf file, right? > A GUC like shared_memory_size_in_huge_pages will not be. You

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Nathan Bossart
On Fri, May 17, 2024 at 06:30:08PM +, Imseih (AWS), Sami wrote: >> The advantage of the GUC is that its value could be seen before trying to >> actually start the server. > > Only if they have a sample in postgresql.conf file, right? > A GUC like shared_memory_size_in_huge_pages will not

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Nathan Bossart
On Fri, May 17, 2024 at 12:48:37PM -0500, Nathan Bossart wrote: > On Fri, May 17, 2024 at 01:09:55PM -0400, Tom Lane wrote: >> Nathan Bossart writes: >>> At a bare minimum, we should probably fix the obvious problems, but I >>> wonder if we could simplify this section a bit, too. >> >> Yup.

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Imseih (AWS), Sami
>>> If the exact values >>> are important, maybe we could introduce more GUCs like >>> shared_memory_size_in_huge_pages that can be consulted (instead of >>> requiring users to break out their calculators). >> >> I don't especially like shared_memory_size_in_huge_pages, and I don't >> want to

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Nathan Bossart
On Fri, May 17, 2024 at 01:09:55PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> [ many, many problems in documented formulas ] > >> At a bare minimum, we should probably fix the obvious problems, but I >> wonder if we could simplify this section a bit, too. > > Yup. "The definition of

Re: problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Tom Lane
Nathan Bossart writes: > [ many, many problems in documented formulas ] > At a bare minimum, we should probably fix the obvious problems, but I > wonder if we could simplify this section a bit, too. Yup. "The definition of insanity is doing the same thing over and over and expecting different

problems with "Shared Memory and Semaphores" section of docs

2024-05-17 Thread Nathan Bossart
(moving to a new thread) On Thu, May 16, 2024 at 09:16:46PM -0500, Nathan Bossart wrote: > On Thu, May 16, 2024 at 04:37:10PM +, Imseih (AWS), Sami wrote: >> Also, Not sure if I am mistaken here, but the "+ 5" in the existing docs >> seems wrong. >> >> If it refers to NUM_AUXILIARY_PROCS