Обсуждение: Re: Partitioned tables & Slony

Поиск
Список
Период
Сортировка

Re: Partitioned tables & Slony

От
Chris Browne
Дата:
Goboxe <hadzramin.ar@gmail.com> writes:
> What need to be taken care of when replicating data from partitioned
> tables?
>
> I have several master tables that are inherited by date either daily,
> weekly and monthly.
>
> How to automate addition of newly created child tables into Slony
> cluster?

There's an outline of how to do it, in the partitioning test...

http://main.slony.info/viewcvs/viewvc.cgi/slony1-engine/tests/testpartition/
--
"cbbrowne","@","linuxdatabases.info"
http://linuxfinances.info/info/slony.html
"If we believe in data structures, we must believe in independent
(hence simultaneous) processing.  For why else would we collect items
within a structure?  Why do we tolerate languages that give us the one
without the other?" -- Alan J. Perlis

Re: Partitioned tables & Slony

От
Chris Browne
Дата:
Goboxe <hadzramin.ar@gmail.com> writes:
> Thanks Chris.
>
> How do I use *.sh & *.ik files?

The "*.sh" files are shell scripts that should run with any Bourne
shell; the *specific* intent is that they be invoked by the test
control script, "run_test.sh".

The "*.ik" files are (mostly) bodies of Slonik scripts; they require a
preamble that indicates cluster name and node connection information.

What you might want to do is to run the partitioning test.  You'd do
this by making sure you have PGPORT pointing to a postmaster with
Slony-I installed, and PGUSER set to a superuser, then, from the test
directory, run the command:

$ ./run_test.sh testpartition

This will run various scripts, using the ones in the "testpartition"
directory to control the test.

The script "generate_dml.sh" shows how any of the special scripts get
used.

The point of this is that it represents a regression test that
verifies that various aspects of replication work in conjunction with
table partitioning.  You won't be able to take the code directly, but
the code does represent an automated test that builds a cluster that
involves partitioning, and adds in new partitions "on the fly."
--
let name="cbbrowne" and tld="linuxfinances.info" in name ^ "@" ^ tld;;
http://linuxfinances.info/info/sgml.html
"The only thing  better than TV with the  sound off is  Radio with the
sound off." -- Dave Moon

Re: Partitioned tables & Slony

От
Goboxe
Дата:
Thanks Chris.

How do I use *.sh & *.ik files?

Goboxe

On Dec 19, 12:17 am, Chris Browne <cbbro...@acm.org> wrote:
> Goboxe <hadzramin...@gmail.com> writes:
> > What need to be taken care of when replicating data from partitioned
> > tables?
>
> > I have several master tables that are inherited by date either daily,
> > weekly and monthly.
>
> > How to automate addition of newly created child tables into Slony
> > cluster?
>
> There's an outline of how to do it, in the partitioning test...
>
> http://main.slony.info/viewcvs/viewvc.cgi/slony1-engine/tests/testpar...
> --
> "cbbrowne","@","linuxdatabases.info"http://linuxfinances.info/info/slony.html
> "If we believe in data structures, we must believe in independent
> (hence simultaneous) processing.  For why else would we collect items
> within a structure?  Why do we tolerate languages that give us the one
> without the other?" -- Alan J. Perlis