[Pkg-postgresql-public] pgpool packaging

Oliver Elphick olly@lfix.co.uk
Mon, 19 Jul 2004 09:56:45 +0100


On Sun, 2004-07-18 at 22:04, Peter Eisentraut wrote:
> I'm packaging pgpool, a connection pool proxy for PostgreSQL.  It's a 
> little server that takes client connections and passes them on to the 
> real PostgreSQL server, while doing the connection caching thing.  I 
> would like to tell you about a few packaging issues that might interact 
> with the postgresql package.
> 
> To the client, the proxy should appear as transparent as possible. That 
> implies that the socket file has to be placed in /var/run/postgresql.  
> Absent better ideas, I will use port 5433 by default, so the user has 
> to reroute his applications explicitly, or do the switch with 
> PostgreSQL manually if he wants truly transparent access.

Does that mean that pgpool has its own listener?  If I understand you,
pgpool listens on 5433 and passes on connections to the PostgreSQL
server on 5432.  Then switching with PostgreSQL means that the
postmaster listens on 5433 and pgpool on 5432 and therefore pgpool
services all PostgreSQL connection requests.  Presumably that would be
brought about by the administrator's editing the configuration for both
packages.

> I would like to have the server running as a nonprivileged user.  To get 
> write access to /var/run/postgresql, that user has to be postgres, 
> unless you propose to play various games with group permissions.

I see no problem with that unless you conceive that the postgresql
administrator and the pgpool administrator on one machine might be
different people, which seems very unlikely.  In fact, the default
assumption is that root is the PostgreSQL administrator, since by
default user postgres is not supplied with a usable password.  If you
thought they would be different people, group write access to
/var/run/postgresql would be suitable.

> Additionally, the postgresql package should behave reasonably if the 
> directory /var/run/postgresql is already there when it is installed 
> (because pgpool might have been installed first) and should not remove 
> it if there are still files in there.

If the directory is supplied by multiple packages, it is retained until
the last one is removed.  postgresql does not take any special steps to
remove it.

Regarding dependencies, do you consider that pgpool is independent of a
postgresql server on the local machine?  If it were dependent, there
would be a dependency on postgresql and pgpool would necessarily be
removed before postgresql.  But I suppose you could have a pgpool server
on one machine providing connections to a postmaster on another one.

> Does that sound reasonable?

Yes
-- 
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "Blessed is the man that trusteth in the LORD, and
      whose hope the LORD is."            Jeremiah 17:7