Re: ALTER TYPE 0: Introduction; test cases

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER TYPE 0: Introduction; test cases
Date: 2011-01-11 11:37:33
Message-ID: AANLkTi=7+c42to2qSwMRKC5QjcetVuK1k81kxKccAuiL@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 9, 2011 at 4:59 PM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> This begins the patch series for the design I recently proposed[1] for avoiding
> some table rewrites in ALTER TABLE ... ALTER COLUMN ... TYPE.  I'm posting these
> patches today:
>
> 0 - new test cases

This doesn't look right. You might be building it, but you sure
aren't rebuilding it.

+CREATE TABLE parent (keycol numeric PRIMARY KEY);
+NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"parent_pkey" for table "parent"
+DEBUG: Rebuilding index "parent_pkey"

In general, I think this is six kinds of overkill. I don't think we
really need 2000 lines of new regression tests for this feature. I'd
like to see that chopped down by at least 10x.

I don't like this bit:

+ ereport(IsToastRelation(indexRelation) ? DEBUG2 : DEBUG1,

I see no reason to set the verbosity differently depending on whether
or not something's a toast relation; that seems more likely to be
confusing than helpful. I guess my vote would be to make all of these
messages DEBUG2, period. A quick test suggests that doesn't produce
too much noise executing DDL commands.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-11 11:39:02 Re: LOCK for non-tables
Previous Message Tatsuo Ishii 2011-01-11 11:31:44 Re: LOCK for non-tables