Re: EINTR error in SunOS - Mailing list pgsql-hackers

From Greg Stark
Subject Re: EINTR error in SunOS
Date
Msg-id 87lky07r1x.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: EINTR error in SunOS  (Rod Taylor <pg@rbt.ca>)
List pgsql-hackers
Rod Taylor <pg@rbt.ca> writes:

> Are there issues with having an archive_command which does things with
> NFS based filesystems?

Well, whatever command you use for archive_command -- probably just "cp" if
you're using NFS would hang if the NFS server went away. What would happen
then might be interesting. If Postgres finds the archive_command hanging
indefinitely will it correctly avoid recycling the WAL log indefinitely? I
assume so.

What's nonoptimal here is that I don't think there would be any warning that
anything was wrong until the WAL logs eventually filled up their filesystem
and then postgres stopped running. In the meantime your archived WAL logs
would be getting older and older and you would have no indication that
anything was failing.

This was the intention with the NFS error handling. The theory being that
eventually the server comes back up and things resume functioning exactly
where they left off with no lost operations. The upside is you don't have
things failing, then resuming later and unhandled errors in the meantime
leading to data corruption. The downside is there's no way for "cp" and
ultimately Postgres to know anything's wrong except to have a timeout itself
and an arbitrary maximum amount of time to expect operations to take.

-- 
greg



pgsql-hackers by date:

Previous
From: Qingqing Zhou
Date:
Subject: Re: EINTR error in SunOS
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] default resource limits