Petr Jelinek [Mon, 6 Apr 2015 14:30:44 +0000 (16:30 +0200)]
Don't acquire table locks in command filter.
The filter_AlterTableStmt() function was using
AlterTableGetLockLevel(astmt->cmds) to determine lock level which to use
on relation being ALTERed. This can cause deadlock against bdr_apply
when the apply is trying to catch up with changes from another node to
synchronize cluster for a DDL lock - any concurrent DML that is coming
from another node will never get the row lock grant because the table is
already locked by the backend performing the ALTER on it.
We now get the relid with NoLock which should be safe as we don't allow
concurrent DDL anyway so the table can't change under our hands.
Petr Jelinek [Fri, 3 Apr 2015 23:45:07 +0000 (01:45 +0200)]
Fix global lock crash recovery on multidb setup
Since bdr_locks_startup() is called from perdb worker we should not try
to load the locks for all databases but only for the database the perdb
worker is connected to.
Petr Jelinek [Wed, 1 Apr 2015 20:26:59 +0000 (22:26 +0200)]
doc: Fix typos in function names.
Petr Jelinek [Wed, 1 Apr 2015 16:45:54 +0000 (18:45 +0200)]
Fix bdr.bdr_replication_identifier table definition
The bdr.bdr_replication_identifier was mistakenly defined in extension
SQL file with two additonal columns, but the C code didn't expect them
this lead to memory corruption. It was identified by make check failures
with clang compiler.
Craig Ringer [Wed, 1 Apr 2015 07:28:15 +0000 (15:28 +0800)]
Swap "node management" and "configuration settings" chapters
Per suggestion from Martín.
Closes #38
Craig Ringer [Wed, 1 Apr 2015 06:55:07 +0000 (14:55 +0800)]
Quickstart should be using bdr-plugin/next
Petr Jelinek [Sun, 29 Mar 2015 14:09:47 +0000 (16:09 +0200)]
doc: Print BDR version in the title.
Petr Jelinek [Sun, 29 Mar 2015 13:38:16 +0000 (15:38 +0200)]
doc: Add optinal website-build flag
Petr Jelinek [Fri, 27 Mar 2015 21:50:13 +0000 (22:50 +0100)]
doc: Make the font bit nices
Martín Marqués [Fri, 27 Mar 2015 11:04:00 +0000 (08:04 -0300)]
Several "to to" typos found, which are now fixed.
Petr Jelinek [Thu, 26 Mar 2015 17:00:03 +0000 (18:00 +0100)]
Fix identifier test so that it works for UDR too.
Petr Jelinek [Thu, 26 Mar 2015 16:58:06 +0000 (17:58 +0100)]
Revert inadvertent test change done in
d8fc209d5
Petr Jelinek [Thu, 26 Mar 2015 11:29:19 +0000 (12:29 +0100)]
doc: Remove mentions of bdr-plugin/stable branch from docs
Craig Ringer [Thu, 26 Mar 2015 02:40:07 +0000 (10:40 +0800)]
Document tree structure for github README
Petr Jelinek [Wed, 25 Mar 2015 20:53:53 +0000 (21:53 +0100)]
Fix PK detection on inherited tables.
We don't allow UPDATEs or DELETEs on tables without primary key but the
code for detecting if table has primary key didn't work correctly when
the UPDATE/DELETE was run on parent table which had primary key but the
command has propagated to an inherited table didn't have primary key.
In passing, fix the primary key detection for a less common use case:
WITH foo AS ( UPDATE table_without_pk ... RETURNING * )
INSERT INTO table_with_pk SELECT * FROM foo;
Craig Ringer [Wed, 25 Mar 2015 07:49:57 +0000 (15:49 +0800)]
doc: Be consistent about sudo prefix
Christoph Moench-Tegeder [Wed, 25 Mar 2015 11:28:36 +0000 (12:28 +0100)]
fix link
Ian Barwick [Wed, 25 Mar 2015 02:28:23 +0000 (11:28 +0900)]
doc: misc typo fixes
Ian Barwick [Wed, 25 Mar 2015 02:22:49 +0000 (11:22 +0900)]
doc: fix a couple of xreflabels
Ian Barwick [Wed, 25 Mar 2015 01:47:04 +0000 (10:47 +0900)]
doc: Reword installation requirements slightly
Petr Jelinek [Wed, 25 Mar 2015 00:51:11 +0000 (01:51 +0100)]
doc: psql provided by BDR-PG has seqam support in \ds.
Petr Jelinek [Wed, 25 Mar 2015 00:30:30 +0000 (01:30 +0100)]
doc: Remove incorrect warning about bdr.bdr_replicate_ddl_command().
Petr Jelinek [Tue, 24 Mar 2015 22:11:29 +0000 (23:11 +0100)]
doc: Debian/Ubuntu installation docs
Craig Ringer [Tue, 24 Mar 2015 17:18:45 +0000 (01:18 +0800)]
doc: Write some conflict docs, partly cribbed from wiki, partly new
Craig Ringer [Tue, 24 Mar 2015 14:32:59 +0000 (22:32 +0800)]
Bump version to 0.10.0 after 0.9.0 release
Craig Ringer [Tue, 24 Mar 2015 12:14:00 +0000 (20:14 +0800)]
doc: Mention 2ndQuadrant prominently in top level, relnotes
Craig Ringer [Tue, 24 Mar 2015 12:07:33 +0000 (20:07 +0800)]
doc: Document apt repo key ID
Craig Ringer [Tue, 24 Mar 2015 11:11:49 +0000 (19:11 +0800)]
doc: Make it clear that conflicts and repsets docs are in dev
Craig Ringer [Tue, 24 Mar 2015 10:50:19 +0000 (18:50 +0800)]
doc: Sort relnotes newest to oldest (desc)
Craig Ringer [Tue, 24 Mar 2015 10:49:18 +0000 (18:49 +0800)]
doc: Mention Debian/Ubuntu packages
Craig Ringer [Tue, 24 Mar 2015 10:30:36 +0000 (18:30 +0800)]
doc: Flesh out 0.9.0 relnotes
Craig Ringer [Tue, 24 Mar 2015 10:09:00 +0000 (18:09 +0800)]
bdr: Flesh out 0.8.0 relnotes
Craig Ringer [Tue, 24 Mar 2015 09:49:07 +0000 (17:49 +0800)]
doc: Skeletal documentation on catalogs, conflicts, more on monitoring
Craig Ringer [Tue, 24 Mar 2015 07:02:34 +0000 (15:02 +0800)]
doc: Examples of node removal
Craig Ringer [Tue, 24 Mar 2015 06:47:31 +0000 (14:47 +0800)]
doc: Remove superceded distributed sequences docs
Craig Ringer [Tue, 24 Mar 2015 06:39:30 +0000 (14:39 +0800)]
Make bdr.queue_truncate() SECURITY DEFINER
Fixes #5.
This shows our testing doesn't cover DDL as non-superuser properly.
Abhijit Menon-Sen [Tue, 24 Mar 2015 05:23:21 +0000 (10:53 +0530)]
Fix typo: wheras → whereas
Craig Ringer [Tue, 24 Mar 2015 04:33:36 +0000 (12:33 +0800)]
doc: Convert and update global sequences documentation
Craig Ringer [Tue, 24 Mar 2015 02:37:01 +0000 (10:37 +0800)]
doc: Rearrange top level to have consistent part/chapter levels
Craig Ringer [Tue, 24 Mar 2015 02:33:53 +0000 (10:33 +0800)]
doc: add a stub "catalogs and views" section
Craig Ringer [Tue, 24 Mar 2015 02:29:30 +0000 (10:29 +0800)]
doc: First pass copy-editing and revision of monitoring docs
kforte90 [Mon, 23 Mar 2015 22:27:03 +0000 (15:27 -0700)]
"added information that seems helpful to monitoring your bdr system"
kforte90 [Mon, 23 Mar 2015 21:11:38 +0000 (14:11 -0700)]
"added examples of how to call node functions"
kforte90 [Mon, 23 Mar 2015 19:42:51 +0000 (12:42 -0700)]
" added bdr.bdr_nodes table for monitoring"
Craig Ringer [Mon, 23 Mar 2015 14:43:03 +0000 (22:43 +0800)]
bdr: doc: Add release notes for 0.7.x, 0.8.x, and (tentative) 0.9.x
Craig Ringer [Mon, 23 Mar 2015 13:09:37 +0000 (21:09 +0800)]
bdr: doc: Further node management docs work
Better structure for node management docs, some coverage of node removal
Craig Ringer [Mon, 23 Mar 2015 13:04:12 +0000 (21:04 +0800)]
bdr: add bdr.bdr_get_local_node_name() function
Add a helper function to look up the local node's name from
bdr.bdr_nodes using the local node identity details.
Christoph Moench-Tegeder [Mon, 23 Mar 2015 11:16:37 +0000 (12:16 +0100)]
bdr: make log_tuple() compile
Christoph Moench-Tegeder [Mon, 23 Mar 2015 11:09:14 +0000 (12:09 +0100)]
bdr: fix verbose insert logging (not enabled by default)
Craig Ringer [Mon, 23 Mar 2015 09:50:10 +0000 (17:50 +0800)]
bdr: Add bdr.bdr_node_slots view mapping slot names to node names
Craig Ringer [Mon, 23 Mar 2015 09:04:38 +0000 (17:04 +0800)]
bdr: add bdr_parse_slot_name and bdr_format_slot_name
Provide SQL-callable functions wrapping existing internal
BDR helpers for parsing and formatting BDR slot names.
This allows users to associate a slot name in pg_replication_slots
with an entry in bdr.bdr_nodes or bdr.bdr_connections without
writing their own slot parsing code that might be buggy and/or
break with later changes.
Craig Ringer [Mon, 23 Mar 2015 05:26:35 +0000 (13:26 +0800)]
bdr: doc: Explain physical vs logical node join, reduce duplication
Craig Ringer [Mon, 23 Mar 2015 03:43:42 +0000 (11:43 +0800)]
bdr: doc: Add stub docs for upgrade
Add skeletal upgrade docs with entry for bdr_upgrade_to_090.
Also documents bdr_replicate_ddl_command
Craig Ringer [Mon, 23 Mar 2015 03:21:15 +0000 (11:21 +0800)]
bdr: doc: Table entries for all public bdr functions
Craig Ringer [Mon, 23 Mar 2015 02:02:22 +0000 (10:02 +0800)]
bdr: doc: Change xref destinations for bdr.bdr_subscribe
Petr Jelinek [Mon, 23 Mar 2015 00:16:09 +0000 (01:16 +0100)]
bdr: doc: Always generate TOC even if section only has single entry.
Petr Jelinek [Sun, 22 Mar 2015 22:26:14 +0000 (23:26 +0100)]
bdr: doc: More detailed docs for bdr.bdr_subscribe().
Petr Jelinek [Sun, 22 Mar 2015 20:45:29 +0000 (21:45 +0100)]
bdr: silence compiler warning in UDR
Petr Jelinek [Sun, 22 Mar 2015 20:43:04 +0000 (21:43 +0100)]
bdr: Add synchronize parameter to bdr_subscribe
The new parameter controls what part of db should be synchronized
(copied). Currently supported values are 'none' for no synchronization
and 'full' for full dump/restore.
Craig Ringer [Fri, 20 Mar 2015 09:04:42 +0000 (17:04 +0800)]
bdr: doc: Top-level structure tweaks, overview editing
Craig Ringer [Fri, 20 Mar 2015 06:32:08 +0000 (14:32 +0800)]
bdr: doc: flatten install chapter a level
Craig Ringer [Fri, 20 Mar 2015 04:55:44 +0000 (12:55 +0800)]
bdr: doc: Copy-editing on the quickstart guide
Some minor changes to the quickstart formatting and wording. Also remove
the old and unused quickstart doc.
kforte90 [Thu, 19 Mar 2015 22:55:17 +0000 (15:55 -0700)]
Merge branch 'bdr-plugin/next' of ssh://git.postgresql.org/2ndquadrant_bdr into bdr-plugin/next
Christoph Moench-Tegeder [Thu, 19 Mar 2015 22:29:51 +0000 (23:29 +0100)]
bdr: replication set management
Christoph Moench-Tegeder [Thu, 19 Mar 2015 22:23:25 +0000 (23:23 +0100)]
bdr: description of replication set functions
Christoph Moench-Tegeder [Thu, 19 Mar 2015 22:04:05 +0000 (23:04 +0100)]
bdr: fix formatting
kforte90 [Thu, 19 Mar 2015 21:03:52 +0000 (14:03 -0700)]
bdr: doc: Added quickstart-install.sgml, quickstart-test.sgml
Modified bdr.sgml and filelist.sgml to added two files above
Craig Ringer [Thu, 19 Mar 2015 05:24:27 +0000 (13:24 +0800)]
bdr: doc: Copy-editing and more cross references
Adds more cross references and removes some FIXMEs. Lots
of copy editing. Flesh out a few explanations.
Craig Ringer [Thu, 19 Mar 2015 04:53:49 +0000 (12:53 +0800)]
bdr: doc: Revise and copy-edit the DDL replication chapter
Copy-editing, explanation of some restrictions, etc.
Craig Ringer [Thu, 19 Mar 2015 04:33:56 +0000 (12:33 +0800)]
bdr: doc: correct cross-reference labels
Christoph Moench-Tegeder [Wed, 18 Mar 2015 09:29:05 +0000 (10:29 +0100)]
reset PGconn object whenever connection is closed
Andres Freund [Tue, 17 Mar 2015 08:11:47 +0000 (09:11 +0100)]
bdr: Properly define bdr_abs_srcdir to be, well, actually absolute.
Fixes GH #6
Christoph Moench-Tegeder [Sun, 15 Mar 2015 22:07:40 +0000 (23:07 +0100)]
bdr: fix open() flags of destination in copy_file()
- the destination file is not guaranteed to exist, so O_CREAT must be used.
- O_TRUNC has to be set to make sure there will be no leftovers at the end
of the file in case the destination file already existed.
Petr Jelinek [Sat, 14 Mar 2015 11:24:06 +0000 (12:24 +0100)]
bdr: doc: Add chapter about bdr_init_copy
Craig Ringer [Tue, 10 Mar 2015 14:36:51 +0000 (22:36 +0800)]
bdr: doc: more explanation of multi-master
Craig Ringer [Tue, 10 Mar 2015 11:09:06 +0000 (19:09 +0800)]
bdr: doc: Much more in depth concepts/overview section
Christoph Moench-Tegeder [Mon, 9 Mar 2015 13:25:27 +0000 (14:25 +0100)]
find "extended" (GNU) getopt
FreeBSD's stock getopt(1) breaks with the long options, so
we have to find a better one. TODO: move that to configure
Christoph Moench-Tegeder [Mon, 9 Mar 2015 12:34:00 +0000 (13:34 +0100)]
use env to call bash, as bash may not be installed in /bin
Andres Freund [Sun, 8 Mar 2015 17:03:01 +0000 (18:03 +0100)]
bdr: Add tests for DDL replication of storage options during CREATE TBL.
Fixes GH: #3
Craig Ringer [Wed, 18 Feb 2015 05:25:05 +0000 (18:25 +1300)]
bdr: doc: document getting sources, document signing
Craig Ringer [Wed, 18 Feb 2015 02:58:45 +0000 (15:58 +1300)]
bdr: doc: move the preface into the book abstract
Craig Ringer [Wed, 18 Feb 2015 02:01:06 +0000 (15:01 +1300)]
bdr: doc: Split the docs up by part/chapter like the Pg docs
Craig Ringer [Wed, 18 Feb 2015 00:21:04 +0000 (13:21 +1300)]
bdr: doc: ignore generated docs
Craig Ringer [Wed, 18 Feb 2015 00:20:29 +0000 (13:20 +1300)]
bdr: doc: Document installation from packages
Andres Freund [Mon, 16 Feb 2015 11:19:55 +0000 (12:19 +0100)]
bdr: doc: Add preliminary installation instructions & random doc cleanups.
Andres Freund [Fri, 13 Feb 2015 18:50:11 +0000 (19:50 +0100)]
bdr: doc: Massivley expand documentation about BDR DDL restrictions.
Andres Freund [Thu, 12 Feb 2015 17:59:16 +0000 (18:59 +0100)]
bdr: Fix bdr.do_not_replicate implementation.
Luckily the only consequence of the borked implementation was that
pg_get_replication_identifier_progress() failed with an assertion
failure. There was no problem with replaying those changes because the
other nodes aren't allowed to connect at that point.
Andres Freund [Thu, 12 Feb 2015 09:29:36 +0000 (10:29 +0100)]
bdr: docs: Fix indentation in a couple places.
Andres Freund [Thu, 12 Feb 2015 09:29:17 +0000 (10:29 +0100)]
bdr: Start documentation about not replicated statements.
Andres Freund [Wed, 11 Feb 2015 16:14:13 +0000 (17:14 +0100)]
bdr: Make parameters for group_create/group_join/subscribe more consistent.
Andres Freund [Mon, 9 Feb 2015 21:33:01 +0000 (22:33 +0100)]
bdr: Start to explain some concepts in the docs.
Initial explanation of distributed sequences, ddl replication and ddl
locking are included.
Andres Freund [Mon, 9 Feb 2015 20:37:20 +0000 (21:37 +0100)]
bdr: Fix dependencies on the website css for the docs.
Andres Freund [Mon, 9 Feb 2015 20:34:24 +0000 (21:34 +0100)]
bdr: Only set VPATH build variables when actually doing a vpath build...
Fixes building the docs from within the source directory. No need to
backpatch, as we previously didn't rely on srcdir being set.
Andres Freund [Mon, 9 Feb 2015 20:16:40 +0000 (21:16 +0100)]
bdr: Add document about bdr guc settings.
Andres Freund [Mon, 9 Feb 2015 19:52:51 +0000 (20:52 +0100)]
bdr: Copy docs css from the website, looks much better.
Andres Freund [Mon, 9 Feb 2015 16:55:38 +0000 (17:55 +0100)]
bdr: Remove the now unused bdr.connections GUC.
Petr Jelinek [Mon, 9 Feb 2015 20:05:16 +0000 (21:05 +0100)]
bdr: Add bdr_nodes entry for remote node when subscribing.
This makes it possible to join between bdr_nodes and bdr_connections
correctly.
Andres Freund [Mon, 9 Feb 2015 16:40:59 +0000 (17:40 +0100)]
bdr: Document (and link to) relevant postgres parameters.
Andres Freund [Mon, 9 Feb 2015 02:42:09 +0000 (03:42 +0100)]
bdr: Implement simple node removal via bdr.bdr_part_by_node_names().
The method used to remove node is relatively simplistic: Removed nodes
are left in bdr_nodes and there's no guarantee about
consistency/concurrency for node removal.
The concurrency issues primarily arethat the method used for removal
could lead to ddl locks and sequence chunks could be granted based on
votes by the removed node, with the quorum from after the removal. That
obviously needs to be improved, but this is an important step.
Andres Freund [Mon, 9 Feb 2015 02:40:37 +0000 (03:40 +0100)]
bdr: Also setup pid/pgproc entries in the output plugins shmem slot.