Proposed dbmirror change - Mailing list pgsql-general

From Achilleus Mantzios
Subject Proposed dbmirror change
Date
Msg-id Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com
Whole thread Raw
List pgsql-general
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


pgsql-general by date:

Previous
From: "Alex Turner"
Date:
Subject: Re: [Bulk] General advice on database/web applications
Next
From: Dick Kniep
Date:
Subject: Schema's versus tablespace