Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 085142E029D for ; Wed, 2 Jan 2008 14:10:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 49820-06 for ; Wed, 2 Jan 2008 14:10:02 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 937202E0213 for ; Wed, 2 Jan 2008 14:10:03 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m02IA1se017604; Wed, 2 Jan 2008 13:10:01 -0500 (EST) To: "Peter Koczan" cc: "pgsql-admin@postgresql.org" Subject: Re: best practices for separating data and logs In-reply-to: <4544e0330801020946i314c0c8n5830dcc4512849ee@mail.gmail.com> References: <4544e0330801020946i314c0c8n5830dcc4512849ee@mail.gmail.com> Comments: In-reply-to "Peter Koczan" message dated "Wed, 02 Jan 2008 11:46:15 -0600" Date: Wed, 02 Jan 2008 13:10:01 -0500 Message-ID: <17603.1199297401@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/26 X-Sequence-Number: 27800 "Peter Koczan" writes: > I'm planning a lot of changes for migrating to PostgreSQL 8.3, among > them being a better way of separating data and logs (transaction logs, > that is). > Currently, the OS and log data are on one disk system, and the data > (including configs) are on the other disk system. After creating the > database cluster, I copy the pg_xlog directory to the OS system and > symlink it from the database. > So, I'm wondering... > - Are there any best practices, or better practices, than symlinking? I believe 8.3's initdb has an explicit option for making pg_xlog be a symlink to someplace. The results aren't different from doing it manually, but it saves a step (and a chance for mistake). > - How do other people have this set up, or recommend setting this up > (e.g. also moving pg_clog or other things as well)? I think consensus is that pg_clog is best treated as part of the data. The point of moving xlog is that the heads on that drive will never have to move away from the current xlog tip; as soon as you put something else on that drive, you ruin the performance benefit. regards, tom lane