How can I run a PostgreSQL database outside /var/run/postgresql?

Started by Frank Churchover 12 years ago3 messagesgeneral
Jump to latest
#1Frank Church
voipfc@gmail.com

How can I run a PostgreSQL database independently of the normal packaged
based configuration?

I just want to start up postgres or pg_ctl process using a different port,
pointing to a different data directory and get it running, with permissions
etc working okay.

I don't want it to depend on the existing package page structure in
/etc/postgresql and /var/run/postgresql. The only thing required is
database compatiblity with the existing package based installations, which
I may be able to install if they are absent

The main points are -

**

** 1. Which data and configurations should be copied, ie the files and
directories should be copied from /etc/postgresql/xxx and
/var/run/postgresql

2. What executables are required, whether they can be extracted from
existing packages ie rpm/deb directly or after they have been installations
to their locations.

3. My preference will be to use existing package based installations or
install them if possible in case of dependencies which are not present in
my files, with my executables as there second option.

Thanks

voipfc

#2Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Frank Church (#1)
Re: How can I run a PostgreSQL database outside /var/run/postgresql?

Frank Church <voipfc@gmail.com> wrote:

I just want to start up postgres or pg_ctl process using a
different port, pointing to a different data directory and get it
running, with permissions etc working okay.

I recommend you spend some time looking over the relevant
documentation, trying to make it work, and posting a more specific
question if you have problems with that.  These links might be good
places to start:

http://www.postgresql.org/docs/current/interactive/tutorial-start.html

http://www.postgresql.org/docs/current/interactive/app-initdb.html

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3David G. Johnston
david.g.johnston@gmail.com
In reply to: Kevin Grittner (#2)
Re: How can I run a PostgreSQL database outside /var/run/postgresql?

Kevin Grittner-5 wrote

Frank Church &lt;

voipfc@

&gt; wrote:

I just want to start up postgres or pg_ctl process using a
different port, pointing to a different data directory and get it
running, with permissions etc working okay.

I recommend you spend some time looking over the relevant
documentation, trying to make it work, and posting a more specific
question if you have problems with that.  These links might be good
places to start:

http://www.postgresql.org/docs/current/interactive/tutorial-start.html

http://www.postgresql.org/docs/current/interactive/app-initdb.html

Or this one:

http://www.postgresql.org/docs/current/interactive/installation.html

Its hard to tell what you ultimate goal is. Do you want to create you own
custom file layout instead of one that has been chosen by one of the popular
and well-supported distros? If so the short answer is to, in effect, create
you own custom package. That ultimately requires that you compile
PostgreSQL yourself with your own custom configuration.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-can-I-run-a-PostgreSQL-database-outside-var-run-postgresql-tp5776712p5776769.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general