Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
POSTGRESQL-RELAY(8)	     General Commands Manual	     POSTGRESQL-RELAY(8)

NAME
     postgresql-relay - multiplex all your databases to one point of origin

SYNOPSIS
     postgresql-relay [options]

DESCRIPTION
     postgresql-relay  can  be	used to as a single point of origin for all your
     databases. Instead of having to remember (or modify in case of changes) all
     the names of your databases, on which machines and on which ports they  are
     running,  you  only  need to remember one machine and the name of the data-
     base. The postgresql-relay will then forward the connection to  the  proper
     database  on  the	proper port of the proper server. No more changes in the
     hundreds of clients and scripts!

     Options are:

     -c configurationfile
	     Use  this	configuration  file  instead   of   /usr/local/etc/post-
	     gresql-relay.conf.

     -f      Stay  in  the  foreground,  don't	daemonize.  The  logging will be
	     printed to stdout too.

     -q      Be quiet, don't log anything

     -v      Be verbose, log a lot.

CONFIGURATION FILE
     Each line in the configuration file has five fields, seperated by colons:

     The first field is the incoming port for clients. For the easiest	configu-
     ration  on  the  client-side,  keep this all the same (say port 5432 as the
     standard postgresql port).

     The second field is the name of the database the client  wants  to  connect
     to. This doesn't have to be the name of the database on the server connect-
     ing to.

     The third field is the name of the host the database is located on.

     The fourth field is the port the database is listening on.

     The fifth field is the name of the database to connect to.

     CONFIGURATION FILE EXAMPLES

     Say  you  have  two  databases, one named mail on the local machine on port
     5444 and one named users on the machine foo on port 5445. The configuration
     file would then be:

      5432:mail:localhost:5444:mail
      5432:users:foo:5445:users

     With this configuration, Postgresql-relay will listen on port 5432 and for-
     ward connections to the mail and users databases.

EXAMPLES
     Start the relay with a non-standard configuration file and keep it  in  the
     foreground:

      postgresql-relay -c /usr/local/etc/postgresql-relay.conf.test -f

     Now, in a different terminal, connect to to mail database:

      psql -h dbserver -p 5432 -U root mail

FILES
     postgresql-relay.conf, most likely in /usr/local/etc.

SECURITY
     Postgresql-relay  supports  tcpwrappers. For access to postgresql-relay the
     daemon is called postgresql. For access to a database the daemon is  called
     postgresql-dbname.

     In  the  following example, the localhost and the hosts in the 10/8 network
     have  access  to  postgresql-relay,  while  only  the  localhost  and   the
     10.10.10.0/8 network have access to the database 'fdc':

      postgresql : 10.0.0.0/255.0.0.0 : allow
      postgresql : 127.0.0.1 : allow
      postgresql : ALL : deny

      postgresql-mail : 10.10.10.0/255.255.255.0 : deny
      postgresql-mail : 127.0.0.1 : allow
      postgresql-mail : ALL : deny

LOGGING
     Logging goes to syslog, to the facility daemon.

NOTES
     It  would	be best practise if the name of the machine on which postgresql-
     relay is running would have an alias in DNS, so that even if the machine on
     which postgresql-relay is running changes, the scripts don't have to be up-
     dated. A recommended name is dbrelay.

BUGS
     If the communication protocol version is unknown, it should  fail	properly
     but this hasn't been tested.

AUTHOR
     Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)

SEE ALSO
     psql(1)

November 22, 2004		November 22, 2004	     POSTGRESQL-RELAY(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=postgresql-relay&sektion=8&manpath=FreeBSD+Ports+15.1.quarterly>

home | help