Re: fsync-pgdata-on-recovery tries to write to more files than previously

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Christoph Berg <myon(at)debian(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: fsync-pgdata-on-recovery tries to write to more files than previously
Date: 2015-05-25 16:27:48
Message-ID: BA87658B-674E-43FB-9E76-14326CAE113E@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On May 24, 2015 7:52:53 AM PDT, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>Christoph Berg <myon(at)debian(dot)org> writes:
>> Re: To Andres Freund 2015-05-24 <20150524075244(dot)GB27048(at)msg(dot)df7cb(dot)de>
>>> Re: Andres Freund 2015-05-24
><20150524005245(dot)GD32396(at)alap3(dot)anarazel(dot)de>
>>>> How about, to avoid masking actual problems, we have a more
>>>> differentiated logic for the toplevel data directory?
>
>> pg_log/ is also admin domain. What about only recursing into
>> well-known directories + postgresql.auto.conf?
>
>The idea that this code would know exactly what's what under $PGDATA
>scares me. I can positively guarantee that it would diverge from
>reality
>over time, and nobody would notice until it ate their data, failed to
>start, or otherwise behaved undesirably.
>
>pg_log/ is a perfect example, because that is not a hard-wired
>directory
>name; somebody could point the syslogger at a different place very
>easily.
>Wiring in special behavior for that name is just wrong.
>
>I would *much* rather have a uniform rule for how to treat each file
>the scan comes across. It might take some tweaking to get to one that
>works well; but once we did, we could have some confidence that it
>wouldn't break later.

If we'd merge it with initdb's list I think I'd not be that bad. I'm thinking of some header declaring it, roughly like the rmgr list.

Andres

---
Please excuse brevity and formatting - I am writing this on my mobile phone.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Davin M. Potts 2015-05-25 16:38:36 Re: [Pgbuildfarm] buildfarm olinguito vs python
Previous Message Stephen Frost 2015-05-25 16:06:26 Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful