1. 22 Sep, 2008 2 commits
    • Tom Lane's avatar
      Get rid of pgpass_from_client tracking inside libpq --- given the conclusion · c52aab55
      Tom Lane authored
      that presence of the password in the conninfo string must be checked *before*
      risking a connection attempt, there is no point in checking it afterwards.
      This makes the specification of PQconnectionUsedPassword() a bit simpler
      and perhaps more generally useful, too.
      c52aab55
    • Tom Lane's avatar
      Fix dblink_connect() so that it verifies that a password is supplied in the · cae7ad90
      Tom Lane authored
      conninfo string *before* trying to connect to the remote server, not after.
      As pointed out by Marko Kreen, in certain not-very-plausible situations
      this could result in sending a password from the postgres user's .pgpass file,
      or other places that non-superusers shouldn't have access to, to an
      untrustworthy remote server.  The cleanest fix seems to be to expose libpq's
      conninfo-string-parsing code so that dblink can check for a password option
      without duplicating the parsing logic.
      
      Joe Conway, with a little cleanup by Tom Lane
      cae7ad90
  2. 21 Sep, 2008 1 commit
  3. 19 Sep, 2008 6 commits
  4. 17 Sep, 2008 4 commits
  5. 16 Sep, 2008 3 commits
    • Tom Lane's avatar
      Clean up a couple of weird corner cases in interval parsing: make -yyyy-mm be · b73c0c2a
      Tom Lane authored
      interpreted as expected (the sign should affect months too), and get rid of
      hard-wired assumption that unmarked signed values must be hours (if integers)
      or seconds (if floats).  The former was just a bug in my previous patch,
      while the latter may have made sense at one time but seems illogical now
      that we support determination of the units from typmod information.
      Ron Mayer and myself.
      b73c0c2a
    • Tom Lane's avatar
      Widen the nLocks counts in local lock tables from int to int64. This · 30df79a7
      Tom Lane authored
      forestalls potential overflow when the same table (or other object, but
      usually tables) is accessed by very many successive queries within a single
      transaction.  Per report from Michael Milligan.
      
      Back-patch to 8.0, which is as far back as the patch conveniently applies.
      There have been no reports of overflow in pre-8.3 releases, but clearly the
      risk existed all along.  (Michael's report suggests that 8.3 may consume lock
      counts faster than prior releases, but with no test case to look at it's hard
      to be sure about that.  Widening the counts seems a good future-proofing
      measure in any event.)
      30df79a7
    • Tom Lane's avatar
  6. 15 Sep, 2008 8 commits
  7. 12 Sep, 2008 3 commits
  8. 11 Sep, 2008 4 commits
    • Tom Lane's avatar
      Add a duration option to pgbench, so that test length can be specified in seconds · cff4aa6a
      Tom Lane authored
      instead of by number of transactions to run.  Takahiro Itagaki
      cff4aa6a
    • Tom Lane's avatar
      Tighten up to_date/to_timestamp so that they are more likely to reject · 06edce4c
      Tom Lane authored
      erroneous input, rather than silently producing bizarre results as formerly
      happened.
      
      Brendan Jurd
      06edce4c
    • Tom Lane's avatar
      Adjust the parser to accept the typename syntax INTERVAL ... SECOND(n) · 70530c80
      Tom Lane authored
      and the literal syntax INTERVAL 'string' ... SECOND(n), as required by the
      SQL standard.  Our old syntax put (n) directly after INTERVAL, which was
      a mistake, but will still be accepted for backward compatibility as well
      as symmetry with the TIMESTAMP cases.
      
      Change intervaltypmodout to show it in the spec's way, too.  (This could
      potentially affect clients, if there are any that analyze the typmod of an
      INTERVAL in any detail.)
      
      Also fix interval input to handle 'min:sec.frac' properly; I had overlooked
      this case in my previous patch.
      
      Document the use of the interval fields qualifier, which up to now we had
      never mentioned in the docs.  (I think the omission was intentional because
      it didn't work per spec; but it does now, or at least close enough to be
      credible.)
      70530c80
    • Alvaro Herrera's avatar
      Initialize the minimum frozen Xid in vac_update_datfrozenxid using · d53a5668
      Alvaro Herrera authored
      GetOldestXmin() instead of RecentGlobalXmin; this is safer because we do not
      depend on the latter being correctly set elsewhere, and while it is more
      expensive, this code path is not performance-critical.  This is a real
      risk for autovacuum, because it can execute whole cycles without doing
      a single vacuum, which would mean that RecentGlobalXmin would stay at its
      initialization value, FirstNormalTransactionId, causing a bogus value to be
      inserted in pg_database.  This bug could explain some recent reports of
      failure to truncate pg_clog.
      
      At the same time, change the initialization of RecentGlobalXmin to
      InvalidTransactionId, and ensure that it's set to something else whenever
      it's going to be used.  Using it as FirstNormalTransactionId in HOT page
      pruning could incur in data loss.  InitPostgres takes care of setting it
      to a valid value, but the extra checks are there to prevent "special"
      backends from behaving in unusual ways.
      
      Per Tom Lane's detailed problem dissection in 29544.1221061979@sss.pgh.pa.us
      d53a5668
  9. 10 Sep, 2008 5 commits
  10. 09 Sep, 2008 2 commits
  11. 08 Sep, 2008 2 commits
    • Tom Lane's avatar
      Fix a couple of problems pointed out by Fujii Masao in the 2008-Apr-05 patch · ead21631
      Tom Lane authored
      for pg_stop_backup.  First, it is possible that the history file name is not
      alphabetically later than the last WAL file name, so we should explicitly
      check that both have been archived.  Second, the previous coding would wait
      forever if a checkpoint had managed to remove the WAL file before we look for
      it.
      
      Simon Riggs, plus some code cleanup by me.
      ead21631
    • Tom Lane's avatar
      Make pg_dump --data-only try to order the table dumps so that foreign keys' · bc01b45a
      Tom Lane authored
      referenced tables are dumped before the referencing tables.  This avoids
      failures when the data is loaded with the FK constraints already active.
      If no such ordering is possible because of circular or self-referential
      constraints, print a NOTICE to warn the user about it.
      bc01b45a