Proposed dbmirror change

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема Proposed dbmirror change
Дата
Msg-id Pine.LNX.4.44.0603281054400.1400-100000@matrix.gatewaynet.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Alex Turner"
Дата:
Сообщение: Re: [Bulk] General advice on database/web applications
Следующее
От: Dick Kniep
Дата:
Сообщение: Schema's versus tablespace