Re: Is 7.3 a good time to increase NAMEDATALEN ?

Lists: pgsql-hackers
From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is 7.3 a good time to increase NAMEDATALEN ?
Date: 2002-05-21 23:30:29
Message-ID: D90A5A6C612A39408103E6ECDD77B82920CE98@voyager.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> -----Original Message-----
> From: Neil Conway [mailto:nconway(at)klamath(dot)dyndns(dot)org]
> Sent: Tuesday, May 21, 2002 12:19 PM
> To: Joel Burton
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Is 7.3 a good time to increase NAMEDATALEN ?
>
>
> On Tue, 21 May 2002 11:41:26 -0400
> "Joel Burton" <joel(at)joelburton(dot)com> wrote:
> > Noticed that increasing NAMEDATALEN to 128 is still on the TODO.
>
> The last benchmarks I saw indicate that there's still a significant
> performance hit when increasing NAMEDATALEN, whether to 64 or 128.
>
> Given that only a small percentage of PostgreSQL users need long
> identifiers, and *everyone* would suffer the performance hit, I'd
> rather that we not touch NAMEDATALEN until more work has been
> done on attempting to reduce the performance penalty.
>
> Until then, the people who absolutely, positively must have long
> identifiers can just raise NAMEDATALEN themselves.

I'm sure that this is an idiotic thing to say, but why not just make it
varchar?

Most of the time the database objects will be small (maybe 10 characters
on average) but sometimes you want them to be really large.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dann Corbit" <DCorbit(at)connx(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is 7.3 a good time to increase NAMEDATALEN ?
Date: 2002-05-22 03:49:58
Message-ID: 20850.1022039398@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Dann Corbit" <DCorbit(at)connx(dot)com> writes:
> I'm sure that this is an idiotic thing to say, but why not just make it
> varchar?

The main reason NAME is a fixed-length datatype is that we'd have to
rewrite (and make slower) a lot of catalog-accessing code that expects
to be able to access other fields in catalog tuples at fixed offsets.
I do not think it's worth it.

Also, the existing performance bottlenecks look to me to be associated
with assumptions that NAME is fixed-length. To convert to varlena NAME,
we'd still have to fix all that code.

regards, tom lane