[HACKERS] Rod Taylor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[HACKERS] Rod Taylor

Narasimha.Sridhar

Hi Rod Taylor,


ajs at crankycanuck.ca wrote


>On Thu, May 26, 2005 at 11:18:12AM +0630, Narasimha.Sridhar at cybernetsoft.com wrote:
>> Hi
>>
>> Can anybody tell me whether Slony-I replication works with Postgres
>> v7.2.1. I dont
>> see any document specifying the minimum postgres version required by
>> Slony-I.

>Slony-I requires 7.3 or later.  Rod Taylor, on this list, has
>mentioned that he hacked it to work for his 7.2 -> later version
>pgrade.  He's aso told me that it wasn't exactly fun; but it's not
>impossible, for special cases.  I don't think I'd want to run with it
>for any length of time.

>At the VERY LEAST, you'd best get off 7.2.1 to something later (i.e.
>the last 7.2 release).  ISTR some nasty bug or other in 7.2.1.

I heard for Andrew Sullivan that you managed to hack Slony-I to work for postgre 7.2.
Can you tell me how you did as it would me helpful to me

Thanks & Regards
Sridhar
Reply | Threaded
Open this post in threaded view
|

Re: [HACKERS] Rod Taylor

Rod Taylor
> >At the VERY LEAST, you'd best get off 7.2.1 to something later (i.e.
> >the last 7.2 release).  ISTR some nasty bug or other in 7.2.1.
>
> I heard for Andrew Sullivan that you managed to hack Slony-I to work
> for postgre 7.2.
> Can you tell me how you did as it would me helpful to me

I no longer have the code, but (from memory) this is approximately what
you need to do:

      * Take the 7.3 templates and copy them to 7.2 -- or otherwise
        hardcode the version your using to pick up the 7.3 templates
      * Remove all traces of schemas from the code and sql templates. I
        basically changed the "." to an "_".
      * Bunch of work related to the XID datatype and functions. For
        example, Slony creates CASTs for the xid to xxid and back -- but
        7.2 cannot create new casts that way so you need to edit system
        tables by hand. I recall creating an Operator Class and editing
        several functions as well.
      * sl_log_1 will have severe performance problems with any kind of
        data volume. This required a number of index and query changes
        to optimize for 7.2. 7.3 and above are quite a bit smarter in
        terms of optimizations they can apply.
      * Don't bother trying to make sequences work. Do them by hand
        after the upgrade using pg_dump and grep.

Of course, now that you have done all of the above, it's not compatible
with standard Slony now. So you either need to implement 7.2 in a less
hackish way, or you can also hack up slony to work without schemas on
newer versions of PostgreSQL so they can talk to each other.

Almost immediately after getting the DB upgraded from 7.2 to 7.4, we
deinstalled the hacked up Slony (by hand for the most part), and started
a migration from 7.4 to 7.4 on a different machine using the regular
Slony. This was primarily to ensure we didn't keep our system catalogues
which had been manually fiddled with.

All that said, we upgraded a few hundred GB from 7.2 to 7.4 with about
30 minutes actual downtime (versus 48 hours for a dump / restore cycle)
and no data loss.
--


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [hidden email] so that your
      message can get through to the mailing list cleanly