Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: REPL1_9_CURRENT
Commits on Nov 15, 2010
  1. @alexeyklyukin

    Make the forwarder act on the master's and slave's queue instead of i…

    alexeyklyukin authored
    …ts own.
    
    A fresh forwarder connected to an existing master would start from the
    master's next-to acked recno, instead of calling for a full dump.
    
    A fresh forwarder connected to an existing slave would use its queue to
    check whether the slave requires a dump only if its queue is 'authoritative',
    i.e. when the master is connected. Otherwise, it would set the corresponding
    host's next-to-send recno with the one received from the slave.
    
    The master's forwarder process rechecks the status of all slaves after the
    initial connection, and desyncs those that are expecting next record that is
    not in the queue.
    
    All these changes would ensure that the master - slave replication would be
    able to recover if the forwarder is taken down and replaced with a new one
    without requiring a full dump.
Commits on Nov 8, 2010
  1. @alexeyklyukin
Commits on Sep 22, 2010
  1. @alvherre
  2. @alvherre
Commits on Aug 10, 2010
  1. @alexeyklyukin
Commits on Aug 9, 2010
  1. @alexeyklyukin
  2. @alexeyklyukin
  3. @alexeyklyukin

    Remove the code that handles MCP_QUEUE_TRUNCATE message and allow the…

    alexeyklyukin authored
    … forwarder to skip sending a full dump to a slave if the slave is in sync.
    
    To differentiate between a full dump transaction and a non-dump one with the same flags (i.e. TABLE_DUMP or CATALOG_DUMP) a FULL_DUMP flag is
    appended to such transaction. Previously, the queue was put to sync upon
    sending the initial transaction of the full dump. This has been changed to
    set the sync state only after the final full dump transaction. Since a slave
    with the not-in-sync queue skips data transactions, a separate per-slave flag
    (MCP_HOST_FLAG_ACCEPT_DATA_DURING_DUMP) was introduced to handle this.
    
    The generic code for sending queue messages was changed to send MCP_QUEUE_FLAG_EMPTY empty messages instead of silently skipping. This
    solves the problem of gaps in the queue, that prevented the next to send/
    next to restore record advance on the forwarder/agent slave. Additionally,
    the table list hook is now called for the dump transactions, even when
    they don't have any tables (since the code that decides whether to send them
    should be in the table list hook, and other non-table criteria are involved).
    
    There are a couple of special cases (i.e TABLE_DUMP transactions are
    always examined whenever full dump should be skipped or not, pg_largeobject
    and repl_slave_roles are specially processed) in the slave table list hook,
    which should be re-examined in the future.
  4. @alexeyklyukin

    Remove the queue truncate code on the slave agent.

    alexeyklyukin authored
    Get rid of MCP_QUEUE_FLAG_TRUNC handler. Also don't set the queue to sync
    immediately upon receiving the full dump. Instead, set it to sync only when
    the first full dump transaction becomes ready to be restored.
  5. @alexeyklyukin

    Add necessary flags and data structures to be able to discern between

    alexeyklyukin authored
    full dump and normal dump transactions (ultimately to skip a full dump).
    
    Per-host flags to tell the host whether to skip the dump, or to accept
    the data transactions during full dump (normally the data is skipped for
    the slave not in sync).
    
    An additional transaction flag to mark a full dump transaction explicitly
    (i.e. to be able to skip a catalog dump that is part of the full dump and
    not a stand-alone one).
  6. @alexeyklyukin

    Fixes for replication of special relations (i.e. pg_largobject).

    alexeyklyukin authored
    Previously, we used to include it in a tablelist sent from slave.
    That didn't work all the time (due to timing issues, i.e. when
    the forwarder had to decide on sending a largeobject transaction to slave
    before receiving the complete initial table list). These changes bring
    the logic of processing that special case relations to the forwarder itself.
  7. @alexeyklyukin

    Couple of important fixes:

    alexeyklyukin authored
    Check the recno of the table list received from the slave to match the one the forwarder is waiting for. Without this change, the forwarder can clear this flag to early if multiple catalog dumps are sent to slaves.
    
    Don't set the table's requested flag if the table dump is known to be already sent to the slave. If this flag is set - the non-dump transactions for the table are skipped, and this is not what we want in that case.
    
    Several small, but essential one-line fixes.
Commits on Feb 12, 2010
  1. Add test for slave side triggers

    Alexey Klyukin authored
Commits on Feb 9, 2010
  1. Eliminate RemoveForwaderStateFile call. We don't have to remove the s…

    Alexey Klyukin authored
    …tate file during shared memory corruption because we don't write corrupted data at the first place.
Commits on Feb 8, 2010
  1. Merge branch 'REPL1_9_CURRENT' of compile.commandprompt.com:/home/alv…

    Alexey Klyukin authored
    …herre/replicator into REPL1_9_CURRENT
  2. Avoid sleeping on a socket during the first round after restore proce…

    Alexey Klyukin authored
    …ss is resumed. This will make the slave restore existing data in the queue before it will wait for new messages.
Commits on Feb 5, 2010
  1. @alvherre

    Merge branch 'REPL1_9_CURRENT' of compile.commandprompt.com:/home/alv…

    alvherre authored
    …herre/replicator into REPL1_9_CURRENT
Commits on Feb 4, 2010
  1. Advance the next to send record number while sending data to the slav…

    Alexey Klyukin authored
    …e in a special case when it was modified by master. Also fix an off-by-one error in authentication.
Commits on Feb 1, 2010
  1. @alvherre

    Make all replicated relation lists more consistently use SnapshotNow

    alvherre authored
    They used to use SerializableSnapshot in a previous release, but some of
    them were changed to use SnapshotNow when merging to 8.4.  The last
    remnants should be now gone.
Commits on Jan 26, 2010
  1. @alexeyklyukin

    Refactor the tablelist sending code on the slave.

    alexeyklyukin authored
    Split the sending function into the one that collects the list
    (and starts a transaction), and another, that actually sends
    the list. Call SlaveReceiveMessage before MCPMsgAvailable to
    allow the data to be read from the socket into libpq buffers.
    Per Alvaro's suggestions.
  2. @alvherre
  3. @alvherre

    Improve coding style

    alvherre authored
Commits on Jan 25, 2010
  1. @alexeyklyukin

    Check for the forwarder activity when sending table lists on the slav…

    alexeyklyukin authored
    …e agent process. If we detect new data from the forwarder we stop sending tables until everything is received. This avoids mutual slave/forwarder startvation we experienced before.
Commits on Jan 23, 2010
  1. @alvherre
Commits on Jan 22, 2010
  1. @alvherre

    Simplify queue pruning in forwarder by considering only AckedRecno

    alvherre authored
    We set the queue's AckRecno and FirstRecno to the minimum of all hosts'
    AckedRecno, so that the queue prune can remove all records laying before
    that value.  This is the intended use of the queue's AckRecno; and as
    for FirstRecno, while slightly bogus this is not a problem because
    it is unused in the forwarder anyway.
    
    Since the Reading recno is useless, it has been removed.  Per discussion
    on the mailing list.
Commits on Jan 21, 2010
  1. @alvherre
  2. @alvherre
Commits on Jan 20, 2010
  1. Well, the systemtap guys moved the goalposts again: with the latest v…

    Tom Lane authored
    …ersion,
    
    we *must* generate probes.o or the dtrace probes don't work.  Revert our
    workaround for their previous bug.  Details at
    https://bugzilla.redhat.com/show_bug.cgi?id=557266
  2. @alexeyklyukin

    Merge branch 'REPL1_9_CURRENT' of compile.commandprompt.com:/home/alv…

    alexeyklyukin authored
    …herre/replicator into REPL1_9_CURRENT
  3. @alexeyklyukin
  4. @alexeyklyukin
  5. @alvherre

    Merge branch 'REPL1_9_CURRENT' of compile.commandprompt.com:/home/alv…

    alvherre authored
    …herre/replicator into REPL1_9_CURRENT
    
    Conflicts:
    	src/backend/mammoth_r/forwarder/mcp_slave.c
  6. @alexeyklyukin

    Use the transaction bitmapset on the forwarder to decide whether to s…

    alexeyklyukin authored
    …end a catalog dump transaction to the slave even if it's not in the table list for the slave. Don't wait for the table list anymore on the forwarder.
  7. @alexeyklyukin

    Send the record number of the next to restore transaction to the forw…

    alexeyklyukin authored
    …arder as a part of the table list.
Something went wrong with that request. Please try again.