X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 40E81D1B462 for ; Thu, 11 Dec 2003 13:40:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 36193-06 for ; Thu, 11 Dec 2003 09:39:58 -0400 (AST) Received: from jefftrout.com (h00a0cc4084e5.ne.client2.attbi.com [24.128.241.68]) by svr1.postgresql.org (Postfix) with SMTP id C8B34D1B4B8 for ; Thu, 11 Dec 2003 09:39:54 -0400 (AST) Received: (qmail 3030 invoked from network); 11 Dec 2003 13:40:01 -0000 Received: from localhost (HELO squeegit) (threshar@127.0.0.1) by localhost with SMTP; 11 Dec 2003 13:40:01 -0000 Date: Thu, 11 Dec 2003 08:39:36 -0500 From: Jeff To: Bhartendu Maheshwari Cc: pgsql-admin@postgresql.org Subject: Re: Running Postgres Daemons with same data files Message-Id: <20031211083936.46ddb129.threshar@torgo.978.org> In-Reply-To: <1071146588.1211.2.camel@bharat> References: <1071146588.1211.2.camel@bharat> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/145 X-Sequence-Number: 11653 On 11 Dec 2003 18:13:07 +0530 Bhartendu Maheshwari wrote: > Dear matt > > Don't joke, this for stopping the Postgres Server. I want close the > files in between the database operations. I am looking for some SQL > command like in Mysql command is 'flush tables'. what's in postgres? > > regards > bhartendu > forcing a checkpoint or using commit may get those tables flushed out. (or at least the wal). but the problem is other postmasters on other machines may not know that data has changed - it could be sitting in a shared buffer. Machine A reads block 123, stored in a shared buffer. Machine B reads block 123, modifies it, writes it back out Machine A needs block 123, finds it in its shared buffer and uses that data [which is no longer valid] Thus you can see the problems. or another one Machine A locks row 123 for update Machine B also wants to lock row 123. How does it know A already has the lock? (locks are stored in shared memory) What you really want is multi-master replication. Currently this doesn't exist on PG (that I know of). There's a JDBC app that simulates it. (And you could too, to varying degrees of success). If mysql works, then use it, but I'd be suprised if it didn't suffer a lot of these same problems as well. If you seriously need this feature, then you'll either have to A. buy oracle/whatever or B. pay to fund development of it for PG -- Jeff Trout http://www.jefftrout.com/ http://www.stuarthamm.net/