Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-11-01 Thread Aleksander Alekseev
> The result has been applied as fe705ef6fc1d. Many thanks! -- Best regards, Aleksander Alekseev

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-31 Thread Michael Paquier
On Tue, Oct 31, 2023 at 10:33:25AM +0900, Michael Paquier wrote: > Sounds pretty much OK to me. Thanks! The main thing I have found annoying in the patch was the term "tranche ID", so I have reworded that to use tranche_id to match with the surroundings and the routines of lwlock.h. LWLockInitia

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 04:10:17PM +0300, Aleksander Alekseev wrote: > I didn't like the commit message. Here is the corrected patch. Sorry > for the noise. Sounds pretty much OK to me. Thanks! -- Michael signature.asc Description: PGP signature

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-30 Thread Aleksander Alekseev
Hi, > PFA patch v4. I didn't like the commit message. Here is the corrected patch. Sorry for the noise. -- Best regards, Aleksander Alekseev v5-0001-Clarify-the-38.10.10.-Shared-Memory-and-LWLocks-s.patch Description: Binary data

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-30 Thread Aleksander Alekseev
Michael, On Fri, Oct 27, 2023 at 9:52 AM Michael Paquier wrote: > > On Tue, May 23, 2023 at 01:47:52PM +0300, Aleksander Alekseev wrote: > > That's me still talking to myself :) > > Let's be two then. Many thanks for your feedback. > + > +It is convenient to use shmem_startup_hook which

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-26 Thread Michael Paquier
On Tue, May 23, 2023 at 01:47:52PM +0300, Aleksander Alekseev wrote: > That's me still talking to myself :) Let's be two then. > Evidently this works differently from what I initially thought on > Windows due to lack of fork() on this system. This comes down to the fact that processes executed w

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-05-23 Thread Aleksander Alekseev
Hi hackers, That's me still talking to myself :) > Thoughts? Evidently this works differently from what I initially thought on Windows due to lack of fork() on this system. PFA the patch v3. Your feedback is most welcomed. -- Best regards, Aleksander Alekseev v3-0001-Clarify-the-38.10.10.-Sh

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-05-22 Thread Aleksander Alekseev
Hi, > Since no one seems to object so far I prepared the patch. Turned out patch v1 fails on cfbot on Windows due to extra Assert I added [1]: ``` abort() has been calledTRAP: failed Assert("!IsUnderPostmaster"), File: "../src/backend/storage/ipc/ipci.c", Line: 320, PID: 4040 abort() has been ca

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-05-22 Thread Aleksander Alekseev
Hi, > Unless I missed something, I suggest updating the documentation and > pg_stat_statements.c accordingly. Since no one seems to object so far I prepared the patch. -- Best regards, Aleksander Alekseev v1-0001-Clarify-the-usage-of-shmem_startup_hook.patch Description: Binary data

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-05-21 Thread Aleksander Alekseev
Hi, > However it's not clear when a race-condition may happen. The rest of > the text gives an overall impression that the shmem_startup_hook will > be called by postmaster once (unless an extension places several hooks > in series). Thus there is no real need to ackquire AddinShmemInitLock > and

"38.10.10. Shared Memory and LWLocks" may require a clarification

2023-05-19 Thread Aleksander Alekseev
Hi, While re-reading 38.10.10. Shared Memory and LWLocks [1] and the corresponding code in pg_stat_statements.c I noticed that there are several things that can puzzle the reader. The documentation and the example suggest that LWLock* should be stored within a structure in shared memory: ``` typ