Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WbWe8-0003jN-IL for pgsql-docs@arkaria.postgresql.org; Sat, 19 Apr 2014 14:53:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WbWe7-0006UF-Vv for pgsql-docs@arkaria.postgresql.org; Sat, 19 Apr 2014 14:53:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WbWe7-0006U9-Cu for pgsql-docs@postgresql.org; Sat, 19 Apr 2014 14:53:35 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WbWe4-0002HB-CJ for pgsql-docs@postgresql.org; Sat, 19 Apr 2014 14:53:35 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WbWe1-00064I-Po; Sat, 19 Apr 2014 10:53:29 -0400 Date: Sat, 19 Apr 2014 10:53:29 -0400 From: Bruce Momjian To: Craig Ringer Cc: Ian Lawrence Barwick , PostgreSQL Developers Subject: Re: PATCH: Warn users about tablespace abuse data loss risk Message-ID: <20140419145329.GD31555@momjian.us> References: <52FAEFEA.4060609@2ndquadrant.com> <1392181593539-5791542.post@n5.nabble.com> <52FC0EBF.7020300@2ndquadrant.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: <52FC0EBF.7020300@2ndquadrant.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 13, 2014 at 08:15:59AM +0800, Craig Ringer wrote: > On 02/12/2014 02:35 PM, Ian Lawrence Barwick wrote: > > And taking a look at the page in question I see this prominent example: > > > > CREATE TABLESPACE fastspace LOCATION '/mnt/sda1/postgresql/data'; > > Here's an updated patch, adopting your wording for the first par and > tweaking the example. I have applied an adjusted version of this patch that is more compact. Thanks. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + --lrZ03NoBR/3+SXJZ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="tablespace.diff" diff --git a/doc/src/sgml/manage-ag.sgml b/doc/src/sgml/manage-ag.sgml new file mode 100644 index b44d521..78ec509 *** a/doc/src/sgml/manage-ag.sgml --- b/doc/src/sgml/manage-ag.sgml *************** dropdb db *** 379,395 **** expensive, slower disk system. To define a tablespace, use the command, for example:CREATE TABLESPACE: ! CREATE TABLESPACE fastspace LOCATION '/mnt/sda1/postgresql/data'; The location must be an existing, empty directory that is owned by the PostgreSQL operating system user. All objects subsequently created within the tablespace will be stored in files underneath this ! directory. --- 379,412 ---- expensive, slower disk system. + + + Even though located outside the main PostgreSQL data directory, + tablespaces are an integral part of the database cluster and + cannot be treated as an autonomous collection + of data files. They are dependent on metadata contained in the main + data directory, and therefore cannot be attached to a different + database cluster or backed up individually. Similarly, if you lose + a tablespace (file deletion, disk failure, etc), the database cluster + might become unreadable or unable to start. Placing a tablespace + on a temporary file system like a ramdisk risks the reliability of + the entire cluster. + + + To define a tablespace, use the command, for example:CREATE TABLESPACE: ! CREATE TABLESPACE fastspace LOCATION '/ssd1/postgresql/data'; The location must be an existing, empty directory that is owned by the PostgreSQL operating system user. All objects subsequently created within the tablespace will be stored in files underneath this ! directory. The location must not be on removable or transient storage, ! as the cluster might fail to function if the tablespace is missing ! or lost. diff --git a/doc/src/sgml/ref/create_tablespace.sgml b/doc/src/sgml/ref/create_tablespace.sgml new file mode 100644 index b643565..cf6215e *** a/doc/src/sgml/ref/create_tablespace.sgml --- b/doc/src/sgml/ref/create_tablespace.sgml *************** CREATE TABLESPACE . + + + --lrZ03NoBR/3+SXJZ Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --lrZ03NoBR/3+SXJZ--