Skip site navigation (1) Skip section navigation (2)

General Bug Report: alter table tabname rename to newname does not rename extra files

From: Unprivileged user <nobody>
To: pgsql-bugs(at)postgresql(dot)org
Subject: General Bug Report: alter table tabname rename to newname does not rename extra files
Date: 1999-04-29 14:49:11
Message-ID: 199904291449.KAA83919@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Jim Mercer
Your email address      : jim(at)reptiles(dot)org

Category                : runtime: back-end
Severity                : critical

Summary: alter table tabname rename to newname does not rename extra files

System Configuration
--------------------
  Operating System   : FreeBSD 2.x/3.x

  PostgreSQL version : 6.4 and 6.4.2

  Compiler used      : gcc

Hardware:
---------
Pentium 128M ram
FreeBSD bigbird.nag.ca 3.0-RELEASE FreeBSD 3.0-RELEASE #1: Tue Feb  2 22:50:41 EST 1999     root(at)bigbird(dot)nag(dot)ca:/usr/src/sys/compile/BIGBIRD  i386


Versions of other tools:
------------------------


--------------------------------------------------------------------------

Problem Description:
--------------------
when a table exceeds 2gb, it appears that postgres will create subfiles for the data.
when you rename a table, the sub files do no get renamed.
see backend/commands/rename.c [renamerel()]

--------------------------------------------------------------------------

Test Case:
----------
create a table in excess of 2gig, which in turn creates subfiles
in data/base/tabname.
rename the table.
the subfiles are not renamed.


--------------------------------------------------------------------------

Solution:
---------
possible solution is to check if the table has subfiles, look for those subfiles and rename them as well.


--------------------------------------------------------------------------


Responses

pgsql-bugs by date

Next:From: Sezai YILMAZDate: 1999-04-30 12:17:46
Subject: Alter Table Bug
Previous:From: J.V.Date: 1999-04-27 21:39:02
Subject: Looking for an old LabVIEW SQL toolkit licence...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group