Re: [pgsql-hackers-win32] Sync vs. fsync during

From: pgsql(at)mohawksoft(dot)com
To: "Jan Wieck" <JanWieck(at)Yahoo(dot)com>
Cc: "Greg Stark" <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [pgsql-hackers-win32] Sync vs. fsync during
Date: 2004-05-14 11:35:29
Message-ID: 16423.24.91.171.78.1084534529.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

> Greg Stark wrote:
>
>> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>>
>>> The whole sync() vs. fsync() discussion is in my opinion nonsense at
>>> this
>>> point. Without the ability to limit the amount of files to a reasonable
>>> number,
>>> by employing tablespaces in the form of larger container files, the
>>> risk of
>>> forcing excessive head movement is simply too high.
>>
>> I don't think there was any suggestion of conflating tablespaces with
>> implementing a filesystem in postgres.
>>
>> Tablespaces are just a database entity that database stored objects like
>> tables and indexes are associated to. They group database stored objects
>> and
>> control the storage method and location.
>>
>> The existing storage mechanism, namely a directory with a file for each
>> database object, is perfectly adequate and doesn't have to be replaced
>> to
>> implement tablespaces. All that's needed is that the location of the
>> directory
>> be associated with the "tablespace" of the object rather than be a
>> global
>> constant.
>>
>> Implementing an Oracle-style filesystem is just one more temptation to
>> reimplement OS services in the database. Personally I think it's an
>> awful
>> idea. But even if postgres did it as an option, it wouldn't necessarily
>> have
>> anything to do with tablespaces.
>>
>
> Doing this is not just what you call it. In a system with let's say 500
> active backends on a database with let's say 1000 things that are
> represented as a file, you'll need half a million virtual file
> descriptors.

I'm sort of a purist, I think that operating systems should be operating
systems and applications should be applications. Whenever you try to do
application like things in an OS, it is a mistake. Whenever you try to do
OS like things in an application, it - also, is a mistake.

Say a database has close to a active thousand files and you do have 100
concurrent user's. Why do you think that this could be handled better in
an application? Are you saying that PostgreSQL could do a better job at
managing 1/2 million shared file descriptors than the OS?

Your example, IMHO, points out why you *shouldn't* try to have a dedicated
file system.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-14 12:02:58 Re: relcache refcount
Previous Message Zeugswetter Andreas SB SD 2004-05-14 11:00:21 Re: relcache refcount

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Vitaly Belman 2004-05-14 14:10:24 Changing postgresql.conf values without restarting the postmaster?
Previous Message Dave Page 2004-05-14 07:22:50 Re: [HACKERS] pg_autovacuum Win32 service patch #2