Skip to content
Snippets Groups Projects
  1. Aug 12, 2015
  2. Aug 11, 2015
    • Andres Freund's avatar
      Allow pg_create_physical_replication_slot() to reserve WAL. · 6fcd8851
      Andres Freund authored
      When creating a physical slot it's often useful to immediately reserve
      the current WAL position instead of only doing after the first feedback
      message arrives. That e.g. allows slots to guarantee that all the WAL
      for a base backup will be available afterwards.
      
      Logical slots already have to reserve WAL during creation, so generalize
      that logic into being usable for both physical and logical slots.
      
      Catversion bump because of the new parameter.
      
      Author: Gurjeet Singh
      Reviewed-By: Andres Freund
      Discussion: CABwTF4Wh_dBCzTU=49pFXR6coR4NW1ynb+vBqT+Po=7fuq5iCw@mail.gmail.com
      6fcd8851
  3. Aug 10, 2015
    • Andres Freund's avatar
      Add confirmed_flush column to pg_replication_slots. · 3f811c2d
      Andres Freund authored
      There's no reason not to expose both restart_lsn and confirmed_flush
      since they have rather distinct meanings. The former is the oldest WAL
      still required and valid for both physical and logical slots, whereas
      the latter is the location up to which a logical slot's consumer has
      confirmed receiving data. Most of the time a slot will require older
      WAL (i.e. restart_lsn) than the confirmed
      position (i.e. confirmed_flush_lsn).
      
      Author: Marko Tiikkaja, editorialized by me
      Discussion: 559D110B.1020109@joh.to
      3f811c2d
    • Andres Freund's avatar
      Fix copy & paste mistake in pg_get_replication_slots(). · 5c4b25ac
      Andres Freund authored
      XLogRecPtr was compared with InvalidTransactionId instead of
      InvalidXLogRecPtr. As both are defined to the same value this doesn't
      cause any actual problems, but it's still wrong.
      
      Backpatch: 9.4-master, bug was introduced in 9.4
      5c4b25ac
  4. May 24, 2015
  5. Apr 21, 2015
    • Andres Freund's avatar
      Add 'active_in' column to pg_replication_slots. · d811c037
      Andres Freund authored
      Right now it is visible whether a replication slot is active in any
      session, but not in which.  Adding the active_in column, containing the
      pid of the backend having acquired the slot, makes it much easier to
      associate pg_replication_slots entries with the corresponding
      pg_stat_replication/pg_stat_activity row.
      
      This should have been done from the start, but I (Andres) dropped the
      ball there somehow.
      
      Author: Craig Ringer, revised by me Discussion:
      CAMsr+YFKgZca5_7_ouaMWxA5PneJC9LNViPzpDHusaPhU9pA7g@mail.gmail.com
      d811c037
  6. Jan 06, 2015
  7. Dec 23, 2014
    • Alvaro Herrera's avatar
      Revert "Use a bitmask to represent role attributes" · a609d967
      Alvaro Herrera authored
      This reverts commit 1826987a.
      
      The overall design was deemed unacceptable, in discussion following the
      previous commit message; we might find some parts of it still
      salvageable, but I don't want to be on the hook for fixing it, so let's
      wait until we have a new patch.
      a609d967
    • Alvaro Herrera's avatar
      Use a bitmask to represent role attributes · 1826987a
      Alvaro Herrera authored
      The previous representation using a boolean column for each attribute
      would not scale as well as we want to add further attributes.
      
      Extra auxilliary functions are added to go along with this change, to
      make up for the lost convenience of access of the old representation.
      
      Catalog version bumped due to change in catalogs and the new functions.
      
      Author: Adam Brightwell, minor tweaks by Álvaro
      Reviewed by: Stephen Frost, Andres Freund, Álvaro Herrera
      1826987a
  8. Jun 12, 2014
  9. May 06, 2014
    • Bruce Momjian's avatar
      pgindent run for 9.4 · 0a783200
      Bruce Momjian authored
      This includes removing tabs after periods in C comments, which was
      applied to back branches, so this change should not effect backpatching.
      0a783200
  10. Mar 03, 2014
    • Robert Haas's avatar
      Introduce logical decoding. · b89e1510
      Robert Haas authored
      This feature, building on previous commits, allows the write-ahead log
      stream to be decoded into a series of logical changes; that is,
      inserts, updates, and deletes and the transactions which contain them.
      It is capable of handling decoding even across changes to the schema
      of the effected tables.  The output format is controlled by a
      so-called "output plugin"; an example is included.  To make use of
      this in a real replication system, the output plugin will need to be
      modified to produce output in the format appropriate to that system,
      and to perform filtering.
      
      Currently, information can be extracted from the logical decoding
      system only via SQL; future commits will add the ability to stream
      changes via walsender.
      
      Andres Freund, with review and other contributions from many other
      people, including Álvaro Herrera, Abhijit Menon-Sen, Peter Gheogegan,
      Kevin Grittner, Robert Haas, Heikki Linnakangas, Fujii Masao, Abhijit
      Menon-Sen, Michael Paquier, Simon Riggs, Craig Ringer, and Steve
      Singer.
      b89e1510
    • Robert Haas's avatar
      Corrections to replication slots code and documentation. · d83ee622
      Robert Haas authored
      Andres Freund, per a report from Vik Faering
      d83ee622
  11. Feb 19, 2014
    • Robert Haas's avatar
      Switch various builtin functions to use pg_lsn instead of text. · 6f289c2b
      Robert Haas authored
      The functions in slotfuncs.c don't exist in any released version,
      but the changes to xlogfuncs.c represent backward-incompatibilities.
      Per discussion, we're hoping that the queries using these functions
      are few enough and simple enough that this won't cause too much
      breakage for users.
      
      Michael Paquier, reviewed by Andres Freund and further modified
      by me.
      6f289c2b
  12. Feb 01, 2014
    • Robert Haas's avatar
      Introduce replication slots. · 858ec118
      Robert Haas authored
      Replication slots are a crash-safe data structure which can be created
      on either a master or a standby to prevent premature removal of
      write-ahead log segments needed by a standby, as well as (with
      hot_standby_feedback=on) pruning of tuples whose removal would cause
      replication conflicts.  Slots have some advantages over existing
      techniques, as explained in the documentation.
      
      In a few places, we refer to the type of replication slots introduced
      by this patch as "physical" slots, because forthcoming patches for
      logical decoding will also have slots, but with somewhat different
      properties.
      
      Andres Freund and Robert Haas
      858ec118
Loading