/
postgresql.ad
64 lines (48 loc) · 2.23 KB
/
postgresql.ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
=== PostgreSQL
SymmetricDS has bulk loading capability available for Postgres. SymmetricDS specifies data loader types on a channel by channel basis.
To utilize Postgres Bulk loading versus straight JDBC insert, specify the Postgres Bulk Loader ("postgres_bulk") in the data_loader_type column of sym_channel.
Starting with PostgreSQL 8.3, SymmetricDS supports the transaction identifier.
Binary Large Object (BLOB) replication is supported for both byte array (BYTEA) and object ID (OID) data types.
In order to function properly, SymmetricDS needs to use session variables.
Before PostgreSQL 9.2, session variables are enabled using a custom variable class. Add the following line to the postgresql.conf file of PostgreSQL server on versions before 9.2:
----
custom_variable_classes = 'symmetric'
----
This setting is required on versions before 9.2, and SymmetricDS will log an error and exit if it cannot set session variables.
PostgreSQL versions 9.2 or later do not require this setting.
Before database triggers can be created by in PostgreSQL, the plpgsql language handler must be installed on the database.
If plpgsql is not already installed, the following statements can be run by the administrator on the database:
[source, SQL]
----
CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler AS
'$libdir/plpgsql' LANGUAGE C;
CREATE FUNCTION plpgsql_validator(oid) RETURNS void AS
'$libdir/plpgsql' LANGUAGE C;
CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql
HANDLER plpgsql_call_handler
VALIDATOR plpgsql_validator;
----
If you want SymmetricDS to install into a schema other than public you can alter the database user to set the default schema.
[source, SQL]
----
alter user {user name} set search_path to {schema name};
----
When multiple users are involved, the SymmetricDS user will need the following privileges:
[source, SQL]
----
GRANT USAGE ON SCHEMA {schema name} TO {user name};
GRANT CREATE ON SCHEMA {schema name} TO {user name};
----
.supported data types
|===
|Data Type|Supported?
|SmallInt, Integer, BigInt|Yes
|Decimal, Numeric|Yes
|Real, Double Precesion|Yes
|Serial, BigSerial|Yes
|Char, Varchar, Text|Yes
|Money|No
|Timestamp, Date, Time, Interval|Yes
|Enum|No
|Point, Lseg, Box, Path, Polygon, Circle|Yes
|===