Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4fff9d7

Browse files
committed
Document issues with non-default tablespaces and pg_dumpall restores.
Backpatch documentation addition to 8.1.X.
1 parentb055f00 commit4fff9d7

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.55 2005/11/01 21:09:50 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.56 2006/06/16 22:01:17 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -377,6 +377,13 @@ PostgreSQL documentation
377377
databases.
378378
</para>
379379

380+
<para>
381+
<application>pg_dumpall</application> requires all needed
382+
tablespace directories to exist before the restore or
383+
database creation will fail for databases in non-default
384+
locations.
385+
</para>
386+
380387
</refsect1>
381388

382389

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.79 2006/06/07 22:24:45 momjian Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.80 2006/06/16 22:01:17 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -888,7 +888,15 @@ dumpCreateDB(PGconn *conn)
888888
appendPQExpBuffer(buf," ENCODING = ");
889889
appendStringLiteralConn(buf,dbencoding,conn);
890890

891-
/* Output tablespace if it isn't default */
891+
/*
892+
*Output tablespace if it isn't the default. For default, it
893+
*uses the default from the template database. If tablespace
894+
*is specified and tablespace creation failed earlier,
895+
*(e.g. no such directory), the database creation will fail
896+
*too. One solution would be to use 'SET default_tablespace'
897+
*like we do in pg_dump for setting non-default database
898+
*locations.
899+
*/
892900
if (strcmp(dbtablespace,"pg_default")!=0)
893901
appendPQExpBuffer(buf," TABLESPACE = %s",
894902
fmtId(dbtablespace));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp