Search Postgresql Archives

Re: Gradual migration from integer to bigint?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Healy <james@xxxxxxxxx> writes:
> However it doesn't really address the question of a gradual migration
> process that can read 32bit ints but insert/update as 64bit bigints. I
> remain curious about whether the postgres architecture just makes that
> implausible, or if it could be done and just hasn't because the
> options for a more manual migration are Good Enough.

I think what you're asking for is a scheme whereby some rows in a
table have datatype X in a particular column while other rows in
the very same physical table have datatype Y in the same column.
That is not happening, because there'd be no way to tell which
case applies to any particular row.

You could fantasize about labeling individual rows somehow, but
it's mere fantasy because there's noplace to put such labels.
To the limited extent that we can find spare space in the
existing page layout, there are far better use-cases (see
nearby discussions about 64-bit XIDs, for example).  And nobody
is going to advocate breaking on-disk compatibility for this,
especially not a break that adds more per-row overhead.

So really the only way forward for this would be to provide more
automation for the existing conversion processes involving table
rewrites.  That's possible perhaps, but it doesn't really sound
compelling enough to justify a lot of work.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux