1. 02 Dec, 2011 4 commits
  2. 01 Dec, 2011 7 commits
  3. 30 Nov, 2011 10 commits
    • Tom Lane's avatar
      Update time zone data files to tzdata release 2011n. · 895d328a
      Tom Lane authored
      DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, Samoa.
      Historical corrections for Alaska and British East Africa.
      895d328a
    • Robert Haas's avatar
      Improve table locking behavior in the face of current DDL. · 2ad36c4e
      Robert Haas authored
      In the previous coding, callers were faced with an awkward choice:
      look up the name, do permissions checks, and then lock the table; or
      look up the name, lock the table, and then do permissions checks.
      The first choice was wrong because the results of the name lookup
      and permissions checks might be out-of-date by the time the table
      lock was acquired, while the second allowed a user with no privileges
      to interfere with access to a table by users who do have privileges
      (e.g. if a malicious backend queues up for an AccessExclusiveLock on
      a table on which AccessShareLock is already held, further attempts
      to access the table will be blocked until the AccessExclusiveLock
      is obtained and the malicious backend's transaction rolls back).
      
      To fix, allow callers of RangeVarGetRelid() to pass a callback which
      gets executed after performing the name lookup but before acquiring
      the relation lock.  If the name lookup is retried (because
      invalidation messages are received), the callback will be re-executed
      as well, so we get the best of both worlds.  RangeVarGetRelid() is
      renamed to RangeVarGetRelidExtended(); callers not wishing to supply
      a callback can continue to invoke it as RangeVarGetRelid(), which is
      now a macro.  Since the only one caller that uses nowait = true now
      passes a callback anyway, the RangeVarGetRelid() macro defaults nowait
      as well.  The callback can also be used for supplemental locking - for
      example, REINDEX INDEX needs to acquire the table lock before the index
      lock to reduce deadlock possibilities.
      
      There's a lot more work to be done here to fix all the cases where this
      can be a problem, but this commit provides the general infrastructure
      and fixes the following specific cases: REINDEX INDEX, REINDEX TABLE,
      LOCK TABLE, and and DROP TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE.
      
      Per discussion with Noah Misch and Alvaro Herrera.
      2ad36c4e
    • Tom Lane's avatar
      Tweak previous patch to ensure edata->filename always gets initialized. · a87ebace
      Tom Lane authored
      On a platform that isn't supplying __FILE__, previous coding would either
      crash or give a stale result for the filename string.  Not sure how likely
      that is, but the original code catered for it, so let's keep doing so.
      a87ebace
    • Peter Eisentraut's avatar
      Strip file names reported in error messages in vpath builds · dd136052
      Peter Eisentraut authored
      In vpath builds, the __FILE__ macro that is used in verbose error
      reports contains the full absolute file name, which makes the error
      messages excessively verbose.  So keep only the base name, thus
      matching the behavior of non-vpath builds.
      dd136052
    • Tom Lane's avatar
      Remove duplicate definition of 'progname'. · be2f9092
      Tom Lane authored
      Per buildfarm.
      be2f9092
    • Tom Lane's avatar
      Move EXTRA_CLEAN to where it actually works. · 9c6aa8cc
      Tom Lane authored
      9c6aa8cc
    • Tom Lane's avatar
      Prevent autovacuum transactions from running in serializable mode. · 73d1bfd0
      Tom Lane authored
      Force the transaction isolation level to READ COMMITTED in autovacuum
      worker and launcher processes.  There is no benefit to using a higher
      isolation level, and doing so could result in delaying foreground
      transactions (or maybe even causing unnecessary serialization failures?).
      Noted by Dan Ports.
      
      Also, make sure we disable zero_damaged_pages and statement_timeout in
      the autovac launcher, not only workers.  Now that the launcher can run
      transactions, these settings could affect its behavior, and it seems
      like the same arguments apply to the launcher as the workers.
      73d1bfd0
    • Bruce Momjian's avatar
    • Tom Lane's avatar
      Clean up after recent pg_dump patches. · 0195e5c4
      Tom Lane authored
      Fix entirely broken handling of va_list printing routines, update some
      out-of-date comments, fix some bogus inclusion orders, fix NLS declarations,
      fix missed realloc calls.
      0195e5c4
    • Bruce Momjian's avatar
      2ff36abe
  4. 29 Nov, 2011 12 commits
  5. 28 Nov, 2011 7 commits
    • Bruce Momjian's avatar
      Pgindent clauses.c, per request from Tom. · 269755ef
      Bruce Momjian authored
      269755ef
    • Tom Lane's avatar
      Convert eval_const_expressions's long series of IsA tests into a switch. · a04161f2
      Tom Lane authored
      This function has now grown enough cases that a switch seems appropriate.
      This results in a measurable speed improvement on some platforms, and
      should certainly not hurt.  The code's in need of a pgindent run now,
      though.
      
      Andres Freund
      a04161f2
    • Tom Lane's avatar
      Remove erroneous claim about use of pg_locks.objid for advisory locks. · 5943d401
      Tom Lane authored
      The correct information appears in the text, so just remove the statement
      in the table, where it did not fit nicely anyway.  (Curiously, the correct
      info has been there much longer than the erroneous table entry.)
      Resolves problem noted by Daniele Varrazzo.
      
      In HEAD and 9.1, also do a bit of wordsmithing on other text on the page.
      5943d401
    • Tom Lane's avatar
      Fix some bogosities in pg_dump's foreign-table support. · 9761ad67
      Tom Lane authored
      The server name for a foreign table was not quoted at need, as per report
      from Ronan Dunklau.  Also, queries related to FDW options were inadequately
      schema-qualified in places where the search path isn't just pg_catalog, and
      were inconsistently formatted everywhere, and we didn't always check that
      we got the expected number of rows from them.
      9761ad67
    • Magnus Hagander's avatar
      Add libpq connection option to disable SSL compression · 64aea1eb
      Magnus Hagander authored
      This can be used to remove the overhead of SSL compression on
      fast networks.
      
      Laurenz Albe
      64aea1eb
    • Tom Lane's avatar
      Ensure that whole-row junk Vars are always of composite type. · dd3bab5f
      Tom Lane authored
      The EvalPlanQual machinery assumes that whole-row Vars generated for the
      outputs of non-table RTEs will be of composite types.  However, for the
      case where the RTE is a function call returning a scalar type, we were
      doing the wrong thing, as a result of sharing code with a parser case
      where the function's scalar output is wanted.  (Or at least, that's what
      that case has done historically; it does seem a bit inconsistent.)
      
      To fix, extend makeWholeRowVar's API so that it can support both use-cases.
      This fixes Belinda Cussen's report of crashes during concurrent execution
      of UPDATEs involving joins to the result of UNNEST() --- in READ COMMITTED
      mode, we'd run the EvalPlanQual machinery after a conflicting row update
      commits, and it was expecting to get a HeapTuple not a scalar datum from
      the "wholerowN" variable referencing the function RTE.
      
      Back-patch to 9.0 where the current EvalPlanQual implementation appeared.
      
      In 9.1 and up, this patch also fixes failure to attach the correct
      collation to the Var generated for a scalar-result case.  An example:
      regression=# select upper(x.*) from textcat('ab', 'cd') x;
      ERROR:  could not determine which collation to use for upper() function
      dd3bab5f
    • Andrew Dunstan's avatar
      Make pg_dumpall build with the right object files under MSVC. · 91572ee0
      Andrew Dunstan authored
      This fixes a longstanding but up to now benign bug in the way pg_dumpall
      was built. The bug was exposed by recent code adjustments. The Makefile
      does not use $(OBJS) to build pg_dumpall, so this fix removes their source
      files from the pg_dumpall object and adds in the one source file it
      consequently needs.
      91572ee0