On Thu, Jun 30, 2022 at 10:34 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > So... I think we should select a different default > dynamic_shared_memory_type in initdb.c if defined(__sun__). Which is > the least terrible? For sysv, it looks like all the relevant sysctls > that used to be required to use sysv memory became obsolete/automatic > in Sol 10 (note: Sol 9 is long EOL'd), so it should just work AFAICT, > whereas for mmap mode your shared memory data is likely to cause file > I/O because we put the temporary files in your data directory. I'm > thinking perhaps we should default to dynamic_shared_memory_type=sysv > for 15+. I don't really want to change it in the back branches, since > nobody has actually complained about "posix" performance and it might > upset someone if we change it for newly initdb'd DBs in a major > release series. But I'm not an expert or even user of this OS, I'm > just trying to fix the build farm; better ideas welcome.
Boy, relying on DSM for critical stuff sure is a lot of fun! This is exactly why I hate adding new facilities that have to be implemented in OS-dependent ways. Changing the default on certain platforms to 'posix' or 'sysv' according to what works best on that platform seems reasonable to me. I agree that defaulting to 'mmap' doesn't seem like a lot of fun, although I think it could be a reasonable choice on a platform where everything else is broken. You could alternatively try to fix 'posix' by adding some kind of code to work around that platform's deficiencies. Insert handwaving here. -- Robert Haas EDB: http://www.enterprisedb.com