Re: emergency outage requiring database restart

From: Oskari Saarenmaa <os(at)ohmu(dot)fi>
To: Andres Freund <andres(at)anarazel(dot)de>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: emergency outage requiring database restart
Date: 2016-11-02 15:45:57
Message-ID: dfbae3fb-cd79-f450-0180-577f5e86e387@ohmu.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

26.10.2016, 21:34, Andres Freund kirjoitti:
> Any chance that plsh or the script it executes does anything with the file descriptors it inherits? That'd certainly one way to get into odd corruption issues.
>
> We processor really should use O_CLOEXEC for the majority of it file handles.

Attached a patch to always use O_CLOEXEC in BasicOpenFile if we're not
using EXEC_BACKEND. It'd be nice to not expose all fds to most
pl-languages either, but I guess there's no easy solution to that
without forcibly closing all fds whenever any functions are called.

/ Oskari

Attachment Content-Type Size
0001-BasicOpenFile-always-use-O_CLOEXEC-if-it-is-availabl.patch text/x-patch 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-11-02 16:07:24 Re: delta relations in AFTER triggers
Previous Message Kevin Grittner 2016-11-02 15:10:06 Re: delta relations in AFTER triggers