[ADMIN] Setting up data on two drives newb version.

2005-02-12 Thread Joel Fradkin
I just wanted to thank everyone who jumped in to help me.
Hopefully I have it set up ok.

Postgres install using more then one raid array for drives.

Install Postgres (I did not let the OS install it as I was wanting to use 8
and Fedora Core 3 was shipping with 7.4)
After I installed Fedora, I went to :
http://www.postgresql.org/ 
Downloads off main menu
FTP browser link
Binary link
8.0
Linux
rpms
fedora
fedora-core-3
http://www.postgresql.org/ftp/binary/v8.0/linux/rpms/fedora/fedora-core-3/
I was able to pull all the rpms (it did ask for the cd for fedora a few
times).

Once that is completed, you should be able to pull up the start services and
see pgsql as a service.
If you start it it will create a /var/lib/pgsql/lib/data folder. Data is the
initdb folder.
When you run initdb it creates this folder for you inside whatever folder
you are running intdb for.

What I did (I have a machine where I set up two additional raid arrays for
the data and the wal files;
 I was told it is best to use raid 10, 10k drives for the data and raid 1
15k drives for the wa/) was initdb /pgsql.
pgsql is what I called my raid 10 array and /wal is what I called my 15k
raid 1 array. This creates a data folder in /pgsql.
in /var/lib/pgsql/data I edited the pgsql.config and changed to
data_directory = '/pgdata/data'. I also: 
listen_addresses = '*'
shared_buffers = 4000
max_fsm_pages = 3   # min max_fsm_relations*16, 6 bytes each
max_fsm_relations = 1000# min 100, ~50 bytes each
effective_cache_size = 4# typically 8KB each (my box is 8 gig so I
may edit this)
These settings I got from looking at
http://www.desknow.com/kb/idx/0/061/article/
It said to do a vacuum verbose total pages should be lower the
max_fsm_pages.
in pg_hba.conf I added
hostall all 192.168.123.121 255.255.255.0   trust
to allow me to connect from my desktop.

Before starting the system up a second time (after adding the
data_directory) I went in to the
/pgsql/data folder and (A fellow from the mailing list helped me here to
relocate the wal)
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.

only diference was I am not using $PGDATA I am using the directory command
in conf. So I chabged dir to /pgsql/data.

WHen I started postgres I could see data growing on both the /wal and /pgsql
drives.
I am still not 100% sure that just the data is on /pgsql/data, but at least
it is using a different drive then the OS 
and the wal and data are on different drives. 



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[ADMIN] Setting up data on two drives newb version. left off a little info on memory if you change the shared buffers.

2005-02-12 Thread Joel Fradkin
This was also in the Desknow web page.

changing these parameters will probably cause postgres to not start.
su - postgres
pg_ctl -D /var/lib/pgsql/data start ( I actualy left the path off )
in the message it says you need to increase SHMMAX to a certain number.

To do this you must be root
echo  /proc/sys/kernel/shmmax

to make it permanent
edit /etc/sysctl.conf
kernel.shmmax = 

example shared_buffers = 2 it is 167763968 (160mb).



Joel Fradkin
 



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [ADMIN] Setting up data on two drives newb version. left

2005-02-12 Thread John Jensen
Bruce Momjian has an other interesting manual on hardware performance
tuning:
http://candle.pha.pa.us/main/writings/pgsql/hw_performance/index.html 

It covers a lot of the same ground plus some other goodies.

/John

>>> "Joel Fradkin" <[EMAIL PROTECTED]> 12-02-2005 16:22:28 >>>
This was also in the Desknow web page.

changing these parameters will probably cause postgres to not start.
su - postgres
pg_ctl -D /var/lib/pgsql/data start ( I actualy left the path off )
in the message it says you need to increase SHMMAX to a certain
number.

To do this you must be root
echo  /proc/sys/kernel/shmmax

to make it permanent
edit /etc/sysctl.conf
kernel.shmmax = 

example shared_buffers = 2 it is 167763968 (160mb).



Joel Fradkin
 



---(end of
broadcast)---
TIP 4: Don't 'kill -9' the postmaster


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [ADMIN] Trouble Escaping Quotes

2005-02-12 Thread Haron, Charles

I upgraded to 7.3.9, and that fixed the problem.

Thanks,
Chuck 

> -Original Message-
> From: Tom Lane [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 26, 2005 10:12 AM
> To: Haron, Charles
> Cc: pgsql-admin@postgresql.org; Richard Poole
> Subject: Re: [ADMIN] Trouble Escaping Quotes 
> 
> "Haron, Charles" <[EMAIL PROTECTED]> writes:
> > BTW, I'm using v7.3.3
> 
> Ah so.  It turns out that pre-8.0 versions of plperl fail to 
> cope with quote marks in fields of rowtype arguments.  I've 
> patched 7.3 and 7.4 for this.  I would recommend updating to 
> 7.3.9 as soon as it comes out (should be Friday).
> 
>   regards, tom lane
> 

***

Confidentiality notice:  This electronic transmission message is intended only 
for the use of the individual or entity to whom it is addressed.  This 
information should be treated as proprietary, confidential, legally privileged 
and exempt from disclosure under applicable law.  If the reader of this message 
is not the intended recipient, (or the employee or agent responsible for 
delivering the message to the intended recipient), you are hereby notified that 
any use, dissemination, distribution, or copying of this message is strictly 
prohibited.  If you have received this communication in error, please 
immediately notify us by telephone (720) 221-9421 or by return e-mail and 
delete this message.  Thank you for your cooperation.

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings