mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Extend dsm API with a new function dsm_unpin_segment.
If you have previously pinned a segment and decide that you don't actually want to keep it around until shutdown, this new API lets you remove the pin. This is pretty trivial except on Windows, where it requires closing the duplicate handle that was used to implement the pin. Thomas Munro and Amit Kapila, reviewed by Amit Kapila and by me.
This commit is contained in:
@@ -73,6 +73,8 @@ extern bool dsm_impl_op(dsm_op op, dsm_handle handle, Size request_size,
|
||||
extern bool dsm_impl_can_resize(void);
|
||||
|
||||
/* Implementation-dependent actions required to keep segment until shutdown. */
|
||||
extern void dsm_impl_pin_segment(dsm_handle handle, void *impl_private);
|
||||
extern void dsm_impl_pin_segment(dsm_handle handle, void *impl_private,
|
||||
void **impl_private_pm_handle);
|
||||
extern void dsm_impl_unpin_segment(dsm_handle handle, void **impl_private);
|
||||
|
||||
#endif /* DSM_IMPL_H */
|
||||
|
||||
Reference in New Issue
Block a user