On Thu, Apr 16, 2015 at 9:24 AM, Abhijit Menon-Sen <a...@2ndquadrant.com> wrote:
> Here's a variation of the earlier patch that follows all links in
> PGDATA. Does this look more like what you had in mind?

I'm really confused by the additional control-file field.  It is
documented as indicating whether fsync was ever disabled while the
server was running.  But:

1. It doesn't do that.  As soon as we fsync the data directory, we
reset the flag.  That's not what "ever disabled" means to me.

2. I don't know why it's part of this patch.  Tracking whether fsync
was ever disabled could be useful forensically, but isn't related to
fsync-ing the data directory after a crash, so I dunno why we'd put
that in this patch.  Tracking whether fsync was disabled recently, as
the patch actually does, doesn't seem to be of any obvious value in
preventing corruption either.

Also, it seems awfully unfortunate to me that we're duplicating a
whole pile of code into xlog.c here.  Maybe there's no way to avoid
the code duplication, but pre_sync_fname() seems like it'd more
naturally go in fd.c than here.  I dunno where walkdir should go, but
again, not in xlog.c.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to