Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 621cf14

Browse files
committed
Issue 'mkdir' hint when replying CREATE TABLESPACE in recovery mode.
Per idea from Fujii Masao
1 parent 71d6d07 commit 621cf14

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/commands/tablespace.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
*
4141
*
4242
* IDENTIFICATION
43-
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.74 2010/02/26 02:00:39 momjian Exp $
43+
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.75 2010/07/02 02:44:32 momjian Exp $
4444
*
4545
*-------------------------------------------------------------------------
4646
*/
@@ -552,8 +552,9 @@ create_tablespace_directories(const char *location, const Oid tablespaceoid)
552552
if (errno == ENOENT)
553553
ereport(ERROR,
554554
(errcode(ERRCODE_UNDEFINED_FILE),
555-
errmsg("directory \"%s\" does not exist",
556-
location)));
555+
errmsg("directory \"%s\" does not exist", location),
556+
InRecovery ? errhint("Create directory \"%s\" for this tablespace before "
557+
"restarting the server.", location) : 0));
557558
else
558559
ereport(ERROR,
559560
(errcode_for_file_access(),

0 commit comments

Comments
 (0)