Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 297419F9C42 for ; Fri, 14 Sep 2007 10:22:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 45854-09 for ; Fri, 14 Sep 2007 10:22:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by postgresql.org (Postfix) with ESMTP id 052D59F9D86 for ; Fri, 14 Sep 2007 10:22:27 -0300 (ADT) Received: from [192.168.0.251] ([71.251.196.74]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JOD0094114X1AW8@vms046.mailsrvcs.net> for pgsql-performance@postgresql.org; Fri, 14 Sep 2007 08:22:09 -0500 (CDT) Date: Fri, 14 Sep 2007 09:22:08 -0400 From: Jean-David Beyer Subject: Re: Index files In-reply-to: To: pgsql-performance@postgresql.org Message-id: <46EA8B00.9030600@verizon.net> Organization: Institute for Regimented Whimsey MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Enigmail-Version: 0.94.0.0 References: User-Agent: Thunderbird 1.5.0.9 (X11/20070317) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/275 X-Sequence-Number: 26820 Harsh Azad wrote: > Hi, > > Where are the database index files located in the $PGDATA directory? I > was thinking on soft linking them to another physical hard disk array. > I am not an expert, but what I have done is put the Write-Ahead-Log on one hard drive, some little-used relations and their indices on a second hard drive, and the main database files on four other drives. These are SCSI hard drives and I have two SCSI controllers. /dev/sda and /dev/sdb are on one controller, and the other four hard drives are on the other controller. These controllers are on a PCI-X bus all their own. I put $PGDATA (I do not actually set or use that global variable) on /dev/sda. [/srv/dbms/dataA/pgsql/data]$ ls -l total 88 -rw------- 1 postgres postgres 4 Aug 11 13:32 PG_VERSION drwx------ 5 postgres postgres 4096 Aug 11 13:32 base drwx------ 2 postgres postgres 4096 Sep 14 09:16 global drwx------ 2 postgres postgres 4096 Sep 13 23:35 pg_clog -rw------- 1 postgres postgres 3396 Aug 11 13:32 pg_hba.conf -rw------- 1 root root 3396 Aug 16 14:32 pg_hba.conf.dist -rw------- 1 postgres postgres 1460 Aug 11 13:32 pg_ident.conf drwx------ 4 postgres postgres 4096 Aug 11 13:32 pg_multixact drwx------ 2 postgres postgres 4096 Sep 14 09:16 pg_subtrans drwx------ 2 postgres postgres 4096 Aug 12 16:14 pg_tblspc drwx------ 2 postgres postgres 4096 Aug 11 13:32 pg_twophase drwx------ 3 postgres postgres 4096 Sep 14 09:13 pg_xlog -rw------- 1 postgres postgres 15526 Sep 11 22:31 postgresql.conf -rw------- 1 postgres postgres 13659 Aug 11 13:32 postgresql.conf.dist -rw------- 1 postgres postgres 56 Sep 14 07:33 postmaster.opts -rw------- 1 postgres postgres 52 Sep 14 07:33 postmaster.pid In /dev/sdb are ]$ ls -l total 12 drwxr-x--- 2 postgres postgres 4096 Aug 18 00:00 pg_log -rw------- 1 postgres postgres 2132 Sep 14 07:25 pgstartup.log drwx------ 3 postgres postgres 4096 Aug 12 21:06 stock The stuff in "stock" are little-used tables and their indices. Everything else is on the other four drives. I put the index for a table on a separate drive from the tata for the table. -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key: 9A2FC99A Registered Machine 241939. /( )\ Shrewsbury, New Jersey http://counter.li.org ^^-^^ 09:10:01 up 1:37, 4 users, load average: 5.77, 5.12, 4.58