users/andresfreund/postgres.git
11 years agobdr: document types of conflicts and their resolution (internals)
Andres Freund [Sun, 27 Apr 2014 11:14:44 +0000 (13:14 +0200)]
bdr: document types of conflicts and their resolution (internals)

11 years agobdr: Don't create TRUNCATE triggers for DDL replication during pg_restore
Craig Ringer [Sun, 27 Apr 2014 04:47:24 +0000 (12:47 +0800)]
bdr: Don't create TRUNCATE triggers for DDL replication during pg_restore

11 years agobdr: Use logical dump/reload and catchup mode during DB startup
Craig Ringer [Mon, 21 Apr 2014 05:22:39 +0000 (13:22 +0800)]
bdr: Use logical dump/reload and catchup mode during DB startup

Install BDR extension in remote, track progress in bdr.bdr_nodes,
support pg_dump --snapshot and pg_restore for dump+reload apply,
use catchup mode.

11 years agobdr: Support stopping replay at a specified LSN
Craig Ringer [Fri, 18 Apr 2014 04:29:01 +0000 (12:29 +0800)]
bdr: Support stopping replay at a specified LSN

11 years agobdr: Expose origin id and lsn in decoded commit records
Craig Ringer [Thu, 17 Apr 2014 03:26:18 +0000 (11:26 +0800)]
bdr: Expose origin id and lsn in decoded commit records

This is required for catchup mode.

11 years agobdr: Add bdr_apply_pause/_resume functions
Abhijit Menon-Sen [Fri, 25 Apr 2014 11:03:54 +0000 (16:33 +0530)]
bdr: Add bdr_apply_pause/_resume functions

These are analogous to pg_xlog_replay_pause()/_resume().

11 years agobdr: reorder functions in bdr_apply.c
Andres Freund [Fri, 25 Apr 2014 12:06:27 +0000 (14:06 +0200)]
bdr: reorder functions in bdr_apply.c

11 years agobdr: do no longer generate a warning when bdr.permit_unsafe_ddl_commands = yes
Christian Kruse [Fri, 25 Apr 2014 11:11:33 +0000 (13:11 +0200)]
bdr: do no longer generate a warning when bdr.permit_unsafe_ddl_commands = yes

11 years agobdr: Permit exclusion constraints in bdr extension creation
Craig Ringer [Fri, 25 Apr 2014 10:55:48 +0000 (18:55 +0800)]
bdr: Permit exclusion constraints in bdr extension creation

11 years agobdr: Remove defunct contrib/bdr tests
Abhijit Menon-Sen [Thu, 24 Apr 2014 21:15:47 +0000 (02:45 +0530)]
bdr: Remove defunct contrib/bdr tests

11 years agobdr: forbid partial unique indexes on permanent relations
Christian Kruse [Thu, 24 Apr 2014 08:01:31 +0000 (10:01 +0200)]
bdr: forbid partial unique indexes on permanent relations

11 years agobdr: forbid EXCLUDE constraints on permanent relations
Christian Kruse [Thu, 24 Apr 2014 08:01:01 +0000 (10:01 +0200)]
bdr: forbid EXCLUDE constraints on permanent relations

11 years agobdr: Greatly improve conflict handling for insert
Andres Freund [Wed, 23 Apr 2014 23:47:33 +0000 (01:47 +0200)]
bdr: Greatly improve conflict handling for insert

Needs some more refactoring and logging improvements.

11 years agobdr: Add bdr.default_apply_delay GUC
Andres Freund [Wed, 23 Apr 2014 12:06:21 +0000 (14:06 +0200)]
bdr: Add bdr.default_apply_delay GUC

11 years agobdr: create extensions IF NOT EXISTS
Alvaro Herrera [Tue, 22 Apr 2014 16:17:07 +0000 (13:17 -0300)]
bdr: create extensions IF NOT EXISTS

This avoids useless errors when the btree_gist extension is already
installed.

11 years agobdr: fix: actually set sys id and timeline
Christian Kruse [Tue, 22 Apr 2014 09:02:59 +0000 (11:02 +0200)]
bdr: fix: actually set sys id and timeline

11 years agobdr: fix: use palloc0() instead of palloc()
Christian Kruse [Tue, 22 Apr 2014 08:55:55 +0000 (10:55 +0200)]
bdr: fix: use palloc0() instead of palloc()

When using palloc(), bdr_startup_context->workers is not NULL/NIL and
therefore the later lcons() call will lead to a segfault.

11 years agobdr: added prototype for bdr_worker_shmem_release()
Christian Kruse [Tue, 22 Apr 2014 08:41:37 +0000 (10:41 +0200)]
bdr: added prototype for bdr_worker_shmem_release()

Currently the prototype has an unused attribute since function is not yet used

11 years agobdr: fix: ensure to use the right format by using format constants now
Christian Kruse [Wed, 16 Apr 2014 10:27:54 +0000 (12:27 +0200)]
bdr: fix: ensure to use the right format by using format constants now

Conflicts:
contrib/bdr/bdr.c

11 years agobdr: If bdr.max_connections is zero, don't try to allocate -1 shmem
Craig Ringer [Mon, 21 Apr 2014 05:51:31 +0000 (13:51 +0800)]
bdr: If bdr.max_connections is zero, don't try to allocate -1 shmem

11 years agobdr: auto-calculate bdr.max_workers from bdr.connections if unset
Craig Ringer [Fri, 18 Apr 2014 13:44:11 +0000 (21:44 +0800)]
bdr: auto-calculate bdr.max_workers from bdr.connections if unset

Allocate enough shared memory to create BdrWorker entries in BdrWorkerCtl for
one per-database worker and one apply worker for every configured connection,
i.e. assume each configured connection is for a different DB.

11 years agobdr: Don't print an informative message in a signal handler.
Andres Freund [Fri, 18 Apr 2014 12:20:35 +0000 (14:20 +0200)]
bdr: Don't print an informative message in a signal handler.

11 years agobdr: code style cleanups for the dynamic bgworker change
Andres Freund [Fri, 18 Apr 2014 12:16:00 +0000 (14:16 +0200)]
bdr: code style cleanups for the dynamic bgworker change

Including formatting and shmem vs shm consistency cleanups.

11 years agobdr: fix shmem size computation for the recent dynamic bgworker change
Andres Freund [Fri, 18 Apr 2014 12:00:34 +0000 (14:00 +0200)]
bdr: fix shmem size computation for the recent dynamic bgworker change

11 years agobdr: prefix functions with bdr_
Craig Ringer [Thu, 17 Apr 2014 01:55:00 +0000 (09:55 +0800)]
bdr: prefix functions with bdr_

11 years agobdr: Use dynamic background workers and shared memory
Craig Ringer [Wed, 16 Apr 2014 08:54:36 +0000 (16:54 +0800)]
bdr: Use dynamic background workers and shared memory

BDR previously used one static bgworker for each apply connection, passing the
configuration for each apply worker as a pointer into postmaster memory.

This relied on the ability to fork() without exec(), which won't work on
EXEC_BACKEND platforms (i.e. Windows). It also prevented any possibility
of adding new connections at runtime, made it harder to control when
apply workers started, and made it impossible to run a short lived apply
worker.

In order to properly support dump/apply for logical dump based node bring-up,
we need to be able to run short-lived bgworkers and pass parameters to them
that are only determined after postmaster start. This requires dynamic
bgworkers and the use of shared memory to communicate parameters to bgworkers.

11 years agobdr: fix: corrected typo in PG_FUNCTION_INFO_V1() call
Christian Kruse [Thu, 10 Apr 2014 07:27:57 +0000 (09:27 +0200)]
bdr: fix: corrected typo in PG_FUNCTION_INFO_V1() call

11 years agobdr: fix: SPI expects a char array for NULLs
Christian Kruse [Thu, 10 Apr 2014 07:03:15 +0000 (09:03 +0200)]
bdr: fix: SPI expects a char array for NULLs

11 years agobdr: Fix issues with transaction local state used in ddl queues processing.
Andres Freund [Wed, 9 Apr 2014 12:33:17 +0000 (14:33 +0200)]
bdr: Fix issues with transaction local state used in ddl queues processing.

Otherwise CONCURRENTLY commands fails because resources will be freed
twice and because tupledescs et al. are still referenced.

11 years agobdr: bugfix: avoid replication of internal schema
Christian Kruse [Wed, 9 Apr 2014 12:25:41 +0000 (14:25 +0200)]
bdr: bugfix: avoid replication of internal schema

11 years agobdr: Apply event from the command queue using full blown portals.
Andres Freund [Wed, 9 Apr 2014 12:06:38 +0000 (14:06 +0200)]
bdr: Apply event from the command queue using full blown portals.

This has the advantage that we can support normal SQL statements in
the command queue which is needed for conflict triggers.

11 years agobdr: lift restriction on ALTER .. RENAME
Alvaro Herrera [Tue, 8 Apr 2014 21:00:10 +0000 (18:00 -0300)]
bdr: lift restriction on ALTER .. RENAME

11 years agobdr: fix idiotic bdr-drops merge mistaek
Alvaro Herrera [Tue, 8 Apr 2014 20:51:35 +0000 (17:51 -0300)]
bdr: fix idiotic bdr-drops merge mistaek

11 years agobdr: lift restriction on DROP
Alvaro Herrera [Tue, 8 Apr 2014 20:36:31 +0000 (17:36 -0300)]
bdr: lift restriction on DROP

11 years agobdr: add DROP support, using stuff from bdr-drops
Alvaro Herrera [Fri, 4 Apr 2014 20:16:04 +0000 (17:16 -0300)]
bdr: add DROP support, using stuff from bdr-drops

11 years agobdr: Improve buffer and snapshot tracking.
Andres Freund [Tue, 8 Apr 2014 10:20:18 +0000 (12:20 +0200)]
bdr: Improve buffer and snapshot tracking.

As a preparation for more elaborate conflict handling track tuples
using TupleTableSlots and acquire/release snapshots more granulary.

11 years agobdr: Minor code formatting fixes
Andres Freund [Mon, 7 Apr 2014 07:56:11 +0000 (09:56 +0200)]
bdr: Minor code formatting fixes

11 years agobdr: Introduce support for forwarding changes from foreign nodes
Craig Ringer [Mon, 7 Apr 2014 08:07:14 +0000 (16:07 +0800)]
bdr: Introduce support for forwarding changes from foreign nodes

Adds the "forward_changesets" option to the bdr_output plugin.

This can be used to cascade changes from one node to another,
potentially allowing cascading logical replication.

It's required to support proper addition of a new node via logical
dump.

11 years agobdr: Use sequencer wakeup scheduling code in the apply path as well.
Andres Freund [Fri, 4 Apr 2014 12:21:55 +0000 (14:21 +0200)]
bdr: Use sequencer wakeup scheduling code in the apply path as well.

11 years agobdr: Improve sequencer wakeup logic.
Andres Freund [Fri, 4 Apr 2014 11:07:03 +0000 (13:07 +0200)]
bdr: Improve sequencer wakeup logic.

Schedule a sequencer wakeup at EOXact whenever a sequence is created
or it's setttings are modified. This allows to significantly decrease
the frequency of unneccessary sequencer wakeups and also significantly
reduces the time until a new sequence is initialized.

11 years agobdr: Fix some embarrassing oversights in recent commits leading to aborting replay.
Andres Freund [Fri, 4 Apr 2014 10:57:08 +0000 (12:57 +0200)]
bdr: Fix some embarrassing oversights in recent commits leading to aborting replay.

11 years agobdr: allow certain types of ALTER TABLE commands
Christian Kruse [Wed, 2 Apr 2014 11:15:24 +0000 (13:15 +0200)]
bdr: allow certain types of ALTER TABLE commands

For now we allow:

- ADD COLUMN
- DEFAULT
- CLUSTER ON
- SET WITHOUT CLUSTER
- SET (...)
- RESET (...)
- replace reloption list

11 years agobdr: better error messages for SPI calls
Christian Kruse [Mon, 31 Mar 2014 12:16:08 +0000 (14:16 +0200)]
bdr: better error messages for SPI calls

I could be wrong but โ€žblubโ€œ or โ€žblartโ€œ is not a very comprehensible
error message ;-)

11 years agobdr: Don't forbid CREATE INDEX CONCURRENTLY anymore.
Andres Freund [Tue, 1 Apr 2014 22:39:06 +0000 (00:39 +0200)]
bdr: Don't forbid CREATE INDEX CONCURRENTLY anymore.

11 years agobdr: Clean up remote update replay code a bit.
Andres Freund [Tue, 1 Apr 2014 18:04:31 +0000 (20:04 +0200)]
bdr: Clean up remote update replay code a bit.

11 years agobdr: Remove superflous check_sequencer_wakeup() call.
Andres Freund [Tue, 1 Apr 2014 17:24:31 +0000 (19:24 +0200)]
bdr: Remove superflous check_sequencer_wakeup() call.

11 years agobdr: Simplify logic for generating the primary key during updates.
Andres Freund [Tue, 1 Apr 2014 17:22:53 +0000 (19:22 +0200)]
bdr: Simplify logic for generating the primary key during updates.

That hopefully gets rid of compiler warnings on older gccs.

11 years agobdr: Try to add bdr_commandfilter.c to windows buildsystem.
Andres Freund [Tue, 1 Apr 2014 17:21:59 +0000 (19:21 +0200)]
bdr: Try to add bdr_commandfilter.c to windows buildsystem.

Also reorder some sourcefiles into alphabetical order...

11 years agobdr: prevent specific utility commands from being executed
Christian Kruse [Wed, 26 Mar 2014 12:03:26 +0000 (13:03 +0100)]
bdr: prevent specific utility commands from being executed

We use a ProcessUtility_hook to prevent some utility commands from being
executed. Currently this contains:

- SECURITY LABEL
- CREATE INDEX CONCURRENTLY
- ALTER TABLE
- ALTER โ€ฆ RENAME TO
- DROP TABLE/VIEW/SEQUENCE/TRIGGER/RULE/EXTENSION/TYPE
- DROP OWNED
- ALTER TYPE โ€ฆ ADD VALUE

Still TODO:

- Prevent replication for CREATE/DROP/ALTER TABLESPACE/ALTER TABLESPACE
  MOVE.
- Prevent replication of COMMENT ON for non-local objects.
- Implement a new GUC, bdr.ddl_prevent_replication

11 years agobdr: bugfix: end critical section in โ€žnot acquired newโ€œ case as well
Christian Kruse [Mon, 31 Mar 2014 12:08:37 +0000 (14:08 +0200)]
bdr: bugfix: end critical section in โ€žnot acquired newโ€œ case as well

11 years agobdr: calling check_sequencer_wakeup() now on UPDATE conflict
Christian Kruse [Mon, 31 Mar 2014 10:26:33 +0000 (12:26 +0200)]
bdr: calling check_sequencer_wakeup() now on UPDATE conflict

After reading code it seems to be no problem calling
check_sequencer_wakeup() on UPDATE conflict; thus we do it.

11 years agobdr: moved apply/log update check code to a dedicated function
Christian Kruse [Fri, 28 Mar 2014 14:58:02 +0000 (15:58 +0100)]
bdr: moved apply/log update check code to a dedicated function

11 years agobdr: generated_key wasn't used at all, so drop it
Christian Kruse [Fri, 28 Mar 2014 14:57:05 +0000 (15:57 +0100)]
bdr: generated_key wasn't used at all, so drop it

11 years agobdr: refactored use Oids to identify and refer to relations
Christian Kruse [Wed, 26 Mar 2014 10:06:53 +0000 (11:06 +0100)]
bdr: refactored use Oids to identify and refer to relations

11 years agobdr: Support replication of CONCURRENTLY commands.
Andres Freund [Tue, 1 Apr 2014 16:34:14 +0000 (18:34 +0200)]
bdr: Support replication of CONCURRENTLY commands.

To do so ddl replication can no longer user spi as that prohibits
executing commands that execute transaction internally. Do the grunt
work ourselves instead.

11 years agobdr: queue CREATE SCHEMA as well
Alvaro Herrera [Tue, 1 Apr 2014 15:52:21 +0000 (12:52 -0300)]
bdr: queue CREATE SCHEMA as well

11 years agobdr: Rewrote lookup code for bdr.bdr_queued_commands
Christian Kruse [Thu, 20 Mar 2014 17:50:39 +0000 (18:50 +0100)]
bdr: Rewrote lookup code for bdr.bdr_queued_commands

Now we're looking up the QueuedDDLCommandsRelid of
bdr.bdr_queued_commands in bdr_maintain_schema() using
get_namespace_oid() as well as get_relname_relid().

11 years agobdr: Fix typo causing the wrong tuple format to be sent
Andres Freund [Thu, 20 Mar 2014 21:14:27 +0000 (22:14 +0100)]
bdr: Fix typo causing the wrong tuple format to be sent

11 years agobdr: Fix typo causing the send/recv not to be used even though version's match
Andres Freund [Thu, 20 Mar 2014 21:12:52 +0000 (22:12 +0100)]
bdr: Fix typo causing the send/recv not to be used even though version's match

Found in respond to tests by Christian.

11 years agobdr: Fix Windows build by compiling bdr_compat.c
Andres Freund [Sun, 16 Mar 2014 22:27:24 +0000 (23:27 +0100)]
bdr: Fix Windows build by compiling bdr_compat.c

11 years agobdr: Properly send timestamps, xlogrecptrs as int64s
Andres Freund [Sun, 16 Mar 2014 22:22:14 +0000 (23:22 +0100)]
bdr: Properly send timestamps, xlogrecptrs as int64s

11 years agobdr: Initial framework for choosing the correct data encoding based on the client.
Andres Freund [Sun, 16 Mar 2014 21:59:34 +0000 (22:59 +0100)]
bdr: Initial framework for choosing the correct data encoding based on the client.

11 years agobdr: Don't perform index insertions for HOT updates
Andres Freund [Fri, 14 Mar 2014 22:34:52 +0000 (23:34 +0100)]
bdr: Don't perform index insertions for HOT updates

11 years agobdr: Use the old local tuple to build the new tuple version for updates.
Andres Freund [Fri, 14 Mar 2014 22:31:38 +0000 (23:31 +0100)]
bdr: Use the old local tuple to build the new tuple version for updates.

This allows us to handle unchanged toast columns.

11 years agobdr: Send relation information separately from tuple data
Andres Freund [Fri, 14 Mar 2014 22:07:35 +0000 (23:07 +0100)]
bdr: Send relation information separately from tuple data

11 years agobdr: Ugly makefile hack to support make clean
Andres Freund [Fri, 14 Mar 2014 20:57:56 +0000 (21:57 +0100)]
bdr: Ugly makefile hack to support make clean

11 years agobdr: Initial implementation of a more elaborate tuple wire protocol.
Andres Freund [Fri, 14 Mar 2014 20:53:48 +0000 (21:53 +0100)]
bdr: Initial implementation of a more elaborate tuple wire protocol.

BDR wants to be fast, but it also wants to support replication across
versions and architectures. So far we used to always copy the binary
data as is between sender as receiver. That works well enough for
simple scalar core data types, but it breaks down when oids are
embedded in the disk format.

Instead allow to specify the format on a per-datum format. It's now
supported to send data in binary, send/recv format or text. On the
sending side we select binary if it's a scalar core type, and
otherwise use send/recv. This needs to be extended to support cross
architecture replication, but that's for another commit.

11 years agobdr: Don't queue truncate triggers for serials created inside a CREATE TABLE
Andres Freund [Fri, 14 Mar 2014 20:10:22 +0000 (21:10 +0100)]
bdr: Don't queue truncate triggers for serials created inside a CREATE TABLE

11 years agobdr: add CREATE EXTENSION to set of replicated commands
Alvaro Herrera [Fri, 14 Mar 2014 19:33:22 +0000 (16:33 -0300)]
bdr: add CREATE EXTENSION to set of replicated commands

11 years agobdr: Replicat CREATE TYPE
Andres Freund [Fri, 14 Mar 2014 19:33:21 +0000 (20:33 +0100)]
bdr: Replicat CREATE TYPE

At least CREATE TYPE ... AS ENUM works.

11 years agobdr: adjustments for changed output plugin API
Andres Freund [Wed, 12 Mar 2014 17:26:10 +0000 (18:26 +0100)]
bdr: adjustments for changed output plugin API

11 years agobdr: use correct lock mode when creating extensions
Christian Kruse [Tue, 4 Mar 2014 09:24:00 +0000 (10:24 +0100)]
bdr: use correct lock mode when creating extensions

11 years agobdr: code formatting cleanup
Christian Kruse [Tue, 4 Mar 2014 09:20:44 +0000 (10:20 +0100)]
bdr: code formatting cleanup

11 years agobdr: mergme: Also queue ALTER TABLE commands
Alvaro Herrera [Thu, 6 Mar 2014 23:11:30 +0000 (20:11 -0300)]
bdr: mergme: Also queue ALTER TABLE commands

11 years agobdr: mergme: Only add truncate trigger if CREATE TABLE
Alvaro Herrera [Thu, 6 Mar 2014 23:11:10 +0000 (20:11 -0300)]
bdr: mergme: Only add truncate trigger if CREATE TABLE

11 years agobdr: avoid race conditions when installing bdr extensions
Andres Freund [Tue, 4 Mar 2014 00:56:33 +0000 (01:56 +0100)]
bdr: avoid race conditions when installing bdr extensions

Previously installing the bdr (and prerequisite) extensions was racy
because only the sequencer installed them. Initially that wasn't much
of a problem since only the sequencer and manual queries needed the
schema, but that's not true anymore.

Instead check whether the schema exists in every started worker and
prevent races by acquiring a suitably strong lock on pg_extension
while checking/creating.

11 years agobdr: enabling CREATE TRIGGER replication
Christian Kruse [Fri, 28 Feb 2014 14:20:44 +0000 (15:20 +0100)]
bdr: enabling CREATE TRIGGER replication

11 years agobdr: implement support for TRUNCATE TABLE replication
Christian Kruse [Fri, 28 Feb 2014 13:52:37 +0000 (14:52 +0100)]
bdr: implement support for TRUNCATE TABLE replication

11 years agobdr: Don't insert commands into bdr_queued_commands during replay.
Andres Freund [Tue, 25 Feb 2014 12:39:33 +0000 (13:39 +0100)]
bdr: Don't insert commands into bdr_queued_commands during replay.

11 years agobdr: formatting fixes for bdr--0.5.sql
Andres Freund [Tue, 25 Feb 2014 12:18:21 +0000 (13:18 +0100)]
bdr: formatting fixes for bdr--0.5.sql

11 years agobdr: moved GUCs to one-dot notation
Christian Kruse [Mon, 24 Feb 2014 14:57:12 +0000 (15:57 +0100)]
bdr: moved GUCs to one-dot notation

11 years agobdr: ignore temp objects when queueing
Alvaro Herrera [Thu, 20 Feb 2014 22:18:59 +0000 (19:18 -0300)]
bdr: ignore temp objects when queueing

11 years agobdr: Initial DDL replication
Alvaro Herrera [Thu, 20 Feb 2014 17:47:55 +0000 (14:47 -0300)]
bdr: Initial DDL replication

This simply accumulates DDL commands in a table, and has the bdr_apply
background worker execute it.

11 years agobdr: Initialize bgw_notify_pid to 0
Alvaro Herrera [Thu, 20 Feb 2014 17:46:40 +0000 (14:46 -0300)]
bdr: Initialize bgw_notify_pid to 0

Failure to do this resulted in a bgworker that would not run in some
cases.

11 years agobdr: fix nasty typo leading to pkey extraction using the wrong type
Andres Freund [Tue, 18 Feb 2014 19:08:28 +0000 (20:08 +0100)]
bdr: fix nasty typo leading to pkey extraction using the wrong type

11 years agobdr: pgbench: delete instead of truncate
Andres Freund [Mon, 9 Dec 2013 12:38:10 +0000 (13:38 +0100)]
bdr: pgbench: delete instead of truncate

11 years agobdr: bdr plugin
Andres Freund [Fri, 17 May 2013 16:15:37 +0000 (18:15 +0200)]
bdr: bdr plugin

Andres Freund, Alvaro Herrera, Abhijit Menon-Sen

11 years agobdr,core: Add database oid to IDENTIFY_SYSTEM
Andres Freund [Fri, 3 May 2013 14:53:58 +0000 (16:53 +0200)]
bdr,core: Add database oid to IDENTIFY_SYSTEM

Adjust all IDENTIFY_SYSTEM callers

11 years agobdr,core: isolationtester: Isolationtester with multi-server support
Abhijit Menon-Sen [Mon, 13 May 2013 09:13:41 +0000 (14:43 +0530)]
bdr,core: isolationtester: Isolationtester with multi-server support

The spec file can now start with declarations like this:

    conninfo "cname1" "port=NNNN dbname=XYZ"
    conninfo "cname2" "port=MMMM dbname=PQR"

And sessions may include connection declarations like this:

    session "s1"
    connection "cname1"

Both are optional. If no connection information is explicitly specified,
then the earlier behaviour (use conninfo from commandline or fall back
to "dbname=postgres") is retained.

If connection information is specified, we open one "global" connection
per conninfo (for lock checking) and one connection per session. Setup
SQL is executed only on conns[0], as before (but perhaps it would help
to execute it on all until DDL replication is implemented?).

Includes the rudimentary tests from before, including some failing ones.

11 years agowal_decoding: Add pg_xlog_wait_remote_{apply,receive} functions
Abhijit Menon-Sen [Tue, 11 Jun 2013 21:25:26 +0000 (23:25 +0200)]
wal_decoding: Add pg_xlog_wait_remote_{apply,receive} functions

We want to use these in isolationtester tests, but they're more
generally useful for "inter-node synchronisation".

11 years agocore, bdr: Add --snapshot argument to pg_dump, allowing user-specified snapshot to...
Craig Ringer [Thu, 27 Mar 2014 06:52:18 +0000 (14:52 +0800)]
core, bdr: Add --snapshot argument to pg_dump, allowing user-specified snapshot to dump

Allows pg_dump to dump from a snapshot that already exists. pg_dump already
supported SET TRANSACTION SNAPSHOT for use in parallel dump, but didn't allow
the user to explicitly specify the snapshot.

This is useful in BDR/UDR, where we want to initialize a new replica
using the state of an existing node from the snapshot automatically
exported by a slot.

Author: Simon Riggs

11 years agowal_decoding: Add (non-)transactional message feature for logical decoding
Andres Freund [Sun, 11 May 2014 14:24:20 +0000 (16:24 +0200)]
wal_decoding: Add (non-)transactional message feature for logical decoding

11 years agocore: Hack around function_parse_error_transpose() hack of using portal's query text
Andres Freund [Mon, 12 May 2014 22:04:01 +0000 (00:04 +0200)]
core: Hack around function_parse_error_transpose() hack of using portal's query text

11 years agocore: Add strtoll/strtoull emulation if necessary.
Andres Freund [Sun, 16 Mar 2014 23:10:05 +0000 (00:10 +0100)]
core: Add strtoll/strtoull emulation if necessary.

11 years agoseqam: v0.2.3
Andres Freund [Mon, 20 May 2013 14:18:35 +0000 (16:18 +0200)]
seqam: v0.2.3

11 years agoreplication_identifiers: v0.3.2
Andres Freund [Fri, 22 Feb 2013 16:43:27 +0000 (17:43 +0100)]
replication_identifiers: v0.3.2

Introduce feature to keep track of replication progress.

Replication identifiers can be used to track & lookup remote nodes identified
via (sysid, tlid, remote_dbid, local_dbid, name) and map that tuple to a local
uint16.

Keyed by that replication identifier the progress of replication from
that system is tracked in a crashsafe manner.

Support for tracking that via output plugins is added as well.

Needs a catversion bump.

11 years agocommitts: v0.4.5
Andres Freund [Sun, 8 Dec 2013 18:18:34 +0000 (19:18 +0100)]
committs: v0.4.5

Alvaro Herrera, from 20131022221600.GE4987@eldon.alvh.no-ip.org

11 years agocore: use PG_FUNCNAME_MACRO to avoid stale name
Alvaro Herrera [Fri, 25 Apr 2014 17:33:11 +0000 (14:33 -0300)]
core: use PG_FUNCNAME_MACRO to avoid stale name

11 years agoevent_trigger.c: Fix typo in comment
Alvaro Herrera [Thu, 7 Nov 2013 12:44:23 +0000 (09:44 -0300)]
event_trigger.c: Fix typo in comment

11 years agogram.y: more psprintf()
Alvaro Herrera [Fri, 7 Feb 2014 19:42:37 +0000 (16:42 -0300)]
gram.y: more psprintf()