Merge remote-tracking branch 'afreund/slot2' into slot2
authorRobert Haas <rhaas@postgresql.org>
Tue, 28 Jan 2014 20:27:52 +0000 (15:27 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 28 Jan 2014 20:27:52 +0000 (15:27 -0500)
Conflicts:
src/backend/replication/slotfuncs.c
src/include/replication/slot.h

1  2 
src/backend/replication/slot.c
src/backend/replication/slotfuncs.c
src/include/replication/slot.h

Simple merge
Simple merge
index 2c85b54c31237512c743ac46ca4c895da5625d65,a332eff3dc296d26bb578977d2c7ade5d66ab8ba..642a4d085bfe8a8ecabcef65f847e3d9aef20ea6
@@@ -50,21 -58,17 +51,27 @@@ typedef struct ReplicationSlo
        /* is somebody streaming out changes for this slot */
        bool            active;
  
+       /* any outstanding modifications? */
+       bool            dirty;
 +      /*
 +       * For logical decoding, it's extremely important that we never remove any
 +       * data that's still needed for decoding purposes, even after a crash;
 +       * otherwise, decoding will produce wrong answers.  Ordinary streaming
 +       * replication also needs to prevent old row versions from being removed
 +       * too soon, but the worst consequence we might encounter there is unwanted
 +       * query cancellations on the standby.  Thus, for logical decoding,
 +       * this value represents the latest data_xmin that has actually been
 +       * written to disk, whereas for streaming replication, it's just the
 +       * same as the persistent value (data.data_xmin).
 +       */
 +      TransactionId effective_data_xmin;
 +
        /* data surviving shutdowns and crashes */
        ReplicationSlotPersistentData data;
 -      /* in-memory xmin horizon, updated after syncing to disk, used for computations */
 -      TransactionId effective_data_xmin;
 -
+       /* is somebody performing io on this slot? */
+       LWLock     *io_in_progress_lock;
  } ReplicationSlot;
  
  /*