Re: Using ALTER TABLESPACE in pg_dump

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using ALTER TABLESPACE in pg_dump
Date: 2004-10-20 01:06:18
Message-ID: 6.1.2.0.0.20041020105715.044ca970@203.8.195.10
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 04:20 AM 20/10/2004, Tom Lane wrote:
>Nope. I can break that trivially, eg:

Thats why in my first message I mentioned escaping and unescaping all '%'
in the deinition.

>There's also the nontrivial matter of how pg_dump would decide where to
>insert the %%tablespace%% string into the CREATE INDEX command in the
>first place.

I'd vote against parsing, and add a parameter to get_indexdef.

>If we're going to add code to parse CREATE INDEX and
>insert the tablespace in the correct place, meseems it'd be better to
>insert it on the pg_restore side.

But if we have to parse, I'd add it in pg_dump so all items that are
relevant can be dumped with '%%tablespace%%'. pg_dump still constructs
CREATE TABLE statements, so that is the natural place to add the tablespace
marker and avoid parsing for tables.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp.mit.edu:11371 |/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sailesh Krishnamurthy 2004-10-20 02:15:54 Re: plans for bitmap indexes?
Previous Message Simon Riggs 2004-10-20 00:15:00 Re: plans for bitmap indexes?