From jfradkin@wazagua.com Thu Feb 10 19:44:05 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9CA2E8B9EFE for ; Thu, 10 Feb 2005 19:44:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93080-09 for ; Thu, 10 Feb 2005 19:43:34 +0000 (GMT) Received: from out014.verizon.net (out014pub.verizon.net [206.46.170.46]) by svr1.postgresql.org (Postfix) with ESMTP id 736758B9EA2 for ; Thu, 10 Feb 2005 19:43:34 +0000 (GMT) Received: from jfradkin ([66.15.127.235]) by out014.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050210194333.CLWI28388.out014.verizon.net@jfradkin> for ; Thu, 10 Feb 2005 13:43:33 -0600 From: "Joel Fradkin" To: Subject: postgres 8 data directory other then default? Date: Thu, 10 Feb 2005 14:47:07 -0500 Message-ID: <000201c50fa9$4ec1f1b0$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0003_01C50F7F.65EBE9B0" X-Authentication-Info: Submitted using SMTP AUTH at out014.verizon.net from [66.15.127.235] at Thu, 10 Feb 2005 13:43:32 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.191 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE, MSGID_DOLLARS X-Spam-Level: *** X-Archive-Number: 200502/128 X-Sequence-Number: 20239 This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C50F7F.65EBE9B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I am trying to use a different drive for the data. I have edited postgres.conf to point to the new location, but I get the error /pgdata/PG_VERSION is missing. Do I have to do a initdb? When I try an initdb it says it is not empty. (has lost and found folder in it). Fedora Core 3 linux. I was able to do an init db if I create a folder called data in the pgdata, but I was not sure if it then would use that folder for all the files (I just want my data to be there). I also want to move my wal files to the /wal drives once I get it to start using pgdata drive for data. I got some info on this 0) backup your data 1) stop postmaster and verify. 2) cd $PGDATA; mv pg_xlog original_pg_xlog; ln -s /wal pg_xlog; cp original_pg_xlog/* pg_xlog 3) start postmaster and confirm correct startup in log files. Will this work? I am guessing this info would be in the var/lib folder not the /pgdata folder? Thanks in advance and sorry for asking so many dumb newb questions. Least this time the install of 8 went super smooth, just went to the postgres site and got the rpm's (Since I did not install 7 with the OS it asked for the fedora cd's a few times but all rpm's went ok). On the 8.1 files which are in tar files do I need to get those as well to get to 8.1 if so what is the procedure other then copying the files to my system (I have the .tar.bz) Joel Fradkin Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel. 941-753-7111 ext 305 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments. ------=_NextPart_000_0003_01C50F7F.65EBE9B0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I am trying to use a different drive for the = data.

I have edited postgres.conf to point to the new = location, but I get the error /pgdata/PG_VERSION is missing.

Do I have to do a initdb?

When I try an initdb it says it is not empty. (has = lost and found folder in it).

Fedora Core 3 linux.

I was able to do an init db if I create a folder = called data in the pgdata, but I was not sure if it then would use that folder for = all the files (I just want my data to be there).

I also want to move my wal files to the /wal drives = once I get it to start using pgdata drive for data.

 

I got some info on this

0) backup your = data

1) stop postmaster = and verify.

2) cd $PGDATA; mv = pg_xlog original_pg_xlog; ln -s /wal pg_xlog; cp

original_pg_xlog/* = pg_xlog

3) start postmaster = and confirm correct startup in log files.

 

Will this work? I am guessing this info would be in = the var/lib folder not the /pgdata folder?

Thanks in advance and sorry for asking so many dumb = newb questions.

Least this time the install of 8 went super smooth, = just went to the postgres site and got the rpm’s (Since I did not = install 7 with the OS it asked for the fedora cd’s a few times but all = rpm’s went ok).

 

On the 8.1 files which are in tar files do I need to = get those as well to get to 8.1 if so what is the procedure other then = copying the files to my system (I have the .tar.bz)

 

 

Joel Fradkin

 

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida = 34243
Tel.  941-753-7111 ext 305

 

jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced = tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and = may contain confidential and privileged information.  Any unauthorized = review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and delete = and destroy all copies of the original message, including = attachments.

 


 

 

------=_NextPart_000_0003_01C50F7F.65EBE9B0-- From jfradkin@wazagua.com Thu Feb 10 19:45:38 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 696EF8BA0D5 for ; Thu, 10 Feb 2005 19:45:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93812-01 for ; Thu, 10 Feb 2005 19:45:13 +0000 (GMT) Received: from out003.verizon.net (out003pub.verizon.net [206.46.170.103]) by svr1.postgresql.org (Postfix) with ESMTP id 94E868BA06A for ; Thu, 10 Feb 2005 19:45:13 +0000 (GMT) Received: from jfradkin ([66.15.127.235]) by out003.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050210194512.ZDVX7729.out003.verizon.net@jfradkin> for ; Thu, 10 Feb 2005 13:45:12 -0600 From: "Joel Fradkin" To: Subject: postgres 8 data directory other then default? Date: Thu, 10 Feb 2005 14:48:47 -0500 Message-ID: <000701c50fa9$89ea4ad0$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Authentication-Info: Submitted using SMTP AUTH at out003.verizon.net from [66.15.127.235] at Thu, 10 Feb 2005 13:45:12 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.19 tagged_above=0 required=5 tests=AWL, MSGID_DOLLARS X-Spam-Level: *** X-Archive-Number: 200502/129 X-Sequence-Number: 20240 I am trying to use a different drive for the data. I have edited postgres.conf to point to the new location, but I get the error /pgdata/PG_VERSION is missing. Do I have to do a initdb? When I try an initdb it says it is not empty. (has lost and found folder = in it). Fedora Core 3 linux. I was able to do an init db if I create a folder called data in the = pgdata, but I was not sure if it then would use that folder for all the files (I just want my data to be there). I also want to move my wal files to the /wal drives once I get it to = start using pgdata drive for data. =A0 I got some info on this 0) backup your data 1) stop postmaster and verify. 2) cd $PGDATA; mv pg_xlog original_pg_xlog; ln -s /wal pg_xlog; cp=20 original_pg_xlog/* pg_xlog 3) start postmaster and confirm correct startup in log files. =A0 Will this work? I am guessing this info would be in the var/lib folder = not the /pgdata folder? Thanks in advance and sorry for asking so many dumb newb questions. Least this time the install of 8 went super smooth, just went to the postgres site and got the rpm=92s (Since I did not install 7 with the OS = it asked for the fedora cd=92s a few times but all rpm=92s went ok). =A0 On the 8.1 files which are in tar files do I need to get those as well = to get to 8.1 if so what is the procedure other then copying the files to = my system (I have the .tar.bz) =A0 =A0 Joel Fradkin =A0 Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel.=A0 941-753-7111 ext 305 =A0 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. =A9 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA,=A0Inc =A0This email message is for the use of the intended recipient(s) and = may contain confidential and privileged information.=A0 Any unauthorized = review, use, disclosure or distribution is prohibited.=A0 If you are not the = intended recipient, please contact the sender by reply email and delete and = destroy all copies of the original message, including attachments. =A0 =A0 =A0 From dev@archonet.com Fri Feb 11 09:22:50 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C8DFA8B9F54 for ; Fri, 11 Feb 2005 09:22:50 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65799-07 for ; Fri, 11 Feb 2005 09:22:32 +0000 (GMT) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id 01F948BA062 for ; Fri, 11 Feb 2005 09:22:13 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 4.42) id 1CzX07-0006Ce-Ep; Fri, 11 Feb 2005 09:22:12 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 96899163CB; Fri, 11 Feb 2005 09:22:08 +0000 (GMT) Message-ID: <420C7940.1090005@archonet.com> Date: Fri, 11 Feb 2005 09:22:08 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joel Fradkin Cc: pgsql-sql@postgresql.org Subject: Re: postgres 8 data directory other then default? References: <000201c50fa9$4ec1f1b0$797ba8c0@jfradkin> In-Reply-To: <000201c50fa9$4ec1f1b0$797ba8c0@jfradkin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.066 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/133 X-Sequence-Number: 20244 Joel Fradkin wrote: > I am trying to use a different drive for the data. > > I have edited postgres.conf to point to the new location, but I get the > error /pgdata/PG_VERSION is missing. > > Do I have to do a initdb? > > When I try an initdb it says it is not empty. (has lost and found folder in > it). Create a sub-directory. Separate filesystems will have a lost+found folder at the top-level, so you'll need to create a directory called pgsql (or whatever). > Fedora Core 3 linux. > > I was able to do an init db if I create a folder called data in the pgdata, > but I was not sure if it then would use that folder for all the files (I > just want my data to be there). Ah - there you go then. All files live there unless you use tablespaces/symbolic links. > I also want to move my wal files to the /wal drives once I get it to start > using pgdata drive for data. > > I got some info on this > > 0) backup your data > 1) stop postmaster and verify. > 2) cd $PGDATA; mv pg_xlog original_pg_xlog; ln -s /wal pg_xlog; cp > original_pg_xlog/* pg_xlog > 3) start postmaster and confirm correct startup in log files. > > Will this work? I am guessing this info would be in the var/lib folder not > the /pgdata folder? Well, what you might want to do is: 1. Setup your .../pgsql/data folder on the WAL drive. 2. initb that location 3. Set up a tablespace for your data on the other drive(s) You can then have a default location for your database, and even move a single table over to its own drive(s) if that's what you need. Details in the manuals (start at chapter 18, then check the details in the SQL reference). I'd test it with a sample database first, make sure you're practiced with it. Oh - if you do filesystem backups when the database is stopped, make sure you remember to back up the alternate tablespace. > Thanks in advance and sorry for asking so many dumb newb questions. > > Least this time the install of 8 went super smooth, just went to the > postgres site and got the rpm's (Since I did not install 7 with the OS it > asked for the fedora cd's a few times but all rpm's went ok). Excellent. > On the 8.1 files which are in tar files do I need to get those as well to > get to 8.1 if so what is the procedure other then copying the files to my > system (I have the .tar.bz) It'll be 8.0.1 rather then 8.1 and they'll be source files. You unpack them run configure and make and out pops a new version of PG. I'd recommend sticking with the RPMs for the moment. -- Richard Huxton Archonet Ltd From jfradkin@wazagua.com Fri Feb 11 18:59:30 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ED40B8B9CFC for ; Fri, 11 Feb 2005 18:59:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19047-01 for ; Fri, 11 Feb 2005 18:59:13 +0000 (GMT) Received: from out010.verizon.net (out010pub.verizon.net [206.46.170.133]) by svr1.postgresql.org (Postfix) with ESMTP id 125148BA157 for ; Fri, 11 Feb 2005 18:59:12 +0000 (GMT) Received: from jfradkin ([66.15.127.235]) by out010.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050211185911.SIOH25879.out010.verizon.net@jfradkin>; Fri, 11 Feb 2005 12:59:11 -0600 From: "Joel Fradkin" To: "'Richard Huxton'" Cc: Subject: Re: postgres 8 data directory other then default? Date: Fri, 11 Feb 2005 14:02:47 -0500 Message-ID: <000901c5106c$47be3f90$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable In-Reply-To: <420C7940.1090005@archonet.com> X-Authentication-Info: Submitted using SMTP AUTH at out010.verizon.net from [66.15.127.235] at Fri, 11 Feb 2005 12:59:11 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.183 tagged_above=0 required=5 tests=AWL, MSGID_DOLLARS X-Spam-Level: *** X-Archive-Number: 200502/135 X-Sequence-Number: 20246 Thank you for all the help. I was able to get system up (8.0 RPMS, not a build of 8.0.1) I installed to the normal /var/lib/pgsql/data directory. I did an initdb on the pgdata drive initdb /pgdata/data This created a data folder on that drive set. I used the instructions below for linking my wal to /wal drive. I edited the postgres.conf in /var/lib/pgsl/data to use the data_directory=3D'pgdata/data' I am hoping this means the log files and such are on /var/lib/pgsql/data = and that the actual data is on the pgdata/data and the wal is on the /wal. I could confirm the /pgdata and /wal sytems were growing in size as I = added data to the database. Everyone on this list has been so super helpful; I could never have = figured it out without all the guidance. I just wanted to thank everyone who = jumped in with help. Stuff is so hard when you're ignorant. I know my way = around the MSSQL world, and with the help here I feel I am getting started with Postgres. Silly stupid stuff like environment variables etc when your = new take so long to figure out the right commands and where to put them, = that's why I really appreciated the step by step help. I was thinking of documenting the whole process from install to finished working project. You all think this be a good idea, just post it here? Joel Fradkin =20 Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel. 941-753-7111 ext 305 =20 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized = review, use, disclosure or distribution is prohibited. If you are not the = intended recipient, please contact the sender by reply email and delete and = destroy all copies of the original message, including attachments. =20 =20 -----Original Message----- From: Richard Huxton [mailto:dev@archonet.com]=20 Sent: Friday, February 11, 2005 4:22 AM To: Joel Fradkin Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] postgres 8 data directory other then default? Joel Fradkin wrote: > I am trying to use a different drive for the data. >=20 > I have edited postgres.conf to point to the new location, but I get = the > error /pgdata/PG_VERSION is missing. >=20 > Do I have to do a initdb? >=20 > When I try an initdb it says it is not empty. (has lost and found = folder in > it). Create a sub-directory. Separate filesystems will have a lost+found=20 folder at the top-level, so you'll need to create a directory called=20 pgsql (or whatever). > Fedora Core 3 linux. >=20 > I was able to do an init db if I create a folder called data in the pgdata, > but I was not sure if it then would use that folder for all the files = (I > just want my data to be there). Ah - there you go then. All files live there unless you use=20 tablespaces/symbolic links. > I also want to move my wal files to the /wal drives once I get it to = start > using pgdata drive for data. >=20 > I got some info on this >=20 > 0) backup your data > 1) stop postmaster and verify. > 2) cd $PGDATA; mv pg_xlog original_pg_xlog; ln -s /wal pg_xlog; cp=20 > original_pg_xlog/* pg_xlog > 3) start postmaster and confirm correct startup in log files. >=20 > Will this work? I am guessing this info would be in the var/lib folder = not > the /pgdata folder? Well, what you might want to do is: 1. Setup your .../pgsql/data folder on the WAL drive. 2. initb that location 3. Set up a tablespace for your data on the other drive(s) You can then have a default location for your database, and even move a=20 single table over to its own drive(s) if that's what you need. Details=20 in the manuals (start at chapter 18, then check the details in the SQL=20 reference). I'd test it with a sample database first, make sure you're practiced=20 with it. Oh - if you do filesystem backups when the database is stopped, = make sure you remember to back up the alternate tablespace. > Thanks in advance and sorry for asking so many dumb newb questions. >=20 > Least this time the install of 8 went super smooth, just went to the > postgres site and got the rpm's (Since I did not install 7 with the OS = it > asked for the fedora cd's a few times but all rpm's went ok). Excellent. > On the 8.1 files which are in tar files do I need to get those as well = to > get to 8.1 if so what is the procedure other then copying the files to = my > system (I have the .tar.bz) It'll be 8.0.1 rather then 8.1 and they'll be source files. You unpack=20 them run configure and make and out pops a new version of PG. I'd=20 recommend sticking with the RPMs for the moment. -- Richard Huxton Archonet Ltd