On Mon, Apr 9, 2018 at 03:42:35PM +0200, Tomas Vondra wrote: > On 04/09/2018 12:29 AM, Bruce Momjian wrote: > > > > An crazy idea would be to have a daemon that checks the logs and > > stops Postgres when it seems something wrong. > > > > That doesn't seem like a very practical way. It's better than nothing, > of course, but I wonder how would that work with containers (where I > think you may not have access to the kernel log at all). Also, I'm > pretty sure the messages do change based on kernel version (and possibly > filesystem) so parsing it reliably seems rather difficult. And we > probably don't want to PANIC after I/O error on an unrelated device, so > we'd need to understand which devices are related to PostgreSQL.
Replying to your specific case, I am not sure how we would use a script to check for I/O errors/space-exhaustion if the postgres user doesn't have access to it. Does O_DIRECT work in such container cases? -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +