Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ded1f1

Browse files
committed
Adjust DSM and DSA slot usage constants (back-patch).
1. Previously, a DSA area would create up to four segments at each sizebefore doubling the size. After this commit, it will create only two ateach size, so it ramps up faster and therefore needs fewer slots.2. Previously, the total limit on DSM slots allowed for 2 per connection.Switch to 5 per connection.This back-patches commitd061ea2 from release 13 into 10-12 based on afield complaint.Discussion:https://postgr.es/m/CAO03teA%2BjE1qt5iWDWzHqaufqBsF6EoOgZphnazps_tr_jDPZA%40mail.gmail.comDiscussion:https://postgr.es/m/CA%2BhUKGL6H2BpGbiF7Lj6QiTjTGyTLW_vLR%3DSn2tEBeTcYXiMKw%40mail.gmail.com
1 parent87ab464 commit2ded1f1

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

‎src/backend/storage/ipc/dsm.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@
4545

4646
#definePG_DYNSHMEM_CONTROL_MAGIC0x9a503d32
4747

48-
/*
49-
* There's no point in getting too cheap here, because the minimum allocation
50-
* is one OS page, which is probably at least 4KB and could easily be as high
51-
* as 64KB. Each currently sizeof(dsm_control_item), currently 8 bytes.
52-
*/
5348
#definePG_DYNSHMEM_FIXED_SLOTS64
54-
#definePG_DYNSHMEM_SLOTS_PER_BACKEND2
49+
#definePG_DYNSHMEM_SLOTS_PER_BACKEND5
5550

5651
#defineINVALID_CONTROL_SLOT((uint32) -1)
5752

‎src/backend/utils/mmgr/dsa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
* dsm.c's limits on total number of segments), or limiting the total size
7575
* an area can manage when using small pointers.
7676
*/
77-
#defineDSA_NUM_SEGMENTS_AT_EACH_SIZE4
77+
#defineDSA_NUM_SEGMENTS_AT_EACH_SIZE2
7878

7979
/*
8080
* The number of bits used to represent the offset part of a dsa_pointer.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp