Commit 2eb2197
Use sysctl(3) on BSD (#733)
* Use sysctl(3) on BSD
sysctlbyname(3) is a convenience wrapper for sysctl(3) that is
implemented on FreeBSD and MacOS, but not on OpenBSD.
Include sys/param.h to ensure that BSD is defined.
Tests on OpenBSD:
- make check
- initialize a monitor node and 2 nodes
- perform failover
Tests on MacOS:
- make check
* Use 64-bit sysctl flags to detect total RAM
Tested on
- MacOS 11.4
- FreeBSD 11.4
- OpenBSD 6.9
PG_AUTOCTL_DEBUG=1 pg_autoctl do pgsetup tune --pgdata /tmp -vv
Co-authored-by: Dimitri Fontaine <dimitri@citusdata.com>1 parent 7a878a4 commit 2eb2197
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | | - | |
| 96 | + | |
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
95 | | - | |
| 104 | + | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
| |||
0 commit comments