TuX as LLG logo
Software
DMX4Linux
Driver Suite for Linux
csv2iif.pl suite
convert PayPal transactions to IIF, OFX, QIF
Hardware
DMX30 Interface
128Ch SPP
DMX43 Interface
2out 2in EPP
LED Hardware
for Linux and Windows
EPROM Sampler
for 8 bits of sound
Misc
CatWeasel
Linux drivers for MK3/4 PCI
pg_trompe
PostgreSQL replication
trycatch
C exception/signal handling lib
Patches
to various software
Tools
and small scripts
Docs
misc documents
Links
to lighting stuff

pg_trompe schema documentation

SCHEMA replication

Contains all functions and tables used for pg_trompe replication.

TABLE replication.config

Contains configuration "e;variables"e; for replication process.
Column key: variable name
Column val: variable value
Column description: variable description

TABLE replication.tables

Contains all table names which are replicated.
Column nr: primary key containing unique integer number of the row
Column name: name of the table
Column lo: if true the table contains an "e;lo"e; column referencing large object OIDs.

TABLE replication.nodes

Contains information on the replication neighbour nodes.
Column num: node number
Column description: node information string
Column timestamp: when node was added to replication
Column timestamp: of last replication run

FUNCTION replication.nodes_insert()

Trigger function which writes INSERT rows into the replication.log table for all replicated tables when a new node is added. The function is called by an insert trigger on table replication.nodes.

TABLE replication.nodes_skip

Contains node numbers of nodes which should be skipped by the replication triggers. This table contains our own node number and the remote node number during replication.
Column num: node number of a node from table replication.nodes

TABLE replication.log

Contains events on replicated tables which have not been replicated to neighbour nodes.
Column id: sequential integers to keep track of event ordering
Column node: node number to which event must be replicated
Column tablename: name of the table
Column action: event type. Allowed values are 'INSERT', 'UPDATE', 'DELETE', 'DDL'.
Column nr: unique row-identifying number in "e;tablename"e;. Is NULL for 'DDL' action.
Column lo: OID of affected large object. Can be NULL if no large object is involved in this event.

VIEW replication.nodestats

Shows the amount of events not replicated to neighbour nodes.

FUNCTION replication.newevent(tablename_ text, action_ text, nr_ int8, lo_ int8)

Inserts a new event into replication.log for all neighbour nodes.
param tablename_: table name which contains row
param action_: event type. See TABLE replication.log for valid values.
param nr_: row identifier or NULL
param lo_: large object OID or NULL

FUNCTION replication.tableevent()

Trigger function on replicated table without large object (lo) column which creates entries in replication.log.

FUNCTION replication.loevent()

Trigger function on replicated table with large object (lo) column which creates entries in replication.log.

FUNCTION replication.setseq(tablename text)

Sets the "e;nr"e; sequence on "e;tablename"e; to a new value which will allow the table to be used in replication.
return: -1 upon error, 1 upon success

FUNCTION replication.setallseq()

Sets "e;nr"e; sequences for all replicated tables.
return: 0 upon success

FUNCTION replication._register(tablename text)

Internal function to add a table to replication.
return: 0 upon success, -1 upon error

FUNCTION replication.register(tablename text)

Register a table for replication.
param tablename: name of the table. You may have to provide the schema name if the schema is not in the default search path.
return: tablename upon success, NULL upon error

FUNCTION replication.registerlo(tablename text)

Register a table with "e;lo"e; column to manage large objects for replication.
param tablename: name of the table. You may have to provide the schema name if the schema is not in the default search path.
return: tablename upon success, NULL upon error

FUNCTION replication.node_num(num_ int, d text)

Configure this database for replication.
param num_: node number of this database
param d: description string of this node
return: num_ upon success, -1 upon error

FUNCTION replication.drop_node(n int)

Drop a neighbouring node from replication.
param n: neighbour node number.
return: n upon success, -1 upon error.

FUNCTION md5(id oid)

Calculates the MD5 sum of a large object.
param id: OID of large object
return: MD5 sum, or exception of large object does not exist

FUNCTION replication.ddl(t text)

Executes and replicates DDL commands.
param t: string containing DDL
return: 0 upon success, -1 upon error

FUNCTION replication.start(remote_num int)

Starts a replication with a neighbour node. This function is called by replication.pl.
param remote_num: neighbour node number
return: 0 upon success, -1 upon error

FUNCTION replication.stop(remote_num int)

Stops the replication with a neighbour node. This function is called by replication.pl.
param remote_num: neighbour node number
return: 0 upon success, -1 upon error

FUNCTION replication.truncate(tablename_ text)

Truncates a table.
param tablename_: name of table to truncate. You may have to provide the schema name if the schema is not in the default search path.
return: 0 upon success, -1 upon error

FUNCTION lo_dump(id oid)

Converts a large object to text.
param lo: large object OID
return: text

Search:
https://llg.cubic.org © 2001-2024 by Dirk Jagdmann