Re: margay fails assertion in stats/dsa/dsm code
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Marcel Hofstetter <hofstetter@jomasoft.ch>
Date: 2022-07-01T13:14:51Z
Lists: pgsql-hackers
On Thu, Jun 30, 2022 at 10:34 PM Thomas Munro <thomas.munro@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
Commits
-
Fix lock assertions in dshash.c.
- eed959a457ea 16.0 landed
- 53df1e28d2f7 15.0 landed
- cd26139a3056 11.17 landed
- 4f88dbac22a8 12.12 landed
- 7cdd0c2d7cdf 13.8 landed
- 5e7608e81ebb 14.5 landed
-
Default to dynamic_shared_memory_type=sysv on Solaris.
- 94ebf8117c93 16.0 landed
- a2b0719cc22d 15.0 landed
-
Harden dsm_impl.c against unexpected EEXIST.
- 389869af59da 16.0 landed
- b436047dc692 13.8 landed
- f7b69b1e31ee 12.12 landed
- facfd04678ec 11.17 landed
- 22b9afaf5cc0 10.22 landed
- fb81a93a6442 14.5 landed
- fef8c7a0c577 15.0 landed