Re: pg_dump, pg_dumpall and data durability

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump, pg_dumpall and data durability
Date: 2016-11-12 04:46:08
Message-ID: CAB7nPqTnboTSnSP8NA9F3h_q7wpd9R1oe3v17e5J+P+EFSBcgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 11, 2016 at 11:03 PM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> - In pg_dumpall.c, the result of fsync_fname() is cast to "void" to show that
> the return code is ignored, but not anywhere else. Is that by design?

Right. The patch is lacking consistency in this area. The main thought
regarding this design is to not consider a fsync failure as critical,
and just issue a warning in stderr. I have updated the two other call
sites with a (void) cast.

> - For pg_dumpall, a short option "-N" is added for "--no-sync", but not for
> pg_dump (because -N is already taken there).
> I'd opt for either using the same short option for both or (IMO better)
> only offering a long option for both.

Okay. For consistency's sake let's do that. I was a bit hesitant
regarding that to be honest.

> This would avoid confusion, and we expect that few people will want to use
> this option anyway, right?

Definitely a good point.
--
Michael

Attachment Content-Type Size
pgdump-sync-v3.patch text/plain 13.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-11-12 04:58:56 Re: Fix checkpoint skip logic on idle systems by tracking LSN progress
Previous Message Craig Ringer 2016-11-12 03:27:46 Re: Why PostgreSQL doesn't implement a semi sync replication?