Ian Barwick [Mon, 13 Jul 2015 08:19:35 +0000 (17:19 +0900)]
Fix calls to error_unsupported_command()
Otherwise ambiguous things like this happen:
$ ALTER EXTENSION bdr UPDATE;
ERROR: is not supported when bdr is active
This is what we want, of course:
$ ALTER EXTENSION bdr UPDATE;
ERROR: ALTER EXTENSION is not supported when bdr is active
Ian Barwick [Tue, 23 Jun 2015 07:57:43 +0000 (16:57 +0900)]
Update upgrade script list
Ian Barwick [Tue, 23 Jun 2015 07:14:41 +0000 (16:14 +0900)]
Remove the last DO block from the 0.8.0.1 -> 0.8.0.2 upgrade script
This results in the following mysterious error:
ERROR: trigger "bdr_truncate_trigger_add": unrecognized event name ""
CONTEXT: SQL statement "CREATE EVENT TRIGGER bdr_truncate_trigger_add
ON ddl_command_end
EXECUTE PROCEDURE bdr.bdr_truncate_trigger_add()"
PL/pgSQL function inline_code_block line 23 at SQL statement
Looking at the error as reported in the log file, the apparently empty
'unrecognized event name' is actually reported as a bunch of 0x7F
characters.
The affected DO-block executes correctly in later versions (we're
dealing with 9.4b2 here) so I presume whatever causes it has been
fixed.
For our purposes we should be able to assume the functions/triggers
covered in this block don't exist, and can work with the CREATE
statements as-is as a workaround.
Ian Barwick [Tue, 23 Jun 2015 04:50:03 +0000 (13:50 +0900)]
Upgrade SQL fixes
Ian Barwick [Tue, 16 Jun 2015 01:11:30 +0000 (10:11 +0900)]
Add missing #includes
Ian Barwick [Mon, 15 Jun 2015 12:53:08 +0000 (21:53 +0900)]
Compatability wrapper to compile 0.9.1 with Pg 9.4b2
Ian Barwick [Mon, 15 Jun 2015 07:08:13 +0000 (16:08 +0900)]
doc: fix typo
Ian Barwick [Fri, 12 Jun 2015 05:19:13 +0000 (14:19 +0900)]
Add missing 'bdr_' prefix
Craig Ringer [Tue, 26 May 2015 12:18:37 +0000 (20:18 +0800)]
Release notes for 0.9.1
Craig Ringer [Tue, 26 May 2015 09:57:46 +0000 (17:57 +0800)]
Bump version to 0.9.1
Craig Ringer [Tue, 26 May 2015 09:51:55 +0000 (17:51 +0800)]
Add bdr.bdr_apply_is_paused() information function
This makes it possible to see whether replay is paused on
a node.
Also adds some tests for pause/resume.
Closes #59
Craig Ringer [Tue, 26 May 2015 07:58:29 +0000 (15:58 +0800)]
doc that bdr.bdr_replicate_ddl_command takes fully qualified name
Closes #70 by documenting that bdr.bdr_replicate_ddl_command requires
fully qualified objects.
Craig Ringer [Tue, 26 May 2015 06:19:37 +0000 (14:19 +0800)]
Update bdr_dump to include setval fixes
Update bdr_dump from bdr-pg/REL9_4_STABLE to include:
3ab2f78 Don't dump setval(...) for 'bdr' sequences
1592812 Only dump non-default sequence access methods
Craig Ringer [Tue, 26 May 2015 06:12:43 +0000 (14:12 +0800)]
Update bdr_dump to 9.4.2 + --snapshot
Update copy of pg_dump with snapshot support for UDR to the
version from bdr-pg/REL9_4_STABLE . We can't use stock pg_dump
because we need support for dumping from a pre-established
snapshot, which is added in the BDR tree.
Craig Ringer [Tue, 26 May 2015 02:02:59 +0000 (10:02 +0800)]
Fix UDR for bdr_locks after
a1b2dfa82 permit_ddl_locking
Andres Freund [Mon, 25 May 2015 01:49:25 +0000 (03:49 +0200)]
bdr: Send pgstat upon replayed commit in apply process.
Previously it was only sent at apply worker shutdown.
Andres Freund [Mon, 25 May 2015 01:43:15 +0000 (03:43 +0200)]
bdr: Improve sequencer locking and pgstat reporting.
Up to now the sequencer locked its relations exclusively to prevent an
interlock with apply. That was problematic, because it would often
prevent auto vacuum/analyze from running, or interrupt it.
Instead of locking the underlying relations lock the bdr seqam object
and add code to apply to also acquire that lock. That allow autovacuum
to run undisturbed.
Testing brought an additional problem to light, namely that pgstat
records weren't sent in the sequencer until shutdown, which means that
in many situations autovacuum won't be trigger in time. This is a more
widespread problem than just the sequencer, but here only the sequencer
is fixed.
Andres Freund [Sun, 24 May 2015 23:46:02 +0000 (01:46 +0200)]
bdr: Adjust database name in debug message.
Craig Ringer [Fri, 15 May 2015 09:08:52 +0000 (17:08 +0800)]
bdr.table_set_replication_sets should permit unsafe commands
In
4005c1d bdr_replicate_ddl_command was changed not to override the
command filter, but this broke replication sets in UDR, since they have
to use SECURITY LABEL.
SET bdr.permit_unsafe_ddl_commands on bdr.table_set_replication_sets
since it knows what it's doing.
Fixes #67
Note: The ddl/replication_sets tests cannot be run as-is on UDR because
UDR does not replicate changes to replication sets. We really need
separate tests for this that cover UDR (or BDR+subscribe).
Andres Freund [Thu, 21 May 2015 21:03:30 +0000 (23:03 +0200)]
Don't specify the sequence am in UDR.
The initial cloning needs more tests, including data, but that requires
larger changes to several tests than I want to do in the fix commit
itself.
Fixes #69
Andres Freund [Fri, 15 May 2015 14:03:01 +0000 (16:03 +0200)]
Initial code to actually remove slots when parting a node.
This removes a slot when
a) It is of a remote node that has been parted.
b) We have been parted, and there are remote slots. It is not guaranteed
that we're notified of that case, but it seems worthwhile to handle
nonetheless.
Craig Ringer [Fri, 15 May 2015 09:13:26 +0000 (17:13 +0800)]
Better error message if PG_CONFIG is nonsense
Craig Ringer [Fri, 15 May 2015 09:26:08 +0000 (17:26 +0800)]
fixup! Add a test for node part
Didn't check in the expected/ data
Craig Ringer [Wed, 6 May 2015 09:09:59 +0000 (17:09 +0800)]
Add a test for node part
This shows that the slots are currently _not_ correctly dropped.
Petr Jelinek [Fri, 1 May 2015 13:56:02 +0000 (15:56 +0200)]
Fix broken supervisordb test
Craig Ringer [Fri, 24 Apr 2015 07:17:40 +0000 (15:17 +0800)]
Prevent users from connecting to bdr_supervisordb
This won't stop bgworkers, but they should hopefully know better.
Petr Jelinek [Wed, 6 May 2015 14:51:53 +0000 (16:51 +0200)]
Use correct replication set and apply delay config in apply.
Petr Jelinek [Sat, 18 Apr 2015 22:11:51 +0000 (00:11 +0200)]
fix bdr_init_copy for UDR
Craig Ringer [Fri, 24 Apr 2015 06:17:39 +0000 (14:17 +0800)]
Prevent attempts to create/drop/rename bdr_supervisordb
When the BDR extension is loaded, BDR its self can create
bdr_supervisordb, but applications cannot. This gives users
a better error message if they try to drop it, too, e.g.
DROP DATABASE bdr_supervisordb;
ERROR: The BDR extension reserves the database name bdr_supervisordb
for its own use
HINT: Use a different database name
Craig Ringer [Tue, 21 Apr 2015 13:10:28 +0000 (21:10 +0800)]
Backport bdr.permit_ddl_locking to 0.9 stable branch
See
330dd989d94b53cd8cf70d6a31d0f93b87599812 for the
original commit with full details.
This incorporates the subsequent docs <para> fix and
the change of the default from false to true.
Craig Ringer [Tue, 21 Apr 2015 03:05:38 +0000 (11:05 +0800)]
More detail on DDL rep, mention use of replicate_ddl_command
Craig Ringer [Mon, 20 Apr 2015 12:28:06 +0000 (20:28 +0800)]
Clarify that you can only monitor lag from an upstream
Per query from the mailing list,
http://www.postgresql.org/message-id/
F38D1020-3B2C-41CF-BECD-
1F1FB5B19806@visi.com
Craig Ringer [Fri, 17 Apr 2015 07:23:59 +0000 (15:23 +0800)]
More docs on DDL locking
Craig Ringer [Thu, 16 Apr 2015 08:09:24 +0000 (16:09 +0800)]
The apply worker wasn't checking for postmaster death when paused
Fixes #58
Petr Jelinek [Sun, 12 Apr 2015 20:00:35 +0000 (22:00 +0200)]
Correct lock level in filter_AlterTableStmt()
Martín Marqués [Wed, 15 Apr 2015 22:39:44 +0000 (19:39 -0300)]
Missing separation coma in the bdr.bdr_group_join example
Craig Ringer [Fri, 10 Apr 2015 05:03:34 +0000 (13:03 +0800)]
Fixes for UNLOGGED tables in the command filter
The command filter was checking only for temporary tables when deciding
whether to skip DDL locking, and when performing some operations, but
for others was permitting UNLOGGED tables too.
Consistently use UNLOGGED||TEMP throughout.
Fixes #44
Petr Jelinek [Thu, 23 Apr 2015 17:18:06 +0000 (19:18 +0200)]
Fix typo in previous commit
Petr Jelinek [Wed, 22 Apr 2015 19:13:34 +0000 (21:13 +0200)]
bdr_init_copy: insert correct bdr_node entry
Petr Jelinek [Wed, 22 Apr 2015 18:57:39 +0000 (20:57 +0200)]
bdr_init_copy: properly escape single quotes
Martín Marqués [Wed, 22 Apr 2015 18:50:02 +0000 (15:50 -0300)]
Typo in bdr_init_copy help information
Martín Marqués [Tue, 21 Apr 2015 17:42:42 +0000 (14:42 -0300)]
Typo in the docs
Craig Ringer [Wed, 22 Apr 2015 06:24:19 +0000 (14:24 +0800)]
Make PG_CONFIG a declared precious configure variable
It'll show up in help and appear in the config cache.
Craig Ringer [Wed, 22 Apr 2015 06:21:19 +0000 (14:21 +0800)]
Fix incorrect AC_ARG_VAR usage, make PATH a precious var with decription
This makes configure consider the PATH important and documents that
it affects where we find pg_config .
Craig Ringer [Tue, 21 Apr 2015 10:52:08 +0000 (18:52 +0800)]
Rename 'bdr' reserved db to 'bdr_supervisordb'
Craig Ringer [Wed, 15 Apr 2015 03:39:49 +0000 (11:39 +0800)]
Lower log level of 'Found bdr_connections entry ' log lines
These are internal debug/informational messages.
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.
Craig Ringer [Tue, 7 Apr 2015 09:24:40 +0000 (17:24 +0800)]
Document pg_xlog_wait_remote_recieve and pg_xlog_wait_remote_apply
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
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:38:25 +0000 (18:38 +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.
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
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
Ian Barwick [Wed, 25 Mar 2015 01:47:04 +0000 (10:47 +0900)]
doc: Reword installation requirements slightly
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 02:28:23 +0000 (11:28 +0900)]
doc: misc typo fixes
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;
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().
Christoph Moench-Tegeder [Wed, 25 Mar 2015 11:28:36 +0000 (12:28 +0100)]
fix link
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