X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8AC079DCD22; Tue, 28 Mar 2006 03:09:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98609-06; Tue, 28 Mar 2006 03:09:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from matrix.gatewaynet.com (host2.dynacom.ondsl.gr [62.103.35.210]) by postgresql.org (Postfix) with ESMTP id B1AF79DCBF3; Tue, 28 Mar 2006 03:09:32 -0400 (AST) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id k2S8G6Op001475; Tue, 28 Mar 2006 11:16:06 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id k2S8G6TY001471; Tue, 28 Mar 2006 11:16:06 +0300 Date: Tue, 28 Mar 2006 11:16:06 +0300 (EEST) From: Achilleus Mantzios To: pgsql-general@postgresql.org, , Subject: Proposed dbmirror change Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200603/1325 X-Sequence-Number: 93190 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