Proposed dbmirror change

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general(at)postgresql(dot)org, <pgsql-sql(at)postgresql(dot)org>, <pgreplication-general(at)gborg(dot)postgresql(dot)org>
Subject: Proposed dbmirror change
Date: 2006-03-28 08:16:06
Message-ID: Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


hi again

i made one mod to dbmirror.

1) I implemented a mechanism to exclude attributes (columns) from
dbmirror'ed tables.

I added one table

CREATE TABLE dbmirror_exclude_attributes (
tblname character varying(100) NOT NULL,
attnames text[] NOT NULL
);

ALTER TABLE ONLY dbmirror_exclude_attributes
ADD CONSTRAINT dbmirror_exclude_attributes_pkey PRIMARY KEY (tblname);

and one function

bool isExcluded(char *cpTableName,TupleDesc tTupleDesc, int iColumnCounter);

which is called in packageData, and examines to see if this
column should be excluded.
The contents of dbmirror_exclude_attributes are like:
dynacom=# SELECT * from dbmirror_exclude_attributes;
tblname | attnames
--------------------------+---------------------------
"public"."mariner" | {parentid,relationtypeid}
"public"."marinerpapers" | {mpaid}
(2 rows)

dynacom=#

One use of it would be the selective mirroring of only a subset of
all of one table's columns, excluding e.g. huge bytea columns,
where the communication link is for instance ultra expensive and
unreliable SAT connection.

Another use case would be the exclusion of sensitive information
like credit card numbers or medical data.

What do you all think?

-Achilleus

Browse pgsql-general by date

  From Date Subject
Next Message Ashley Moran 2006-03-28 08:43:05 Re: What to index to speed up my UNION views?
Previous Message Dick Kniep 2006-03-28 07:56:20 Re: Schema's versus tablespace

Browse pgsql-sql by date

  From Date Subject
Next Message Maciej Piekielniak 2006-03-28 09:13:03 Re: cursor and for update
Previous Message Eugene E. 2006-03-28 05:54:12 Re: Permission to Select