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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Christoph Berg <myon(at)debian(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: fsync-pgdata-on-recovery tries to write to more files than previously
Date: 2015-05-28 00:45:45
Message-ID: 16362.1432773945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> writes:
>> At 2015-05-27 11:46:39 +0530, ams(at)2ndQuadrant(dot)com wrote:
>>> I'm trying a couple of approaches to that (e.g. using readdir directly
>>> instead of ReadDir), but other suggestions are welcome.

>> Here's what that looks like, but not yet fully tested.

> I doubt that that (not using AllocateDir) is a good idea in the backend,

Oh, scratch that. Reading the patch closer, I see you kept the use of
AllocateDir and only replaced ReadDir. That's kind of ugly (and certainly
requires a comment about the inconsistency) but it's probably ok from an
error handling standpoint. There are hard failure cases in AllocateDir,
but they seem unlikely to create problems in practice.

The other points stand though ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2015-05-28 00:57:15 Re: Possible pointer dereference
Previous Message Tom Lane 2015-05-28 00:22:18 Re: fsync-pgdata-on-recovery tries to write to more files than previously