public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bruce Momjian <[email protected]>
To: Craig Ringer <[email protected]>
Cc: Ian Lawrence Barwick <[email protected]>
Cc: PostgreSQL Developers <[email protected]>
Subject: Re: PATCH: Warn users about tablespace abuse data loss risk
Date: Sat, 19 Apr 2014 10:53:29 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAB8KJ=hR+tmQAxdV8Gv3tJUN3cUp5o_x4t-mj5Ub=ZhZbYBcig@mail.gmail.com>
<[email protected]>
<CAB8KJ=iFi6V5xRojdWeSC+CWNksRsAB9MNkjB9Th37aQg38w8Q@mail.gmail.com>
<CAB8KJ=h5hy+1Dt-v2jK=uLtEc5iPeR1ksSXO-sOwcVAZvXVyvQ@mail.gmail.com>
<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-docs>
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 <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/x-diff] tablespace.diff (3.0K, 2-tablespace.diff)
download | inline 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 <replaceable class="parameter">db
*** 379,395 ****
expensive, slower disk system.
</para>
<para>
To define a tablespace, use the <xref
linkend="sql-createtablespace">
command, for example:<indexterm><primary>CREATE TABLESPACE</></>:
<programlisting>
! CREATE TABLESPACE fastspace LOCATION '/mnt/sda1/postgresql/data';
</programlisting>
The location must be an existing, empty directory that is owned by
the <productname>PostgreSQL</> operating system user. All objects subsequently
created within the tablespace will be stored in files underneath this
! directory.
</para>
<note>
--- 379,412 ----
expensive, slower disk system.
</para>
+ <warning>
+ <para>
+ Even though located outside the main PostgreSQL data directory,
+ tablespaces are an integral part of the database cluster and
+ <emphasis>cannot</emphasis> 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.
+ </para>
+ </warning>
+
<para>
To define a tablespace, use the <xref
linkend="sql-createtablespace">
command, for example:<indexterm><primary>CREATE TABLESPACE</></>:
<programlisting>
! CREATE TABLESPACE fastspace LOCATION '/ssd1/postgresql/data';
</programlisting>
The location must be an existing, empty directory that is owned by
the <productname>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.
</para>
<note>
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 <replaceable class="pa
*** 50,55 ****
--- 50,63 ----
<command>CREATE INDEX</> or <command>ADD CONSTRAINT</> to have the data
files for these objects stored within the specified tablespace.
</para>
+
+ <warning>
+ <para>
+ A tablespace cannot be used independently of the cluster in which it
+ is defined; see <xref linkend="manage-ag-tablespaces"/>.
+ </para>
+ </warning>
+
</refsect1>
<refsect1>
view thread (7+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: PATCH: Warn users about tablespace abuse data loss risk
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox