1. 27 Nov, 2010 3 commits
    • Tom Lane's avatar
      On further testing, PQping also needs an explicit check for AUTH_REQ. · 49cd8a3f
      Tom Lane authored
      The pg_fe_sendauth code might fail if it can't handle the authentication
      request message type --- if so, ping should still say the server is up.
      49cd8a3f
    • Tom Lane's avatar
      Rewrite PQping to be more like what we agreed to last week. · db96e1cc
      Tom Lane authored
      Basically, we want to distinguish all cases where the connection was
      not made from those where it was.  A convenient proxy for this is to
      see if we got a message with a SQLSTATE code back from the postmaster.
      This presumes that the postmaster will always send us a SQLSTATE in
      a failure message, which is true for 7.4 and later postmasters in
      every case except fork failure.  (We could possibly complicate the
      postmaster code to do something about that, but it seems not worth
      the trouble, especially since pg_ctl's response for that case should
      be to keep waiting anyway.)
      
      If we did get a SQLSTATE from the postmaster, there are basically only
      two cases, as per last week's discussion: ERRCODE_CANNOT_CONNECT_NOW
      and everything else.  Any other error code implies that the postmaster
      is in principle willing to accept connections, it just didn't like or
      couldn't handle this particular request.  We want to make a special
      case for ERRCODE_CANNOT_CONNECT_NOW so that "pg_ctl start -w" knows
      it should keep waiting.
      
      In passing, pick names for the enum constants that are a tad less
      likely to present collision hazards in future.
      db96e1cc
    • Tom Lane's avatar
      Clean up IPv4 vs IPv6 bogosity in connectFailureMessage(). · be3b666e
      Tom Lane authored
      Newly added code was supposing that "struct sockaddr_in" applies to IPv6.
      be3b666e
  2. 26 Nov, 2010 11 commits
  3. 25 Nov, 2010 10 commits
  4. 24 Nov, 2010 3 commits
    • Bruce Momjian's avatar
      Document that a CHECKPOINT before taking a file system snapshot can · 7276ab58
      Bruce Momjian authored
      reduce recovery time.
      7276ab58
    • Bruce Momjian's avatar
      When reporting the server as not responding, if the hostname was · ba11258c
      Bruce Momjian authored
      supplied, also print the IP address.  This allows IPv4 and IPv6 failures
      to be distinguished.  Also useful when a hostname resolves to multiple
      IP addresses.
      
      Also, remove use of inet_ntoa() and use our own inet_net_ntop() in all
      places, including in libpq, because it is thread-safe.
      ba11258c
    • Tom Lane's avatar
      Create the system catalog infrastructure needed for KNNGIST. · 725d52d0
      Tom Lane authored
      This commit adds columns amoppurpose and amopsortfamily to pg_amop, and
      column amcanorderbyop to pg_am.  For the moment all the entries in
      amcanorderbyop are "false", since the underlying support isn't there yet.
      
      Also, extend the CREATE OPERATOR CLASS/ALTER OPERATOR FAMILY commands with
      [ FOR SEARCH | FOR ORDER BY sort_operator_family ] clauses to allow the new
      columns of pg_amop to be populated, and create pg_dump support for dumping
      that information.
      
      I also added some documentation, although it's perhaps a bit premature
      given that the feature doesn't do anything useful yet.
      
      Teodor Sigaev, Robert Haas, Tom Lane
      725d52d0
  5. 23 Nov, 2010 4 commits
  6. 22 Nov, 2010 2 commits
  7. 21 Nov, 2010 2 commits
    • Robert Haas's avatar
    • Robert Haas's avatar
      Add new SQL function, format(text). · 75048707
      Robert Haas authored
      Currently, three conversion format specifiers are supported: %s for a
      string, %L for an SQL literal, and %I for an SQL identifier.  The latter
      two are deliberately designed not to overlap with what sprintf() already
      supports, in case we want to add more of sprintf()'s functionality here
      later.
      
      Patch by Pavel Stehule, heavily revised by me.  Reviewed by Jeff Janes
      and, in earlier versions, by Itagaki Takahiro and Tom Lane.
      75048707
  8. 20 Nov, 2010 5 commits