Thread: Tablespaces for indexes, tables and databases

Tablespaces for indexes, tables and databases

From
Erwin Brandstetter
Date:
Hi developers! Hi Dave!


Testing the pgAdmin III 1.8.0  Beta 4 (Sep 4 2007, rev: 6608:6609).
Client Win XP, host: Debian Etch / PG 8.2.4 and Debian Sarge / PG 8.1.8

Moving indexes to different tablespaces via properties dialog seems to
work fine now. Good job!

The reverse engineered SQL for tables, indexes and databases includes an
extra line 'TABLESPACE pg_default' now, which seems redundant while it
matches the default (tablespace of the database / default_tablespace /
pg_default -- whichever comes first). We could get rid of the line for
these cases, i.e. in most cases.

There used to be an "empty" option in the combo box "Tablespace" (it
just did not work yet), which could do just that, explicitely.


== quote==
-- Index: test_myidx

-- DROP INDEX test_myidx;

CREATE INDEX test_myidx
  ON test
  USING btree
  (my_field)
  TABLESPACE pg_default;
== unquote==


Regards
Erwin

Re: Tablespaces for indexes, tables and databases

From
Dave Page
Date:
Erwin Brandstetter wrote:
> Hi developers! Hi Dave!
>
> Moving indexes to different tablespaces via properties dialog seems to
> work fine now. Good job!

Thanks.

> The reverse engineered SQL for tables, indexes and databases includes an
> extra line 'TABLESPACE pg_default' now, which seems redundant while it
> matches the default (tablespace of the database / default_tablespace /
> pg_default -- whichever comes first). We could get rid of the line for
> these cases, i.e. in most cases.

Done.

> There used to be an "empty" option in the combo box "Tablespace" (it
> just did not work yet), which could do just that, explicitely.

Yeah, I got rid of the blank option altogether. All the dialogues should
now display the actual tablespace being used.

Thanks, Dave.

Re: Tablespaces for indexes, tables and databases

From
Erwin Brandstetter
Date:
Erwin Brandstetter wrote:
> (...) (tablespace of the database / default_tablespace / pg_default --
> whichever comes first).

Just for the record: actually this should read:  (default_tablespace /
tablespace of the database) -- whichever comes first.
If the parameter "default_tablespace" is set, it is used.
If not, the tablespace of the database is used (which defaults to the
tablespace of template at creation time,  which, in turn, defaults to
"pg_default").

But I assume you got that right anyway.


Regards
Erwin

Re: Tablespaces for indexes, tables and databases

From
"Dave Page"
Date:

> ------- Original Message -------
> From: Erwin Brandstetter <a9006241@unet.univie.ac.at>
> To: pgadmin-hackers@postgresql.org
> Sent: 06/09/07, 16:44:28
> Subject: Re: [pgadmin-hackers] Tablespaces for indexes, tables and databases
>
> Erwin Brandstetter wrote:
> > (...) (tablespace of the database / default_tablespace / pg_default --
> > whichever comes first).
>
> Just for the record: actually this should read:  (default_tablespace /
> tablespace of the database) -- whichever comes first.
> If the parameter "default_tablespace" is set, it is used.
> If not, the tablespace of the database is used (which defaults to the
> tablespace of template at creation time,  which, in turn, defaults to
> "pg_default").
>
> But I assume you got that right anyway.

Yes :-)

/D