pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: doc: restrictions on alter database moving default tablespace
8+ messages / 3 participants
[nested] [flat]

* pgsql: doc: restrictions on alter database moving default tablespace
@ 2014-10-18 14:23 Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Bruce Momjian @ 2014-10-18 14:23 UTC (permalink / raw)
  To: pgsql-committers

doc:  restrictions on alter database moving default tablespace

Mention tablespace must be empty and no one connected to the database.

Report by Josh Berkus

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/97d554871c3d186db831b35c0eabe6d496e4f54b

Modified Files
--------------
doc/src/sgml/ref/alter_database.sgml |    6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
@ 2014-10-21 05:38 ` Noah Misch <noah@leadboat.com>
  2014-12-12 21:14   ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Noah Misch @ 2014-10-21 05:38 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-committers

On Sat, Oct 18, 2014 at 02:23:46PM +0000, Bruce Momjian wrote:
> doc:  restrictions on alter database moving default tablespace
> 
> Mention tablespace must be empty and no one connected to the database.

The database must not contain any object explicitly assigned to its future
default tablespace, but that tablespace need not be empty.  Objects of other
databases in the tablespace pose no problem.


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
@ 2014-12-12 21:14   ` Bruce Momjian <bruce@momjian.us>
  2014-12-16 03:33     ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Bruce Momjian @ 2014-12-12 21:14 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: pgsql-committers

On Tue, Oct 21, 2014 at 01:38:43AM -0400, Noah Misch wrote:
> On Sat, Oct 18, 2014 at 02:23:46PM +0000, Bruce Momjian wrote:
> > doc:  restrictions on alter database moving default tablespace
> > 
> > Mention tablespace must be empty and no one connected to the database.
> 
> The database must not contain any object explicitly assigned to its future
> default tablespace, but that tablespace need not be empty.  Objects of other
> databases in the tablespace pose no problem.

I am back to look at this comment, and I don't understand what change is
being requested.  Are you saying it is just the commit message that
isn't clear?  

The new text is:

	The new default tablespace for this database must be empty, and no one
	can be connected to the database. 

That makes the distinction that only the tablespace for the existing
database has to be empty, not the entire tablespace.  Also, how would
there be an entry in the new-default per-database tablespace without it
being explicitly assigned, as that was not the previous default.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-12 21:14   ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
@ 2014-12-16 03:33     ` Noah Misch <noah@leadboat.com>
  2014-12-16 03:54       ` Re: pgsql: doc: restrictions on alter database moving default tablespace David G Johnston <david.g.johnston@gmail.com>
  2014-12-16 04:27       ` Re: pgsql: doc: restrictions on alter database moving default tablespace David G Johnston <david.g.johnston@gmail.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Noah Misch @ 2014-12-16 03:33 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-committers

On Fri, Dec 12, 2014 at 04:14:50PM -0500, Bruce Momjian wrote:
> On Tue, Oct 21, 2014 at 01:38:43AM -0400, Noah Misch wrote:
> > On Sat, Oct 18, 2014 at 02:23:46PM +0000, Bruce Momjian wrote:
> > > doc:  restrictions on alter database moving default tablespace
> > > 
> > > Mention tablespace must be empty and no one connected to the database.
> > 
> > The database must not contain any object explicitly assigned to its future
> > default tablespace, but that tablespace need not be empty.  Objects of other
> > databases in the tablespace pose no problem.
> 
> I am back to look at this comment, and I don't understand what change is
> being requested.  Are you saying it is just the commit message that
> isn't clear?  
> 
> The new text is:
> 
> 	The new default tablespace for this database must be empty, and no one
> 	can be connected to the database. 
> 
> That makes the distinction that only the tablespace for the existing
> database has to be empty, not the entire tablespace.

No, the commit message accurately describes the change.  Your reply helps me
understand your conception of the software's behavior, but I still read your
committed documentation text differently.  For "the new default tablespace for
this database" to qualify as "empty", it must contain no object from any
database.  A tablespace is a cross-database, unitary object.  Each tablespace
is either empty from every perspective or not empty from any perspective.
Here are a couple of alternatives for the documentation text:

  The new default tablespace must not already contain any of the database's
  objects, and no one can be connected to the database.

  The database must not contain any object explicitly located in the new
  default tablespace, and no one can be connected to the database.


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-12 21:14   ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-12-16 03:33     ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
@ 2014-12-16 03:54       ` David G Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: David G Johnston @ 2014-12-16 03:54 UTC (permalink / raw)
  To: pgsql-committers

Noah Misch-2 wrote
> On Fri, Dec 12, 2014 at 04:14:50PM -0500, Bruce Momjian wrote:
>> On Tue, Oct 21, 2014 at 01:38:43AM -0400, Noah Misch wrote:
>> > On Sat, Oct 18, 2014 at 02:23:46PM +0000, Bruce Momjian wrote:
>> > > doc:  restrictions on alter database moving default tablespace
>> > > 
>> > > Mention tablespace must be empty and no one connected to the
>> database.
>> > 
>> > The database must not contain any object explicitly assigned to its
>> future
>> > default tablespace, but that tablespace need not be empty.  Objects of
>> other
>> > databases in the tablespace pose no problem.
>> 
>> I am back to look at this comment, and I don't understand what change is
>> being requested.  Are you saying it is just the commit message that
>> isn't clear?  
>> 
>> The new text is:
>> 
>> 	The new default tablespace for this database must be empty, and no one
>> 	can be connected to the database. 
>> 
>> That makes the distinction that only the tablespace for the existing
>> database has to be empty, not the entire tablespace.
> 
> No, the commit message accurately describes the change.  Your reply helps
> me
> understand your conception of the software's behavior, but I still read
> your
> committed documentation text differently.  For "the new default tablespace
> for
> this database" to qualify as "empty", it must contain no object from any
> database.  A tablespace is a cross-database, unitary object.  Each
> tablespace
> is either empty from every perspective or not empty from any perspective.
> Here are a couple of alternatives for the documentation text:
> 
>   The new default tablespace must not already contain any of the
> database's
>   objects, and no one can be connected to the database.
> 
>   The database must not contain any object explicitly located in the new
>   default tablespace, and no one can be connected to the database.

Drive-by here but wouldn't saying (or adding) "cluster" instead of
"database" solve the confusion?

http://www.postgresql.org/docs/9.3/static/creating-cluster.html

A link to that section may be worth considering...

David J.



--
View this message in context: http://postgresql.nabble.com/pgsql-doc-restrictions-on-alter-database-moving-default-tablespace-tp58...
Sent from the PostgreSQL - committers mailing list archive at Nabble.com.


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-12 21:14   ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-12-16 03:33     ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
@ 2014-12-16 04:27       ` David G Johnston <david.g.johnston@gmail.com>
  2014-12-19 07:09         ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  1 sibling, 1 reply; 8+ messages in thread

From: David G Johnston @ 2014-12-16 04:27 UTC (permalink / raw)
  To: pgsql-committers

Noah Misch-2 wrote
> On Fri, Dec 12, 2014 at 04:14:50PM -0500, Bruce Momjian wrote:
>> On Tue, Oct 21, 2014 at 01:38:43AM -0400, Noah Misch wrote:
>> > On Sat, Oct 18, 2014 at 02:23:46PM +0000, Bruce Momjian wrote:
>> > > doc:  restrictions on alter database moving default tablespace
>> > > 
>> > > Mention tablespace must be empty and no one connected to the
>> database.
>> > 
>> > The database must not contain any object explicitly assigned to its
>> future
>> > default tablespace, but that tablespace need not be empty.  Objects of
>> other
>> > databases in the tablespace pose no problem.
>> 
>> I am back to look at this comment, and I don't understand what change is
>> being requested.  Are you saying it is just the commit message that
>> isn't clear?  
>> 
>> The new text is:
>> 
>> 	The new default tablespace for this database must be empty, and no one
>> 	can be connected to the database. 
>> 
>> That makes the distinction that only the tablespace for the existing
>> database has to be empty, not the entire tablespace.
> 
> No, the commit message accurately describes the change.  Your reply helps
> me
> understand your conception of the software's behavior, but I still read
> your
> committed documentation text differently.  For "the new default tablespace
> for
> this database" to qualify as "empty", it must contain no object from any
> database.  A tablespace is a cross-database, unitary object.  Each
> tablespace
> is either empty from every perspective or not empty from any perspective.
> Here are a couple of alternatives for the documentation text:
> 
>   The new default tablespace must not already contain any of the
> database's
>   objects, and no one can be connected to the database.

+1; though maybe...

The newly assigned default tablespace must not contain any of the specified
database's objects but otherwise need not be empty.  Additionally, there
must not be anyone connected to the database.

This is a bit more verbose, and somewhat implied since newly created
databases have their default set, by definition, to one hat likely already
contains objects of other databases in the cluster, but does clarify the
specific confusion raised here.  Re-reading I think the implicit version is
likely sufficiently clear though.

Side note: This implies you cannot change the default tablespace of the only
database in a cluster...probably not worth mentioning in the docs though.

David J.



--
View this message in context: http://postgresql.nabble.com/pgsql-doc-restrictions-on-alter-database-moving-default-tablespace-tp58...
Sent from the PostgreSQL - committers mailing list archive at Nabble.com.


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-12 21:14   ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-12-16 03:33     ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-16 04:27       ` Re: pgsql: doc: restrictions on alter database moving default tablespace David G Johnston <david.g.johnston@gmail.com>
@ 2014-12-19 07:09         ` Noah Misch <noah@leadboat.com>
  2014-12-20 02:03           ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Noah Misch @ 2014-12-19 07:09 UTC (permalink / raw)
  To: David G Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-committers; bruce@momjian.us

On Mon, Dec 15, 2014 at 09:27:38PM -0700, David G Johnston wrote:
> Noah Misch-2 wrote
> > Here are a couple of alternatives for the documentation text:
> > 
> >   The new default tablespace must not already contain any of the
> > database's
> >   objects, and no one can be connected to the database.
> 
> +1; though maybe...
> 
> The newly assigned default tablespace must not contain any of the specified
> database's objects but otherwise need not be empty.  Additionally, there
> must not be anyone connected to the database.
> 
> This is a bit more verbose, and somewhat implied since newly created
> databases have their default set, by definition, to one hat likely already
> contains objects of other databases in the cluster, but does clarify the
> specific confusion raised here.  Re-reading I think the implicit version is
> likely sufficiently clear though.

That text, too, works for me.

> Side note: This implies you cannot change the default tablespace of the only
> database in a cluster...probably not worth mentioning in the docs though.

Agreed.

By the way, standard practice on PostgreSQL community mailing lists is to use
"reply to all".  More often than not, without that To:/Cc: directly to me, I
would never become aware of your reply.


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: doc: restrictions on alter database moving default tablespace
  2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-10-21 05:38 ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-12 21:14   ` Re: pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
  2014-12-16 03:33     ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
  2014-12-16 04:27       ` Re: pgsql: doc: restrictions on alter database moving default tablespace David G Johnston <david.g.johnston@gmail.com>
  2014-12-19 07:09         ` Re: pgsql: doc: restrictions on alter database moving default tablespace Noah Misch <noah@leadboat.com>
@ 2014-12-20 02:03           ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Bruce Momjian @ 2014-12-20 02:03 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: David G Johnston <david.g.johnston@gmail.com>; pgsql-committers

On Fri, Dec 19, 2014 at 02:09:10AM -0500, Noah Misch wrote:
> On Mon, Dec 15, 2014 at 09:27:38PM -0700, David G Johnston wrote:
> > Noah Misch-2 wrote
> > > Here are a couple of alternatives for the documentation text:
> > > 
> > >   The new default tablespace must not already contain any of the
> > > database's
> > >   objects, and no one can be connected to the database.
> > 
> > +1; though maybe...
> > 
> > The newly assigned default tablespace must not contain any of the specified
> > database's objects but otherwise need not be empty.  Additionally, there
> > must not be anyone connected to the database.
> > 
> > This is a bit more verbose, and somewhat implied since newly created
> > databases have their default set, by definition, to one hat likely already
> > contains objects of other databases in the cluster, but does clarify the
> > specific confusion raised here.  Re-reading I think the implicit version is
> > likely sufficiently clear though.
> 
> That text, too, works for me.

I went with cleaner wording that just rearranges the text to avoid the
confusion.  Attached patch applied.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Attachments:

alter.diff (text/x-diff, 1.0K) download diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml new file mode 100644 index 333db5b..95c7ac9 *** a/doc/src/sgml/ref/alter_database.sgml --- b/doc/src/sgml/ref/alter_database.sgml *************** ALTER DATABASE <replaceable class="PARAM *** 78,84 **** create privilege for the new tablespace. This command physically moves any tables or indexes in the database's old default tablespace to the new tablespace. The new default tablespace ! for this database must be empty, and no one can be connected to the database. Tables and indexes in non-default tablespaces are unaffected. </para> --- 78,84 ---- create privilege for the new tablespace. This command physically moves any tables or indexes in the database's old default tablespace to the new tablespace. The new default tablespace ! must be empty for this database, and no one can be connected to the database. Tables and indexes in non-default tablespaces are unaffected. </para>
^ permalink raw reply [nested|flat] 8+ messages in thread


end of thread, other threads:[~2014-12-20 02:03 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18 14:23 pgsql: doc: restrictions on alter database moving default tablespace Bruce Momjian <bruce@momjian.us>
2014-10-21 05:38 ` Noah Misch <noah@leadboat.com>
2014-12-12 21:14   ` Bruce Momjian <bruce@momjian.us>
2014-12-16 03:33     ` Noah Misch <noah@leadboat.com>
2014-12-16 03:54       ` David G Johnston <david.g.johnston@gmail.com>
2014-12-16 04:27       ` David G Johnston <david.g.johnston@gmail.com>
2014-12-19 07:09         ` Noah Misch <noah@leadboat.com>
2014-12-20 02:03           ` Bruce Momjian <bruce@momjian.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox