Skip to content
Snippets Groups Projects
  1. Sep 19, 2012
  2. Sep 06, 2012
  3. Sep 05, 2012
  4. Sep 04, 2012
  5. Sep 03, 2012
    • Andrew Dunstan's avatar
      Fix bugs in exec.c that prevented pg_upgrade working in Windows. · 6259678f
      Andrew Dunstan authored
      Backpatch to 9.2 - code before that is quite different and should
      not have these defects.
      6259678f
    • Tom Lane's avatar
      Fix pg_upgrade to cope with non-default unix_socket_directory scenarios. · f763b771
      Tom Lane authored
      When starting either an old or new postmaster, force it to place its Unix
      socket in the current directory.  This makes it even harder for accidental
      connections to occur during pg_upgrade, and also works around some
      scenarios where the default socket location isn't usable.  (For example,
      if the default location is something other than "/tmp", it might not exist
      during "make check".)
      
      When checking an already-running old postmaster, find out its actual socket
      directory location from postmaster.pid, if possible.  This dodges problems
      with an old postmaster having a configured location different from the
      default built into pg_upgrade's libpq.  We can't find that out if the old
      postmaster is pre-9.1, so also document how to cope with such scenarios
      manually.
      
      In support of this, centralize handling of the connection-related command
      line options passed to pg_upgrade's subsidiary programs, such as pg_dump.
      This should make future changes easier.
      
      Bruce Momjian and Tom Lane
      f763b771
  6. Aug 30, 2012
    • Alvaro Herrera's avatar
      Split tuple struct defs from htup.h to htup_details.h · c219d9b0
      Alvaro Herrera authored
      This reduces unnecessary exposure of other headers through htup.h, which
      is very widely included by many files.
      
      I have chosen to move the function prototypes to the new file as well,
      because that means htup.h no longer needs to include tupdesc.h.  In
      itself this doesn't have much effect in indirect inclusion of tupdesc.h
      throughout the tree, because it's also required by execnodes.h; but it's
      something to explore in the future, and it seemed best to do the htup.h
      change now while I'm busy with it.
      c219d9b0
  7. Aug 29, 2012
  8. Aug 28, 2012
  9. Aug 27, 2012
  10. Aug 23, 2012
  11. Aug 20, 2012
  12. Aug 15, 2012
    • Tom Lane's avatar
      Prevent access to external files/URLs via contrib/xml2's xslt_process(). · adc97d03
      Tom Lane authored
      libxslt offers the ability to read and write both files and URLs through
      stylesheet commands, thus allowing unprivileged database users to both read
      and write data with the privileges of the database server.  Disable that
      through proper use of libxslt's security options.
      
      Also, remove xslt_process()'s ability to fetch documents and stylesheets
      from external files/URLs.  While this was a documented "feature", it was
      long regarded as a terrible idea.  The fix for CVE-2012-3489 broke that
      capability, and rather than expend effort on trying to fix it, we're just
      going to summarily remove it.
      
      While the ability to write as well as read makes this security hole
      considerably worse than CVE-2012-3489, the problem is mitigated by the fact
      that xslt_process() is not available unless contrib/xml2 is installed,
      and the longstanding warnings about security risks from that should have
      discouraged prudent DBAs from installing it in security-exposed databases.
      
      Reported and fixed by Peter Eisentraut.
      
      Security: CVE-2012-3488
      adc97d03
  13. Aug 10, 2012
  14. Aug 07, 2012
  15. Aug 03, 2012
  16. Aug 02, 2012
    • Tom Lane's avatar
      Replace libpq's "row processor" API with a "single row" mode. · 41b9c845
      Tom Lane authored
      After taking awhile to digest the row-processor feature that was added to
      libpq in commit 92785dac, we've concluded
      it is over-complicated and too hard to use.  Leave the core infrastructure
      changes in place (that is, there's still a row processor function inside
      libpq), but remove the exposed API pieces, and instead provide a "single
      row" mode switch that causes PQgetResult to return one row at a time in
      separate PGresult objects.
      
      This approach incurs more overhead than proper use of a row processor
      callback would, since construction of a PGresult per row adds extra cycles.
      However, it is far easier to use and harder to break.  The single-row mode
      still affords applications the primary benefit that the row processor API
      was meant to provide, namely not having to accumulate large result sets in
      memory before processing them.  Preliminary testing suggests that we can
      probably buy back most of the extra cycles by micro-optimizing construction
      of the extra results, but that task will be left for another day.
      
      Marko Kreen
      41b9c845
  17. Jul 26, 2012
  18. Jul 23, 2012
    • Robert Haas's avatar
      Make pgbench vacuum before building indexes. · 46b2b7e0
      Robert Haas authored
      This is apparently faster than doing things the other way around when
      the scale factor is large.
      
      Along the way, adjust -n to suppress vacuuming during initialization
      as well as during test runs.
      
      Jeff Janes, with some small changes by me.
      46b2b7e0
  19. Jul 20, 2012
    • Robert Haas's avatar
      Make new event trigger facility actually do something. · 3a0e4d36
      Robert Haas authored
      Commit 3855968f added syntax, pg_dump,
      psql support, and documentation, but the triggers didn't actually fire.
      With this commit, they now do.  This is still a pretty basic facility
      overall because event triggers do not get a whole lot of information
      about what the user is trying to do unless you write them in C; and
      there's still no option to fire them anywhere except at the very
      beginning of the execution sequence, but it's better than nothing,
      and a good building block for future work.
      
      Along the way, add a regression test for ALTER LARGE OBJECT, since
      testing of event triggers reveals that we haven't got one.
      
      Dimitri Fontaine and Robert Haas
      3a0e4d36
  20. Jul 18, 2012
    • Tom Lane's avatar
      Get rid of useless global variable in pg_upgrade. · faf26bf1
      Tom Lane authored
      Since the scandir() emulation was taken out of pg_upgrade, there's
      no longer any need for scandir_file_pattern to exist as a global
      variable.  Replace it with a local in the one remaining function
      that was making use of it.
      faf26bf1
    • Tom Lane's avatar
      Improve pg_upgrade's load_directory() function. · 3d6ec663
      Tom Lane authored
      Error out on out-of-memory, rather than returning -1, which the sole
      existing caller wasn't checking for anyway.  There doesn't seem to be
      any use-case for making the caller check for failure here.
      
      Detect failure return from readdir().
      
      Use a less platform-dependent method of calculating the entrysize.
      It's possible, but not yet confirmed, that this explains bug #6733,
      in which Mike Wilson reports a pg_upgrade crash that did not occur
      in 9.1.  (Note that load_directory is effectively new code in 9.2,
      at least on platforms that have scandir().)
      
      Fix up comments, avoid uselessly using two counters, reduce the number
      of realloc calls to something sane.
      3d6ec663
  21. Jul 16, 2012
    • Peter Eisentraut's avatar
      Remove unreachable code · dd16f948
      Peter Eisentraut authored
      The Solaris Studio compiler warns about these instances, unlike more
      mainstream compilers such as gcc.  But manual inspection showed that
      the code is clearly not reachable, and we hope no worthy compiler will
      complain about removing this code.
      dd16f948
  22. Jul 12, 2012
    • Tom Lane's avatar
      Skip text->binary conversion of unnecessary columns in contrib/file_fdw. · a36088bc
      Tom Lane authored
      When reading from a text- or CSV-format file in file_fdw, the datatype
      input routines can consume a significant fraction of the runtime.
      Often, the query does not need all the columns, so we can get a useful
      speed boost by skipping I/O conversion for unnecessary columns.
      
      To support this, add a "convert_selectively" option to the core COPY code.
      This is undocumented and not accessible from SQL (for now, anyway).
      
      Etsuro Fujita, reviewed by KaiGai Kohei
      a36088bc
  23. Jul 06, 2012
Loading