Re: Add pg_file_sync() to adminpack

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Arthur Zakirov <zaartur(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add pg_file_sync() to adminpack
Date: 2020-01-14 06:17:56
Message-ID: 20200114061756.GH1515@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 13, 2020 at 03:39:32PM +0100, Julien Rouhaud wrote:
> Actually, can't it create a security hazard, for instance if you call
> pg_file_sync() on a heap file and the calls errors out, since it's
> bypassing data_sync_retry?

Are you mistaking security with durability here? By default, the
function proposed is only executable by a superuser, so that's not
really a security concern.. But I agree that failing to detect a
PANIC on a fsync for a sensitive Postgres file could lead to
corruptions. That's why we PANIC these days.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2020-01-14 06:26:07 Re: Add pg_file_sync() to adminpack
Previous Message Dilip Kumar 2020-01-14 05:26:37 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions