Re: [HACKERS] flock patch breaks things here

From: Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it>
To: hackers(at)postgreSQL(dot)org (PostgreSQL Hackers)
Cc: dg(at)informix(dot)com (David Gould)
Subject: Re: [HACKERS] flock patch breaks things here
Date: 1998-08-31 21:02:51
Message-ID: 199808312102.XAA19204@tango.cs.unitn.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> >
> > On Mon, 31 Aug 1998, David Gould wrote:
> >
> > > Also, before sprinkling files all over it is good to try to conform
> > > to the FHS (File Hierarchy Standard) (see http://www.pathname.com/fhs/)
> > > which is pretty easy to do and likely to make life easier later.
> >
> > I just downloaded and skim'd the fhs notes, and it looks
> > reasonable...but, other then the current socket in /tmp, we don't
> > "splinkle files all over"...do we? *raised eyebrow*
> >
>
> Well, perhaps not, thay might have been hyperbole, but I wanted to head it
> off before it happened.
>
> Also, what about moving the socket to the PG_DATA dir and then creating a
> symlink to it in /tmp for older clients. New installations could optionally
> not create (or remove) the symlink...
>
> -dg
>
> David Gould dg(at)informix(dot)com 510.628.3783 or 510.305.9468
> Informix Software (No, really) 300 Lakeside Drive Oakland, CA 94612
> - If simplicity worked, the world would be overrun with insects. -

In the fhs notes I read:

------------------------------------------------------------------------
5.9 /var/run : Run-time variable files

This directory contains system information files describing the system
since it was booted. Files in this directory should be cleared (removed
or truncated as appropriate) at the beginning of the boot process.

Process identifier (PID) files, which were originally placed in /etc,
should be placed in /var/run. The naming convention for PID files is
<program-name>.pid. For example, the crond PID file is named
/var/run/crond.pid.

The internal format of PID files remains unchanged. The file should
consist of the process identifier in ASCII-encoded decimal, followed by
a newline character. For example, if crond was process number 25,
/var/run/crond.pid would contain three characters: two, five, and
newline.

Programs that read PID files should be somewhat flexible in what they
accept; i.e., they should ignore extra whitespace, leading zeroes,
absence of the trailing newline, or additional lines in the PID file.
Programs that create PID files should use the simple specification
located in the above paragraph.

The utmp file, which stores information about who is currently using the
system, is located in this directory.

Programs that maintain transient UNIX-domain sockets should place them
in this directory.
------------------------------------------------------------------------

It seems that if we want to follow this document there is no much to
discuss. But on my linux installation this directory is owned by root
so I don't see how pgsql could create a socket in it. What standards
are in use on other systems ?

--
Massimo Dal Zotto

+----------------------------------------------------------------------+
| Massimo Dal Zotto email: dz(at)cs(dot)unitn(dot)it |
| Via Marconi, 141 phone: ++39-461-534251 |
| 38057 Pergine Valsugana (TN) www: http://www.cs.unitn.it/~dz/ |
| Italy pgp: finger dz(at)tango(dot)cs(dot)unitn(dot)it |
+----------------------------------------------------------------------+

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter T Mount 1998-08-31 21:06:23 JDBC Update
Previous Message Massimo Dal Zotto 1998-08-31 20:51:21 Re: [HACKERS] TPRINTF in trace.h