Re: create tablespace fails silently, or succeeds improperly

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: create tablespace fails silently, or succeeds improperly
Date: 2010-10-19 03:32:48
Message-ID: 201010190332.o9J3WmL28817@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Looking at the pg_upgrade code some more, I found that it was not
> > removing the PG_VERSION file when deleting <= 8.4 tablespace files.
> > This might confuse administrators so the attached patch adds the removal
> > of PG_VERSION. I would like to apply this to master and 9.0.X.
>
> ... why is that a good idea?

The script already deletes the 8.4 database directories, but leaves
PG_VERSION behind. Why keep it when all the 8.4 data is gone? The
script also dates PGDATA for 8.4, so there is nothing left pointing to
that directory. Here are the delete script file contents after the
patch:

#!/bin/sh

rm -rf /u/pgsql.old/data

rm -f /rtmp/pgsql/PG_VERSION
rm -rf /rtmp/pgsql/1
rm -rf /rtmp/pgsql/11564
rm -rf /rtmp/pgsql/16384
rm -rf /rtmp/pgsql/16385
rm -rf /rtmp/pgsql/27628

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-10-19 04:21:18 Re: WIP: extensible enums
Previous Message Brendan Jurd 2010-10-19 03:23:49 Re: Simplifying replication