I made a modification on DBMirror.pl,
an addition in the slavedatabase.conf file,
and added another replication table "specialtables".
The goal was to have a way of controlling
when a row of table (if the table is present in specialtables),
will be mirrored to the remote slave.
Lets assume, we have a bank's central IT DEPT master DB
and some branches abroad.
Rows in some tables (e.g. personel, branches, statistics on transactions,
etc...)
have no reason to be replicated to all sites, but only
those sites that these rows refer to:
E.G.
we have
test=# \d personel
Table "public.personel"
Column | Type | Modifiers
---------------+------------------------+-----------
id | integer | not null
name | character varying(20) |
branchid | integer |
test=#
or
test=# \d branch
Table "public.personel"
Column | Type | Modifiers
---------------+------------------------+-----------
id | integer | not null
country | character varying(20) |
address | text |
test=#
And we require that insert, updates on table branch with id = 1
go only to remote site (the ip of) branch 1,
and that inserts,updates on personel with branchid = 2,
in the same fashion, go only to (the ip of) branch 2.
I retain the table specialtables
test=# \d specialtables
Table "public.specialtables"
Column | Type | Modifiers
---------------+------------------------+-----------
tblname | character varying(100) | not null
siteidkeyname | character varying(20) |
Indexes: specialtables_pkey primary key btree (tblname)
test=#
in which for each conditional table, the corresponding
column name (the value of siteidkeyname) is given
which indicates against which column in the PendingData.Data
column is to be examined for equality against the site id.
The site id for each slave is defined in an additional field
in slaveInfo struct in slavedatabase.conf.
Please tell me if i should send the patches
to DBMirror.pl, MirrorSetup.sql, and slavedatabase.conf.
--
================================================== ================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-210-8981112
fax: +30-210-8981877
email: achill at matrix dot gatewaynet dot com
mantzios at softlab dot ece dot ntua dot gr
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster 2 1841
Sure, send the patches to the patches list and we will get them applied.
I am not sure if I can get them into 7.4. It depends if the dbmirror
author can review them.
---------------------------------------------------------------------------
Achilleus Mantzios wrote:
I made a modification on DBMirror.pl, an addition in the slavedatabase.conf file, and added another replication table "specialtables".
The goal was to have a way of controlling when a row of table (if the table is present in specialtables), will be mirrored to the remote slave.
Lets assume, we have a bank's central IT DEPT master DB and some branches abroad.
Rows in some tables (e.g. personel, branches, statistics on transactions, etc...) have no reason to be replicated to all sites, but only those sites that these rows refer to:
E.G. we have test=# \d personel Table "public.personel" Column | Type | Modifiers ---------------+------------------------+----------- id | integer | not null name | character varying(20) | branchid | integer | test=#
or test=# \d branch Table "public.personel" Column | Type | Modifiers ---------------+------------------------+----------- id | integer | not null country | character varying(20) | address | text | test=#
And we require that insert, updates on table branch with id = 1 go only to remote site (the ip of) branch 1, and that inserts,updates on personel with branchid = 2, in the same fashion, go only to (the ip of) branch 2.
I retain the table specialtables test=# \d specialtables Table "public.specialtables" Column | Type | Modifiers ---------------+------------------------+----------- tblname | character varying(100) | not null siteidkeyname | character varying(20) | Indexes: specialtables_pkey primary key btree (tblname)
test=#
in which for each conditional table, the corresponding column name (the value of siteidkeyname) is given which indicates against which column in the PendingData.Data column is to be examined for equality against the site id.
The site id for each slave is defined in an additional field in slaveInfo struct in slavedatabase.conf.
Please tell me if i should send the patches to DBMirror.pl, MirrorSetup.sql, and slavedatabase.conf.
-- ================================================== ================ Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill at matrix dot gatewaynet dot com mantzios at softlab dot ece dot ntua dot gr ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to ma*******@postgresql.org so that your message can get through to the mailing list cleanly
--
Bruce Momjian | http://candle.pha.pa.us pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Hi,
any news on applying the patches to dbmirror??
Thanx.
On Sun, 10 Aug 2003, Bruce Momjian wrote: Sure, send the patches to the patches list and we will get them applied. I am not sure if I can get them into 7.4. It depends if the dbmirror author can review them.
---------------------------------------------------------------------------
Achilleus Mantzios wrote:
I made a modification on DBMirror.pl, an addition in the slavedatabase.conf file, and added another replication table "specialtables".
The goal was to have a way of controlling when a row of table (if the table is present in specialtables), will be mirrored to the remote slave.
Lets assume, we have a bank's central IT DEPT master DB and some branches abroad.
Rows in some tables (e.g. personel, branches, statistics on transactions, etc...) have no reason to be replicated to all sites, but only those sites that these rows refer to:
E.G. we have test=# \d personel Table "public.personel" Column | Type | Modifiers ---------------+------------------------+----------- id | integer | not null name | character varying(20) | branchid | integer | test=#
or test=# \d branch Table "public.personel" Column | Type | Modifiers ---------------+------------------------+----------- id | integer | not null country | character varying(20) | address | text | test=#
And we require that insert, updates on table branch with id = 1 go only to remote site (the ip of) branch 1, and that inserts,updates on personel with branchid = 2, in the same fashion, go only to (the ip of) branch 2.
I retain the table specialtables test=# \d specialtables Table "public.specialtables" Column | Type | Modifiers ---------------+------------------------+----------- tblname | character varying(100) | not null siteidkeyname | character varying(20) | Indexes: specialtables_pkey primary key btree (tblname)
test=#
in which for each conditional table, the corresponding column name (the value of siteidkeyname) is given which indicates against which column in the PendingData.Data column is to be examined for equality against the site id.
The site id for each slave is defined in an additional field in slaveInfo struct in slavedatabase.conf.
Please tell me if i should send the patches to DBMirror.pl, MirrorSetup.sql, and slavedatabase.conf.
-- ================================================== ================ Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill at matrix dot gatewaynet dot com mantzios at softlab dot ece dot ntua dot gr ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to ma*******@postgresql.org so that your message can get through to the mailing list cleanly
--
================================================== ================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-210-8981112
fax: +30-210-8981877
email: achill at matrix dot gatewaynet dot com
mantzios at softlab dot ece dot ntua dot gr
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Achilleus Mantzios |
last post by:
Hi,
first off, i broadcast my case to as many people as possible,
maybe off topic for many, but maybe as well of interest for some.
Also i speak sort of DBMirror terminology ( a great and simple...
|
by: Jan Wieck |
last post by:
Dear community,
for some reason the post I sent yesterday night still did not show up on
the mailing lists. I have set up some links on the developers side under...
|
by: Anthony Best |
last post by:
I'm working on an idea that uses sequences.
I'm going to create a table like this:
id serial,
sequence int,
keyword varchar(32),
text text
for every keyword there will be a uniq sequence...
|
by: Andreas |
last post by:
Hello list,
did someone try successfully to use the replication extension that was
released to the community this summer ?
Maybe someone could share his/her impressions and produce a tiny...
|
by: Steven job |
last post by:
What is the best replication option out there today for postgresql.
Have been trying to get rserv working and that hasn't been the
easiest.
Would like to run 7.4.1.
Any suggestions?
-Steve
|
by: Vidyasagara Guntaka |
last post by:
Hi,
I'm new to this list. I'm Sagar. Our company is seriously considering using Postgresql for our storage virtualization solution. To be able to use the database, replication is must for us....
|
by: David Parker |
last post by:
Hi. I'm new to postgresql in general, and have been tasked with coming
up with a replication solution for our postgresql based application.
Assuming we don't bite off trying to roll our own...
|
by: Jon Brisbin |
last post by:
We're trying to figure out how we can implement a reasonably simple cluster
of postgres servers on a private network at our store locations. The idea
is to have a group of 2-6 PCs each be able to...
|
by: ntech |
last post by:
Hello everyone,
I am really in a great problem. I have been using dbmirror as the replication method for postgresql. But now the requirement is it has to be both way (i.e. from the primary server to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |