1. 29 Jan, 2010 8 commits
  2. 28 Jan, 2010 9 commits
  3. 27 Jan, 2010 5 commits
    • Heikki Linnakangas's avatar
      Fix bug in wasender's xlogid boundary handling, reported by Erik Rijkers. · 83cb7da7
      Heikki Linnakangas authored
      LogwrtRqst.Write can be set to non-existent FF log segment, we mustn't
      try to send that in XLogSend().
      
      Also fix similar bug in ReadRecord(), which I just introduced in the
      ReadRecord() refactoring patch.
      83cb7da7
    • Heikki Linnakangas's avatar
      Make standby server continuously retry restoring the next WAL segment with · 1bb25580
      Heikki Linnakangas authored
      restore_command, if the connection to the primary server is lost. This
      ensures that the standby can recover automatically, if the connection is
      lost for a long time and standby falls behind so much that the required
      WAL segments have been archived and deleted in the master.
      
      This also makes standby_mode useful without streaming replication; the
      server will keep retrying restore_command every few seconds until the
      trigger file is found. That's the same basic functionality pg_standby
      offers, but without the bells and whistles.
      
      To implement that, refactor the ReadRecord/FetchRecord functions. The
      FetchRecord() function introduced in the original streaming replication
      patch is removed, and all the retry logic is now in a new function called
      XLogReadPage(). XLogReadPage() is now responsible for executing
      restore_command, launching walreceiver, and waiting for new WAL to arrive
      from primary, as required.
      
      This also changes the life cycle of walreceiver. When launched, it now only
      tries to connect to the master once, and exits if the connection fails, or
      is lost during streaming for any reason. The startup process detects the
      death, and re-launches walreceiver if necessary.
      1bb25580
    • Magnus Hagander's avatar
      Fix typo. · ab13d1e9
      Magnus Hagander authored
      Noted by Thom Brown.
      ab13d1e9
    • Magnus Hagander's avatar
      Add support for RADIUS authentication. · b3daac5a
      Magnus Hagander authored
      b3daac5a
    • Andrew Dunstan's avatar
      000416ac
  4. 26 Jan, 2010 10 commits
  5. 25 Jan, 2010 3 commits
    • Tom Lane's avatar
      Add get_bit/set_bit functions for bit strings, paralleling those for bytea, · 9507c8a1
      Tom Lane authored
      and implement OVERLAY() for bit strings and bytea.
      
      In passing also convert text OVERLAY() to a true built-in, instead of
      relying on a SQL function.
      
      Leonardo F, reviewed by Kevin Grittner
      9507c8a1
    • Heikki Linnakangas's avatar
      Add note that PREPARE TRANSACTION is for transaction managers, not · 1d1f425f
      Heikki Linnakangas authored
      regular applications. Also add a comment pointing out that tab-complition
      for PREPARE TRANSACTION is missing on purpose.
      1d1f425f
    • Tom Lane's avatar
      Apply Tcl_Init() to the "hold" interpreter created by pltcl. · e7dcfd05
      Tom Lane authored
      You might think this is unnecessary since that interpreter is never used
      to run code --- but it turns out that's wrong.  As of Tcl 8.5, the "clock"
      command (alone among builtin Tcl commands) is partially implemented by
      loaded-on-demand Tcl code, which means that it fails if there's not
      unknown-command support, and also that it's impossible to run it directly
      in a safe interpreter.  The way they get around the latter is that
      Tcl_CreateSlave() automatically sets up an alias command that forwards any
      execution of "clock" in a safe slave interpreter to its parent interpreter.
      Thus, when attempting to execute "clock" in trusted pltcl, the command
      actually executes in the "hold" interpreter, where it will fail if
      unknown-command support hasn't been introduced by sourcing the standard
      init.tcl script, which is done by Tcl_Init().  (This is a pretty dubious
      design decision on the Tcl boys' part, if you ask me ... but they didn't.)
      
      Back-patch all the way.  It's not clear that anyone would try to use ancient
      versions of pltcl with a recent Tcl, but it's not clear they wouldn't, either.
      Also add a regression test using "clock", in branches that have regression
      test support for pltcl.
      
      Per recent trouble report from Kyle Bateman.
      e7dcfd05
  6. 24 Jan, 2010 3 commits
    • Joe Conway's avatar
      Rewrite dblink_record_internal() and dblink_fetch() to use a tuplestore · 56cbb611
      Joe Conway authored
      (SFRM_Materialize mode) to return tuples. Since we don't return from the
      dblink function in tuplestore mode, release the PGresult with a PG_CATCH
      block on error. Also rearrange to share the same code to materialize the
      tuplestore. Patch by Takahiro Itagaki.
      56cbb611
    • Tom Lane's avatar
      Fix assorted core dumps and Assert failures that could occur during · 875353b9
      Tom Lane authored
      AbortTransaction or AbortSubTransaction, when trying to clean up after an
      error that prevented (sub)transaction start from completing:
      * access to TopTransactionResourceOwner that might not exist
      * assert failure in AtEOXact_GUC, if AtStart_GUC not called yet
      * assert failure or core dump in AfterTriggerEndSubXact, if
        AfterTriggerBeginSubXact not called yet
      
      Per testing by injecting elog(ERROR) at successive steps in StartTransaction
      and StartSubTransaction.  It's not clear whether all of these cases could
      really occur in the field, but at least one of them is easily exposed by
      simple stress testing, as per my accidental discovery yesterday.
      875353b9
    • Magnus Hagander's avatar
      Add missing closing tag. · 74f4be6c
      Magnus Hagander authored
      74f4be6c
  7. 23 Jan, 2010 2 commits