2014-08-04

← Older revision

Revision as of 11:24, 4 August 2014

(3 intermediate revisions by one user not shown)

Line 4:

Line 4:

At time of writing (BDR 0.6) the restrictions are:

At time of writing (BDR 0.6) the restrictions are:

+

+

= Not implemented =

+

+

These statements can be supported under BDR, but support has not yet been implemented.

== No full table rewrites on <tt>ALTER TABLE</tt> ==

== No full table rewrites on <tt>ALTER TABLE</tt> ==

Line 27:

Line 31:

This restriction may be lifted in future, it is an implementation limitation.

This restriction may be lifted in future, it is an implementation limitation.

+

+

== <tt>CREATE TABLE AS ... </tt> and <tt>SELECT INTO "nonexistent table"</tt> ==

+

+

The <tt>CREATE TABLE AS</tt> statement and the equivalent <tt>SELECT INTO</tt> table creation, combine DDL with data row modifications in a single statement. This is not currently supported by BDR for the same reasons as the <tt>ALTER TABLE</tt> restrictions given above.

+

+

Instead, <tt>CREATE TABLE</tt> then perform a separate <tt>INSERT INTO ... SELECT</tt>.

== Partial unique indexes - <tt>CREATE UNIQUE INDEX ... WHERE ...</tt> ==

== Partial unique indexes - <tt>CREATE UNIQUE INDEX ... WHERE ...</tt> ==

Line 37:

Line 47:

This is largely an implementation restriction, but it's not trivial to solve. BDR would need to find the matching type oid on the remote end and make sure it's really the same thing. As this feature is rarely used support isn't a priority.

This is largely an implementation restriction, but it's not trivial to solve. BDR would need to find the matching type oid on the remote end and make sure it's really the same thing. As this feature is rarely used support isn't a priority.

+

+

== <tt>ALTER DOMAIN</tt> ==

+

+

<tt>ALTER DOMAIN</tt> is not currently supported, but may be supported in a future release.

+

+

== <tt>CREATE TYPE</tt> ==

+

+

<tt>CREATE TYPE</tt> is not currently supported for all subcommands, but may be supported in a future release.

+

+

Composite types, enums, and range types are supported.

+

+

== <tt>ALTER EXTENSION</tt> ==

+

+

<tt>ALTER EXTENSION</tt> is not currently supported, but may be supported in a future release.

+

+

However, BDR would need a way to guarantee that the same extension version is present on all nodes. So additional inter-node messaging would be required to support this, and is not currently implemented.

+

+

== <tt>CREATE LANGUAGE</tt> ==

+

+

Loading of new procedural languages is not supported while BDR is active, but may be supported in a future release.

+

+

(Deparse support pending).

+

+

== <tt>CREATE CONVERSION</tt> ==

+

+

<tt>CREATE CONVERSION</tt> is not currently supported, but may be supported in a future release.

+

+

== <tt>CREATE OPERATOR CLASS</tt>, <tt>CREATE OPERATOR FAMILY</tt>, and their <tt>ALTER</tt> variants ==

+

+

<tt>CREATE OPERATOR CLASS</tt>, <tt>CREATE OPERATOR FAMILY</tt>, <tt>ALTER OPERATOR CLASS</tt> and <tt>ALTER OPERATOR FAMILY</tt> are not yet supported by BDR, but may be supported in a future release.

+

+

(Deparse support pending).

+

+

== <tt>CREATE CAST</tt> ==

+

+

<tt>CREATE CAST</tt> is not yet supported by BDR but may be supported in a future release.

+

+

(Deparse support pending).

+

+

== Foreign data wrapper support commands ==

+

+

<tt>CREATE FOREIGN TABLE</tt>, <tt>ALTER FOREIGN TABLE</tt>, <tt>CREATE FOREIGN DATA WRAPPER</tt>, <tt>ALTER FOREIGN DATA WRAPPER</tt>, <tt>CREATE USER MAPPING</tt>, <tt>ALTER USER MAPPING</tt>and <tt>DROP USER MAPPING</tt> are not currently supported by BDR. Support is planned for a future release.

+

+

(Deparse support pending).

+

+

== <tt>ALTER TEXT SEARCH DICTIONARY</tt> and <tt>ALTER TEXT SEARCH CONFIGURATION</tt> ==

+

+

<tt>ALTER TEXT SEARCH DICTIONARY</tt> and <tt>ALTER TEXT SEARCH CONFIGURATION</tt> are not currently supported by BDR. Support is planned for a future release.

+

+

(Deparse support pending).

+

+

== <tt>REFRESH MATERIALIZED VIEW</tt> ==

+

+

<tt>REFRESH MATERIALIZED VIEW</tt> is not currently supported, but may be supported in a future release.

+

+

== <tt>RENAME ...</tt> of <tt>AGGREGATE</tt>s, <tt>COLLATION</tt>s, <tt>CONVERSION</tt>s, <tt>OPERATOR CLASS</tt>es, <tt>OPERATOR FAMILY</tt> ==

+

+

The above objects are not yet supported for <tt>RENAME</tt>. Support is planned for a future release. (Deparse support pending).

+

+

<tt>RENAME</tt> works fine for tables, views and other commonplace objects.

+

+

== <tt>ALTER ... SET SCHEMA</tt> ==

+

+

Setting the schema of an existing object is currently supported by BDR. Support is planned for a future release. (Deparse support pending).

+

+

== Unqualified DDL commands ==

+

+

Operations that might be prohibited on logged tables can't be run without specifying a table or list of tables, because BDR can't tell if they might affect logged tables.

+

+

== <tt>SECURITY LABEL</tt> ==

+

+

<tt>SECURITY LABEL</tt> is not yet supported by BDR but may be supported in a future release.

+

+

= Unsupportable =

+

+

These commands rely on features that cannot be properly supported under BDR.

== Exclusion constraints - <tt>ALTER TABLE ... ADD CONSTRAINT ... EXCLUDE</tt>, etc  ==

== Exclusion constraints - <tt>ALTER TABLE ... ADD CONSTRAINT ... EXCLUDE</tt>, etc  ==

Line 46:

Line 132:

To make exclusion constraints usable, BDR would need to take a system wide lock to work on a table with an exclusion constraint, or would need to use two-phase commit. In both cases this would essentially force fully synchronous replication for any transaction involving the exclusion constraint. This is not currently supported.

To make exclusion constraints usable, BDR would need to take a system wide lock to work on a table with an exclusion constraint, or would need to use two-phase commit. In both cases this would essentially force fully synchronous replication for any transaction involving the exclusion constraint. This is not currently supported.



== <tt>
ALTER DOMAIN
<tt> ==

+

== <tt>
DROP ... OWNED BY
<
/
tt> ==



<tt>
ALTER DOMAIN
</tt>
is not currently supported
,
but may
be
supported in a future release
.

+

It isn't safe to
<tt>
DROP ... OWNED BY
</tt>
in BDR
,
because user objects are global and the effect might
be
wider than intended
.



== <tt>CREATE TYPE</tt> ==

+

New core features may be required to restrict this operation to a single target database.



<tt>CREATE TYPE</tt> is not currently supported,
but
may be supported in a future release.

+

= Commands permitted
but
not replicated =



==
Unqualified DDL commands
==

+

==
User/role management
==



Operations that
might be prohibited
on
logged tables can't be run without specifying a table or list of tables
,
because
BDR
can't tell if they might
affect
logged tables
.

+

Operations that
act
on
the system-wide user information
,
like <tt>CREATE USER</tt>, <tt>CREATE ROLE</tt>, <tt>GRANT role TO username</tt>, etc are not replicated by
BDR
. They are permitted, but
affect
only the local node
.



= Commands permitted but not replicated =

+

Correctly replicating these is non-trivial as BDR may apply to more than one DB on a given PostgreSQL instance, and different DBs may even participate in different BDR groups.

+

+

It is recommended that user rights be synchronized externally.

== <tt>COMMENT ON</tt> ==

== <tt>COMMENT ON</tt> ==

At time of writing <tt>COMMENT ON</tt> is not blocked, but is not replicated. It is not considered vital for data integrity.

At time of writing <tt>COMMENT ON</tt> is not blocked, but is not replicated. It is not considered vital for data integrity.

Show more