forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfe705ef
committed
doc: Expand section related to LWLocks and shared memory
The documentation includes a section describing how to define customLWLocks in extensions using the shmem hooks. However, it has nevermentioned the second, more flexible method based on the followingroutines:- LWLockNewTrancheId() to allocate a tranche ID.- LWLockRegisterTranche() to associate a name to a tranche ID.- LWLockInitialize() to initialize a LWLock with a tranche ID.autoprewarm.c is the only example of extension in the tree thatallocates a LWLock this way.This commit adds some documentation about all that. While on it, acomment is added about the need of AddinShmemInitLock. This is requiredespecially for EXEC_BACKEND builds (aka Windows, normally), as per aremark from Alexander, because backends can execute shmem initializationpaths concurrently.Author: Aleksander Alekseev, Michael PaquierDiscussion:https://postgr.es/m/CAJ7c6TPKhFgL+54cdTD9yGpG4+sNcyJ+N1GvQqAxgWENAOa3VA@mail.gmail.com1 parent6ec62b7 commitfe705ef
1 file changed
+30
-0
lines changedLines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3428 | 3428 |
| |
3429 | 3429 |
| |
3430 | 3430 |
| |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
3431 | 3454 |
| |
3432 | 3455 |
| |
3433 | 3456 |
| |
| |||
3451 | 3474 |
| |
3452 | 3475 |
| |
3453 | 3476 |
| |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
3454 | 3484 |
| |
3455 | 3485 |
| |
3456 | 3486 |
| |
|
0 commit comments
Comments
(0)