Re: pg_migrator issues

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_migrator issues
Date: 2010-01-06 16:11:02
Message-ID: 201001061611.o06GB2615077@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala wrote:
> Dne 4.01.10 19:28, Alvaro Herrera napsal(a):
> > Bruce Momjian escribi?:
> >
> >> I considered that but realize that pg_migrator has to read
> >> pg_controldata in both the old and new servers, meaning it would need
> >> access to both C structures, and considering they both have the same
> >> structure names, that would require some odd C tricks. Add to that you
> >> don't know which version of Postgres you are migrating from/to during
> >> compile and the idea of using C becomes even less attractive.
> >
> > However, keep in mind that this might not be the last time on which we
> > will want to read something from a C struct, so perhaps it would be good
> > to bite the bullet and write the odd tricks. Does it already have
> > access (at compile time) to the old and new source trees?
>
> I have some proof of concept when each control data struct version
> version have one header file like pg_control_843.h and structure like
> ControlFileData has name ControlFileData_843. The main pg_control.h
> defines types without version like
>
> typedef ControlFileData_843 ControlFileData;
>
> I planed to do it for 8.5 but unfortunately no time :( commit fest is
> too close.

Yea, I think the confusion of doing it isn't worth it.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-06 16:14:38 Re: Status of plperl inter-sp calling
Previous Message Andrew Dunstan 2010-01-06 16:07:35 Re: Status of plperl inter-sp calling