Re: smallserial / serial2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: smallserial / serial2
Date
Msg-id 9405.1303395976@sss.pgh.pa.us
Whole thread Raw
In response to smallserial / serial2  ("Mike Pultz" <mike@mikepultz.com>)
Responses Re: smallserial / serial2  ("Mike Pultz" <mike@mikepultz.com>)
List pgsql-hackers
"Mike Pultz" <mike@mikepultz.com> writes:
> I use tables all the time that have sequences on smallint's; 
> I'd like to simplify my create files by not having to create the sequence
> first, but I also don't want to give up those 2 bytes per column!

A sequence that can only go to 32K doesn't seem all that generally
useful ...

Are you certain that you're really saving anything?  More likely than
not, the "saved" 2 bytes are going to disappear into alignment padding
of a later column or of the whole tuple.  Even if it really does help
for your case, that's another reason to doubt that it's generally
useful.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: hot backups: am I doing it wrong, or do we have a problem with pg_clog?
Next
From: Andres Freund
Date:
Subject: Re: hot backups: am I doing it wrong, or do we have a problem with pg_clog?