Re: Async unidirectional replication

Поиск
Список
Период
Сортировка
От Herbert Liechti
Тема Re: Async unidirectional replication
Дата
Msg-id 3981702D.4BE08688@thinx.ch
обсуждение исходный текст
Ответ на Async unidirectional replication  (Karl Trygve Kalleberg <karltk@prosalg.no>)
Список pgsql-general
> So, my question is, has somebody come up with good code for asynchronous
> unidirectional replication ? If so, I'd be very interested to hear about
> it.

I had to do a replication job in a project for an online newspaper database
by one of the biggest swiss newspapers.
Content is prepared on a development database. Publishers have
the ability to publish the content on different levels (i.e. level article,
level category, level product, level database). We made triggers
on the development database which are storing every insert, update
delete action on each table in a log table with a timestamp.

The program is written in Perl and is based on our Db/Web framework.
Presentation, business logic and data layers are completely separated
in the framework. The program uses only the data layer of the framework.

The program is easily configurable with a hash definition:

%blmAbgleich::ruleset = (
   Artikel          =>
      { before =>
                  [
                    [ Rubriken          => 'rubrikId' ],
                    [ Ausgaben          => 'ausgabeId' ],
                  ],
        after  =>
                  [
                    [ DossierArtikel    => 'artikelId' ],
                    [ SlArtikel         => 'artikelId' ],
                    [ ArtikelArtikel    => 'oberId' ],
                    [ ArtikelArtikel    => 'unterId' ],
                    [ BilderArtikel     => 'artikelId' ],
                  ],
      } .....
)

That means when a record of the table artikel must be replicated
the program has to look first in the tables rubriken and ausgaben
referenced by the foreign key fields rubrikId and ausgabeId. After
that the record itself is replicated and then all depending  records
on that record (i.e.. DossierArtikel joined by artikelId) are
replicated. Therefore referential integrity is always ensured even
in a recursive relationship.

This is now working since 3 month without any problems. Its running
on a informix ORDBMS but the framework was initially made for Postgres
and later ported to Informix and should therefore run in a Postgres environment.

If you are interested in please contact me.

Best regards Herbie


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti                     E-Mail: Herbert.Liechti@thinx.ch
ThinX networked business services        Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




В списке pgsql-general по дате отправления:

Предыдущее
От: "Martin A. Marques"
Дата:
Сообщение: Re: Re: 4 billion record limit?
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: Re: Re: 4 billion record limit?