On Tue, Aug 16, 2016 at 7:41 PM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > I still think it's worth thinking about something along these lines on > Linux only, where holey Swiss tmpfs files can bite you. Otherwise > disabling overcommit on your OS isn't enough to prevent something > which is really a kind of deferred overcommit with a surprising > failure mode (SIGBUS rather than OOM SIGKILL).
Yeah, I am inclined to agree. I mean, creating a DSM is fairly heavyweight already, so one extra system call isn't (I hope) a crazy overhead. We could test to see how much it slows things down. But it may be worth paying the cost even if it ends up being kinda expensive. We don't really have any way of knowing whether the caller's request is reasonable relative to the amount of virtual memory available, and converting a possible SIGBUS into an ereport(ERROR, ...) is a big win. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers