- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit8af3ae0
committed
Add pairingheap_initialize() for shared memory usage
The existing pairingheap_allocate() uses palloc(), which allocatesfrom process-local memory. For shared memory use cases, the pairingheapstructure must be allocated via ShmemAlloc() or embedded in a sharedmemory struct. Add pairingheap_initialize() to initialize an already-allocated pairingheap structure in-place, enabling shared memory usage.Discussion:https://www.postgresql.org/message-id/flat/CAPpHfdsjtZLVzxjGT8rJHCYbM0D5dwkO+BBjcirozJ6nYbOW8Q@mail.gmail.comDiscussion:https://www.postgresql.org/message-id/flat/CABPTF7UNft368x-RgOXkfj475OwEbp%2BVVO-wEXz7StgjD_%3D6sw%40mail.gmail.comAuthor: Kartyshov Ivan <i.kartyshov@postgrespro.ru>Author: Alexander Korotkov <aekorotkov@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Reviewed-by: Alexander Lakhin <exclusion@gmail.com>Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>Reviewed-by: Euler Taveira <euler@eulerto.com>Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>1 parent0ea5eee commit8af3ae0
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
50 | 66 | | |
51 | | - | |
52 | | - | |
53 | 67 | | |
54 | 68 | | |
55 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
0 commit comments
Comments
(0)