Undeliverable: Re: Changing default ../data/ directory (fwd)

2020-01-04 Thread Rich Shepard
: Undeliverable: Re: Changing default ../data/ directory p3plibsmtp01-13.prod.phx3.secureserver.net rejected your message to the following email addresses: p...@paulweiss.info<mailto:p...@paulweiss.info> The address you sent your message to wasn't found at the destination domain.

Re: Changing default ../data/ directory

2020-01-04 Thread Rich Shepard
On Sat, 4 Jan 2020, Adrian Klaver wrote: I don't see anything here: https://slackbuilds.org/slackbuilds/14.2/system/postgresql/rc.postgresql.new that changes the conf location, so postgresql.conf should be in the DATADIR: /var/lib/pgsql/$PG_VERSION/data Adrian, How interesting. When I used 'l

Re: Changing default ../data/ directory

2020-01-04 Thread Adrian Klaver
On 1/4/20 8:27 AM, Rich Shepard wrote: On Sat, 4 Jan 2020, Adrian Klaver wrote: Not following above: 1) Are you looking for your current postgresql.conf? Yes I don't see anything here: https://slackbuilds.org/slackbuilds/14.2/system/postgresql/rc.postgresql.new that changes the conf locat

Re: Changing default ../data/ directory

2020-01-04 Thread Rich Shepard
On Sat, 4 Jan 2020, George Neuner wrote: Since the new drive is local you can just move the data directory to its new location and link to it from the default (/var) location. No configuration changes needed. George, Huh! It didn't occur to me to make a softlink to the new directory from the

Re: Changing default ../data/ directory

2020-01-04 Thread Rich Shepard
On Sat, 4 Jan 2020, Jeff Janes wrote: PGDATA should work fine if you always start the server directly. But if you sudo or su to another user, they likely won't inherit your environment variables. And if you use some kind of start-up script, they will likely override it. How do you start and stop

Re: Changing default ../data/ directory

2020-01-04 Thread George Neuner
On Sat, 4 Jan 2020 07:20:44 -0800 (PST), Rich Shepard wrote: >As this is all new to me I want to learn how to: > >1) Define a postgresl.conf and learn where it should be located. > >2) Move all current databased in /var/lib/pgsql/11/data to /data/pgsql/11. > >3) Create all new databases in /data/

Re: Changing default ../data/ directory

2020-01-04 Thread Jeff Janes
On Sat, Jan 4, 2020 at 10:20 AM Rich Shepard wrote: > > The PGDATA environment variable used to be used for this (but I never did > get it satisfactorily working). PGDATA should work fine if you always start the server directly. But if you sudo or su to another user, they likely won't inherit

Re: Changing default ../data/ directory

2020-01-04 Thread Rich Shepard
On Sat, 4 Jan 2020, Adrian Klaver wrote: Not following above: 1) Are you looking for your current postgresql.conf? Yes. More below. https://www.postgresql.org/docs/11/runtime-config-file-locations.html#GUC-DATA-DIRECTORY Thanks, Adrian. Rich

Re: Changing default ../data/ directory

2020-01-04 Thread Rich Shepard
On Sat, 4 Jan 2020, nikhil raj wrote: Step 1-: Stop the postgres services and change the path of the data directory in postgres.conf file. The postgresql.conf.sample notes that the default value of data_directory is taken from -D in the startup command or the PGDATA environment variable. I sup

Re: Changing default ../data/ directory

2020-01-04 Thread Adrian Klaver
On 1/4/20 7:20 AM, Rich Shepard wrote: I run Slackware (currently -14.2/x86_64) and postgres-11.5. The data directory has always been located in /var/lib/pgsql//data. This data directory is located in the / partition on a 240G SSD. There's another 2T HDD with a /data partition and I want to both

Re: Changing default ../data/ directory

2020-01-04 Thread nikhil raj
Hi Rich Shepard, Step 1-: Stop the postgres services and change the path of the data directory in postgres.conf file. Step 2-: rsync the flie to new path. And start the service. Step 3-: connect to postgres and check command output from psql shell SHOW data_directory; should see now data path.