Re: Big 7.1 open items

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Subject: Re: Big 7.1 open items
Date: 2000-06-21 03:45:13
Message-ID: 200006210345.XAA15107@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

[ Charset ISO-8859-1 unsupported, converting... ]
> > -----Original Message-----
> > From: Peter Eisentraut
> >
> > Bruce Momjian writes:
> >
> > > If we have a new CREATE DATABASE LOCATION command, we can say:
> > >
> > > CREATE DATABASE LOCATION dbloc IN '/var/private/pgsql';
> > > CREATE DATABASE newdb IN dbloc;
> >
> > We kind of have this already, with CREATE DATABASE foo WITH LOCATION =
> > 'bar'; but of course with environment variable kludgery. But it's a start.
> >
> > > mkdir /var/private/pgsql/dbloc
> > > ln -s /var/private/pgsql/dbloc data/base/dbloc
> >
> > I think the problem with this was that you'd have to do an extra lookup
> > into, say, pg_location to resolve this. Some people are talking about
> > blind writes, this is not really blind.
> >
> > > CREATE LOCATION tabloc IN '/var/private/pgsql';
> > > CREATE TABLE newtab ... IN tabloc;
> >
> > Okay, so we'd have "table spaces" and "database spaces". Seems like one
> > "space" ought to be enough.
>
> Does your "database space" correspond to current PostgreSQL's database ?
> And is it different from SCHEMA ?

OK, seems I have things a little confused. My whole idea of database
locations vs. normal locations is flawed. Here is my new proposal.

First, I believe there should be locations define per database, not
global locations.

I recommend

CREATE TABLESPACE tabloc USING '/var/private/pgsql';
CREATE TABLE newtab ... IN tabloc;

and this does:

mkdir /var/private/pgsql/dbname
mkdir /var/private/pgsql/dbname/tabloc
ln -s /var/private/pgsql/dbname/tabloc data/base/tabloc

I recommend making a dbname in each directory, then putting the
location inside there.

This allows the same directory to be used for tablespaces by several
databases, and allows databases created in locations without making
special per-database locations.

I can give a more specific proposal if people wish.

Comments?

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-06-21 03:46:23 Re: Big 7.1 open items
Previous Message Chris Bitmead 2000-06-21 02:27:45 Re: Big 7.1 open items

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2000-06-21 03:46:23 Re: Big 7.1 open items
Previous Message Chris Bitmead 2000-06-21 02:27:45 Re: Big 7.1 open items