Re: Changing the value of data_directory

From: "Amit S(dot)" <comeonamit(at)gmail(dot)com>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org, austen(dot)birchall(at)metoffice(dot)gov(dot)uk
Subject: Re: Changing the value of data_directory
Date: 2015-07-29 07:15:21
Message-ID: CAC-OOAtYT4TMoiw-zU2_F8_drhS32X0DT+L6FPC4X79ws3QvKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Try, ps -ef | grep postgres and see how many postgres processes are
running. You might only need one.

On Mon, Jul 27, 2015 at 6:01 PM, Greg Sabino Mullane <greg(at)turnstep(dot)com>
wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
> Austen Birchall wrote:
> > postgres=# SHOW data_directory;
> > /var/lib/pgsql/data
> ...
> > postgres=# SHOW data_directory;
> /var/lib/pgsql/9.4/data
> ...
> > 1. How/when is the value of data_directory set - is it set as part of
> the install?
>
> Yes. It is set when Postgres starts up, and cannot be changed without a
> restart. The value
> can be hard-coded in your postgresql.conf file, but usually defaults to
> the PGDATA
> environment variable, or the -D option to the 'postgres' program.
>
> > 2. Is it possible to change the value of data_directory without doing a
> frest install?
>
> Yes. But I would be careful, it looks like you have may have two active
> clusters. I'd
> document everything clearly before proceeding: use "show port" and
> "show unix_socket_directories" to learn why you can connect to both
> clusters at the
> same time, if that is the case.
>
> - --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> End Point Corporation http://www.endpoint.com/
> PGP Key: 0x14964AC8 201507270811
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iEYEAREDAAYFAlW2JGgACgkQvJuQZxSWSsg70wCfYhpgJx5HdynM9OlLzTvuHCxr
> oDwAoPevJBbQTc9Hw8ioHeKSnyUHTuhQ
> =3KTG
> -----END PGP SIGNATURE-----
>
>
>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

--

Amit Sharma

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message James Sebastian 2015-08-01 08:41:45 Possible Corrputed shared memory
Previous Message Paul Linehan 2015-07-28 00:59:29 Re: Compiling PostgreSQL under Windows (for use with R package).