Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9A6199FBCF7 for ; Thu, 15 Feb 2007 14:21:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 45691-04-2 for ; Thu, 15 Feb 2007 14:21:11 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from perth.mailnetwork.co.uk (perth.mailnetwork.co.uk [80.175.28.46]) by postgresql.org (Postfix) with ESMTP id 7E05C9FBDC8 for ; Thu, 15 Feb 2007 14:21:11 -0400 (AST) Received: from user-3e88bf95.telcl18.dsl.pol.co.uk ([62.136.191.149]:2757 helo=[10.100.9.2]) by perth.mailnetwork.co.uk with esmtpa (Exim 4.66) (envelope-from ) id 1HHlEG-0004tx-K4; Thu, 15 Feb 2007 18:21:12 +0000 Message-ID: <45D4A491.5060108@mailnetwork.co.uk> Date: Thu, 15 Feb 2007 18:21:05 +0000 From: "Andy Shellam (Mailing Lists)" User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Ray Stell CC: pgsql-admin@postgresql.org Subject: Re: rename a cluster References: <20070215171940.GA21838@cns.vt.edu> <200702151836.24296.peter_e@gmx.net> <20070215180143.GC21838@cns.vt.edu> In-Reply-To: <20070215180143.GC21838@cns.vt.edu> Content-Type: multipart/alternative; boundary="------------050904000108040109010701" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.526 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/223 X-Sequence-Number: 24688 This is a multi-part message in MIME format. --------------050904000108040109010701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The cluster's "name" is only the file-system's directory path. You can easily rename this directory, as long as you pass the relevant directory name to pg_ctl's -D parameter (which tells PostgreSQL which database "cluster" to use.) It goes without saying, don't move the directory while PostgreSQL is running. Ray Stell wrote: > On Thu, Feb 15, 2007 at 06:36:23PM +0100, Peter Eisentraut wrote: > >> Ray Stell wrote: >> >>> Is there a method to rename a cluster? >>> >> Clusters don't have names in the first place. >> > > So, from 16.2 "Creating a Database Cluster" > > "...you must initialize a database storage area on disk. > We call this a database cluster." > > then, directory = cluster, no? > > What I was trying to get at is, is mv of the dir ok or > is there something else that needs to be considered? Thx. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > > !DSPAM:37,45d4a11118511420134615! > > > -- Andy Shellam NetServe Support Team the Mail Network "an alternative in a standardised world" p: +44 (0) 121 288 0832/0839 m: +44 (0) 7818 000834 --------------050904000108040109010701 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The cluster's "name" is only the file-system's directory path.

You can easily rename this directory, as long as you pass the relevant directory name to pg_ctl's -D parameter (which tells PostgreSQL which database "cluster" to use.)

It goes without saying, don't move the directory while PostgreSQL is running.


Ray Stell wrote:
On Thu, Feb 15, 2007 at 06:36:23PM +0100, Peter Eisentraut wrote:
  
Ray Stell wrote:
    
Is there a method to rename a cluster?
      
Clusters don't have names in the first place.
    

So, from 16.2 "Creating a Database Cluster"

"...you must initialize a database storage area on disk.
We call this a database cluster."

then, directory = cluster, no?

What I was trying to get at is, is mv of the dir ok or
is there something else that needs to be considered?  Thx.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

!DSPAM:37,45d4a11118511420134615!


  


-- 
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834
--------------050904000108040109010701--