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 AEE6BD1B4AE for ; Thu, 11 Dec 2003 12:58:41 +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 28514-04 for ; Thu, 11 Dec 2003 08:58:13 -0400 (AST) Received: from bayswater1.ymogen.net (host-154-240-27-217.pobox.net.uk [217.27.240.154]) by svr1.postgresql.org (Postfix) with ESMTP id 85569D1B49C for ; Thu, 11 Dec 2003 08:58:09 -0400 (AST) Received: from solent (82-68-95-1.dsl.in-addr.zen.co.uk [82.68.95.1]) by bayswater1.ymogen.net (Postfix) with ESMTP id 3DEC69ACA6; Thu, 11 Dec 2003 12:58:12 +0000 (GMT) From: "Matt Clark" To: "Bhartendu Maheshwari" , "Postgres Mailing List" Subject: Re: Running Postgres Daemons with same data files Date: Thu, 11 Dec 2003 12:58:11 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <1071146588.1211.2.camel@bharat> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/143 X-Sequence-Number: 11651 Well I wasn't joking. If you want to get the files on disk into a state where they can be modified by a different postmaster, then you need to shut the current postmaster down. In theory, maybe, if you only want the second postmaster to have read access, then you could disconnect all users from the current postmaster and stop accepting any more connections, but I wouldn't do it if I were you. Maybe I'm missing the point. The only other answer is: commit; Because for postgres commit *means* commit the transaction to disk. Of course if you're using a NAS then who knows whether the files have _really_ been written to disk after an fsync. Postgres just has to believe what the operating system tells it... 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 > > On Thu, 2003-12-11 at 16:56, Matt Clark wrote: > > > I got all your points, thanks for such a great discussion, Now the last > > > thing I want is how can I close the data files and flush the cache into > > > the data files. How can I do this in postgresql???? > > > > pg_ctl stop > > > > > > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster