X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4F84756607 for ; Fri, 11 Mar 2005 20:33:54 +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 62515-04 for ; Fri, 11 Mar 2005 20:33:44 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7AAA4565E6 for ; Fri, 11 Mar 2005 20:33:44 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2BKXg5s005056; Fri, 11 Mar 2005 15:33:42 -0500 (EST) To: jellej@pacbell.net Cc: pgsql-performance@postgresql.org Subject: Re: Questions about 2 databases. In-reply-to: References: <6.2.0.14.0.20050311155221.041aa528@pop.interactivemediafactory.net> Comments: In-reply-to jelle message dated "Fri, 11 Mar 2005 10:54:30 -0800" Date: Fri, 11 Mar 2005 15:33:42 -0500 Message-ID: <5055.1110573222@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/196 X-Sequence-Number: 10901 jelle writes: > 1) on a single 7.4.6 postgres instance does each database have it own WAL > file or is that shared? Is it the same on 8.0.x? Shared. > 2) what's the high performance way of moving 200 rows between similar > tables on different databases? Does it matter if the databases are > on the same or seperate postgres instances? COPY would be my recommendation. For a no-programming-effort solution you could just pipe the output of pg_dump --data-only -t mytable into psql. Not sure if it's worth developing a custom application to replace that. > My web app does lots of inserts that aren't read until a session is > complete. The plan is to put the heavy insert session onto a ramdisk based > pg-db and transfer the relevant data to the master pg-db upon session > completion. Currently running 7.4.6. Unless you have a large proportion of sessions that are abandoned and hence never need be transferred to the main database at all, this seems like a dead waste of effort :-(. The work to put the data into the main database isn't lessened at all; you've just added extra work to manage the buffer database. regards, tom lane