pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@postgresql.org, <pgsql-sql@postgresql.org>
To: pgreplication-general@gborg.postgresql.org
Subject: Proposed dbmirror change
Date: Tue, 28 Mar 2006 11:16:06 +0300 (EEST)
Message-ID: <Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com> (raw)


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




Message-ID: <Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com, pgreplication-general@gborg.postgresql.org
  Subject: Re: Proposed dbmirror change
  In-Reply-To: <Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com>
  References: <Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox