diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/transam/xlog.c | 12 | ||||
-rw-r--r-- | src/backend/commands/tablespace.c | 13 | ||||
-rw-r--r-- | src/backend/replication/basebackup.c | 13 | ||||
-rw-r--r-- | src/backend/utils/adt/misc.c | 8 |
4 files changed, 0 insertions, 46 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 15ab8d90d4..26fbed00a4 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8305,7 +8305,6 @@ do_pg_backup_start(const char *backupidstr, bool fast, TimeLineID *starttli_p, if (get_dirent_type(fullpath, de, false, ERROR) != PGFILETYPE_LNK) continue; -#if defined(HAVE_READLINK) || defined(WIN32) rllen = readlink(fullpath, linkpath, sizeof(linkpath)); if (rllen < 0) { @@ -8358,17 +8357,6 @@ do_pg_backup_start(const char *backupidstr, bool fast, TimeLineID *starttli_p, ti->oid, escapedpath.data); pfree(escapedpath.data); -#else - - /* - * If the platform does not have symbolic links, it should not be - * possible to have tablespaces - clearly somebody else created - * them. Warn about it and ignore. - */ - ereport(WARNING, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); -#endif } FreeDir(tblspcdir); diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 570ce3dbd5..526e82e388 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -213,7 +213,6 @@ TablespaceCreateDbspace(Oid spcOid, Oid dbOid, bool isRedo) Oid CreateTableSpace(CreateTableSpaceStmt *stmt) { -#ifdef HAVE_SYMLINK Relation rel; Datum values[Natts_pg_tablespace]; bool nulls[Natts_pg_tablespace] = {0}; @@ -391,12 +390,6 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) table_close(rel, NoLock); return tablespaceoid; -#else /* !HAVE_SYMLINK */ - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); - return InvalidOid; /* keep compiler quiet */ -#endif /* HAVE_SYMLINK */ } /* @@ -407,7 +400,6 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) void DropTableSpace(DropTableSpaceStmt *stmt) { -#ifdef HAVE_SYMLINK char *tablespacename = stmt->tablespacename; TableScanDesc scandesc; Relation rel; @@ -573,11 +565,6 @@ DropTableSpace(DropTableSpaceStmt *stmt) /* We keep the lock on pg_tablespace until commit */ table_close(rel, NoLock); -#else /* !HAVE_SYMLINK */ - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); -#endif /* HAVE_SYMLINK */ } diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 7f85071229..09f071300d 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -1330,7 +1330,6 @@ sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly, #endif ) { -#if defined(HAVE_READLINK) || defined(WIN32) char linkpath[MAXPGPATH]; int rllen; @@ -1349,18 +1348,6 @@ sendDir(bbsink *sink, const char *path, int basepathlen, bool sizeonly, size += _tarWriteHeader(sink, pathbuf + basepathlen + 1, linkpath, &statbuf, sizeonly); -#else - - /* - * If the platform does not have symbolic links, it should not be - * possible to have tablespaces - clearly somebody else created - * them. Warn about it and ignore. - */ - ereport(WARNING, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); - continue; -#endif /* HAVE_READLINK */ } else if (S_ISDIR(statbuf.st_mode)) { diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index 89690be2ed..af0d924459 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -302,8 +302,6 @@ pg_tablespace_location(PG_FUNCTION_ARGS) tablespaceOid == GLOBALTABLESPACE_OID) PG_RETURN_TEXT_P(cstring_to_text("")); -#if defined(HAVE_READLINK) || defined(WIN32) - /* * Find the location of the tablespace by reading the symbolic link that * is in pg_tblspc/<oid>. @@ -349,12 +347,6 @@ pg_tablespace_location(PG_FUNCTION_ARGS) targetpath[rllen] = '\0'; PG_RETURN_TEXT_P(cstring_to_text(targetpath)); -#else - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("tablespaces are not supported on this platform"))); - PG_RETURN_NULL(); -#endif } /* |