Re: pg_upgrade incorrectly equates pg_default and database tablespace - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: pg_upgrade incorrectly equates pg_default and database tablespace
Date
Msg-id 1333138307.28198.14.camel@sussancws0025
Whole thread Raw
In response to pg_upgrade incorrectly equates pg_default and database tablespace  (Ants Aasma <ants@cybertec.at>)
Responses Re: pg_upgrade incorrectly equates pg_default and database tablespace
List pgsql-hackers
On Thu, 2012-03-22 at 14:55 +0200, Ants Aasma wrote:
> Hi,
> 
> while working on a support case I stumbled upon a bug in pg_upgrade.
> Upgrade fails with "No such file or directory" when a database is
> moved to a non-default tablespace and contains a table that is moved
> to pg_default. The cause seems to be that the following test
> incorrectly equates empty spclocation with database tablespace:
> 
> tblspace = PQgetvalue(res, relnum, i_spclocation);
> /* if no table tablespace, use the database tablespace */
> if (strlen(tblspace) == 0)
>     tblspace = dbinfo->db_tblspace;
> 
> Patch to fix this is attached.

I confirmed this bug upgrading 9.1 to master, and that this patch fixes
it. Thank you for the report!

Patch looks good to me as well, with one very minor nitpick: the added
comment is missing an apostrophe.

Bruce, can you take a look at this?

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: "Erik Rijkers"
Date:
Subject: psql: tab-completion fails SET var=
Next
From: Tom Lane
Date:
Subject: Re: Speed dblink using alternate libpq tuple storage