Thread: BUG #4461: Should avoid create tblspcs in system location

BUG #4461: Should avoid create tblspcs in system location

From
"Dmitry Orlov"
Date:
The following bug has been logged online:

Bug reference:      4461
Logged by:          Dmitry Orlov
Email address:      dmitry_n_orlov@mail.ru
PostgreSQL version: 8.3.3
Operating system:   Ubuntu Hardy 8.04.1
Description:        Should avoid create tblspcs in system location
Details:

if I issue create tablespace user_ts location
'/var/lib/postgresql/8.3/main/pg_tblspc' then appears nested links in
/var/lib/postgresql/8.3/main/pg_tblspc. So should avoid to create
tablespaces in pg_tblspc

postgres@dorlov-laptop:/home/dorlov/tmp/pgpool-II-2.1$ uname -a&&pg_config
Linux dorlov-laptop 2.6.24-19-rt #1 SMP PREEMPT RT Thu Aug 21 02:08:03 UTC
2008 i686 GNU/Linux
BINDIR = /usr/lib/postgresql/8.3/bin
DOCDIR = /usr/share/doc/postgresql-doc-8.3
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/8.3/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql/8.3/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/8.3/man
SHAREDIR = /usr/share/postgresql/8.3
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/8.3/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--build=i486-linux-gnu' '--prefix=/usr'
'--includedir=/usr/include' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var'
'--libexecdir=/usr/lib/postgresql-8.3' '--disable-maintainer-mode'
'--disable-dependency-tracking' '--srcdir=.'
'--mandir=/usr/share/postgresql/8.3/man'
'--with-docdir=/usr/share/doc/postgresql-doc-8.3'
'--sysconfdir=/etc/postgresql-common' '--datadir=/usr/share/postgresql/8.3'
'--bindir=/usr/lib/postgresql/8.3/bin'
'--includedir=/usr/include/postgresql/' '--enable-nls'
'--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug'
'--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam'
'--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml'
'--with-libxslt' '--with-ldap' '--with-ossp-uuid' '--with-gnu-ld'
'--with-tclconfig=/usr/lib/tcl8.4' '--with-tkconfig=/usr/lib/tk8.4'
'--with-includes=/usr/include/tcl8.4'
'--with-system-tzdata=/usr/share/zoneinfo' '--with-pgport=5432' 'CFLAGS=-g
-O2 -g -Wall -O2 -fPIC' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,--as-needed'
'CC=cc' 'CPPFLAGS=' 'build_alias=i486-linux-gnu'
CC = cc
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.4
CFLAGS = -g -O2 -g -Wall -O2 -fPIC -Wall -Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -fwrapv -g
CFLAGS_SL = -fpic
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,--as-needed
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err
-lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm
VERSION = PostgreSQL 8.3.3

Re: BUG #4461: Should avoid create tblspcs in system location

From
Peter Eisentraut
Date:
Dmitry Orlov wrote:
> if I issue create tablespace user_ts location
> '/var/lib/postgresql/8.3/main/pg_tblspc' then appears nested links in
> /var/lib/postgresql/8.3/main/pg_tblspc. So should avoid to create
> tablespaces in pg_tblspc

If this is the location you give it, why should it avoid creating
tablespaces there?

Re: BUG #4461: Should avoid create tblspcs in system location

From
toruvinn
Date:
On Thu, 09 Oct 2008 14:06:35 +0200, Peter Eisentraut <peter_e@gmx.net>
wrote:
> If this is the location you give it, why should it avoid creating
> tablespaces there?
I believe this is called "making things `idiot-proof'". This is the
direction Microsoft's software takes, and I wouldn't be really happy to
see that in PG. This would eventually lead to limitations for PG's
advanced users (well, maybe not in this particular case), disallowing them
to do things, because the software "thinks it's wrong".
On the other hand - initdb has several "sanity" checks if I'm not mistaken.

--
ru