1. 02 Apr, 2014 1 commit
    • Tom Lane's avatar
      Fix bugs in manipulation of PgBackendStatus.st_clienthostname. · 682c5bbe
      Tom Lane authored
      Initialization of this field was not being done according to the
      st_changecount protocol (it has to be done within the changecount increment
      range, not outside).  And the test to see if the value should be reported
      as null was wrong.  Noted while perusing uses of Port.remote_hostname.
      
      This was wrong from the introduction of this code (commit 4a25bc14),
      so back-patch to 9.1.
      682c5bbe
  2. 01 Apr, 2014 6 commits
  3. 31 Mar, 2014 6 commits
    • Robert Haas's avatar
      Mark FastPathStrongRelationLocks volatile. · 4bc15a8b
      Robert Haas authored
      Otherwise, the compiler might decide to move modifications to data
      within this structure outside the enclosing SpinLockAcquire /
      SpinLockRelease pair, leading to shared memory corruption.
      
      This may or may not explain a recent lmgr-related buildfarm failure
      on prairiedog, but it needs to be fixed either way.
      4bc15a8b
    • Robert Haas's avatar
      test_decoding: Update .gitignore · 0f95b723
      Robert Haas authored
      Commit 7317d8d9 changed the set of
      things that need to be ignored, but neglected to update .gitignore.
      0f95b723
    • Robert Haas's avatar
      Count buffers dirtied due to hints in pgBufferUsage.shared_blks_dirtied. · 066254ce
      Robert Haas authored
      Previously, such buffers weren't counted, with the possible result that
      EXPLAIN (BUFFERS) and pg_stat_statements would understate the true
      number of blocks dirtied by an SQL statement.
      
      Back-patch to 9.2, where this counter was introduced.
      
      Amit Kapila
      066254ce
    • Robert Haas's avatar
      Fix thinko in logical decoding code. · 3f0e4be4
      Robert Haas authored
      Andres Freund
      3f0e4be4
    • Heikki Linnakangas's avatar
      Rewrite the way GIN posting lists are packed on a page, to reduce WAL volume. · 14d02f0b
      Heikki Linnakangas authored
      Inserting (in retail) into the new 9.4 format GIN posting tree created much
      larger WAL records than in 9.3. The previous strategy to WAL logging was
      basically to log the whole page on each change, with the exception of
      completely unmodified segments up to the first modified one. That was not
      too bad when appending to the end of the page, as only the last segment had
      to be WAL-logged, but per Fujii Masao's testing, even that produced 2x the
      WAL volume that 9.3 did.
      
      The new strategy is to keep track of changes to the posting lists in a more
      fine-grained fashion, and also make the repacking" code smarter to avoid
      decoding and re-encoding segments unnecessarily.
      14d02f0b
    • Heikki Linnakangas's avatar
      Rename GinLogicValue to GinTernaryValue. · 0cfa34c2
      Heikki Linnakangas authored
      It's more descriptive. Also, get rid of the enum, and use #defines instead,
      per Greg Stark's suggestion.
      0cfa34c2
  4. 30 Mar, 2014 1 commit
    • Andrew Dunstan's avatar
      Use separate output dirs for test_decoding's two runs. · 7317d8d9
      Andrew Dunstan authored
      contrib/test_decoding's "make check" runs two sets of tests. Unless we
      specify separate output directories for each set the isolation tests
      will overwrite the output from the  normal regression set. Doing this
      will help the buildfarm collect complete logs.
      7317d8d9
  5. 29 Mar, 2014 6 commits
    • Bruce Momjian's avatar
      psql: display "Replica Identity" only for FULL and NOTHING · 9d661164
      Bruce Momjian authored
      INDEX is already displayed on the index, and we now exclude pg_catalog.
      DEFAULT is not displayed.
      9d661164
    • Tom Lane's avatar
      Fix dumping of a materialized view that depends on a table's primary key. · 62215de2
      Tom Lane authored
      It is possible for a view or materialized view to depend on a table's
      primary key, if the view query relies on functional dependency to
      abbreviate a GROUP BY list.  This is problematic for pg_dump since we
      ordinarily want to dump view definitions in the pre-data section but
      indexes in post-data.  pg_dump knows how to deal with this situation for
      regular views, by breaking the view's ON SELECT rule apart from the view
      proper.  But it had not been taught what to do about materialized views,
      and in fact mistakenly dumped them as regular views in such cases, as
      seen in bug #9616 from Jesse Denardo.
      
      If we had CREATE OR REPLACE MATERIALIZED VIEW, we could fix this in a
      manner analogous to what's done for regular views; but we don't yet,
      and we'd not back-patch such a thing into 9.3 anyway.  As a hopefully-
      temporary workaround, break the circularity by postponing the matview
      into post-data altogether when this case occurs.
      62215de2
    • Noah Misch's avatar
      Revert "Secure Unix-domain sockets of "make check" temporary clusters." · 8f5578d0
      Noah Misch authored
      About half of the buildfarm members use too-long directory names,
      strongly suggesting that this approach is a dead end.
      8f5578d0
    • Noah Misch's avatar
      Secure Unix-domain sockets of "make check" temporary clusters. · 31c6e54e
      Noah Misch authored
      Any OS user able to access the socket can connect as the bootstrap
      superuser and in turn execute arbitrary code as the OS user running the
      test.  Protect against that by placing the socket in the temporary data
      directory, which has mode 0700 thanks to initdb.  Back-patch to 8.4 (all
      supported versions).  The hazard remains wherever the temporary cluster
      accepts TCP connections, notably on Windows.
      
      Attempts to run "make check" from a directory with a long name will now
      fail.  An alternative not sharing that problem was to place the socket
      in a subdirectory of /tmp, but that is only secure if /tmp is sticky.
      The PG_REGRESS_SOCK_DIR environment variable is available as a
      workaround when testing from long directory paths.
      
      As a convenient side effect, this lets testing proceed smoothly in
      builds that override DEFAULT_PGSOCKET_DIR.  Popular non-default values
      like /var/run/postgresql are often unwritable to the build user.
      
      Security: CVE-2014-0067
      31c6e54e
    • Noah Misch's avatar
      Document platform-specificity of unix_socket_permissions. · fbd32b0c
      Noah Misch authored
      Back-patch to 8.4 (all supported versions).
      fbd32b0c
    • Noah Misch's avatar
  6. 28 Mar, 2014 4 commits
    • Tom Lane's avatar
      Improve regression test for pg_filenode_relation(). · 9613a1d9
      Tom Lane authored
      Make it print the details in case there's a failure.
      
      Andres Freund, slightly modified by me
      9613a1d9
    • Bruce Momjian's avatar
      Adjust getpwuid() fix commit to display errno string on failure · e1827012
      Bruce Momjian authored
      This adjusts patch 613c6d26.
      e1827012
    • Tom Lane's avatar
      Fix EquivalenceClass processing for nested append relations. · a87c7291
      Tom Lane authored
      The original coding of EquivalenceClasses didn't foresee that appendrel
      child relations might themselves be appendrels; but this is possible for
      example when a UNION ALL subquery scans a table with inheritance children.
      The oversight led to failure to optimize ordering-related issues very well
      for the grandchild tables.  After some false starts involving explicitly
      flattening the appendrel representation, we found that this could be fixed
      easily by removing a few implicit assumptions about appendrel parent rels
      not being children themselves.
      
      Kyotaro Horiguchi and Tom Lane, reviewed by Noah Misch
      a87c7291
    • Tom Lane's avatar
      Un-break peer authentication. · b777be0d
      Tom Lane authored
      Commit 613c6d26 sloppily replaced a
      lookup of the UID obtained from getpeereid() with a lookup of the
      server's own user name, thus totally destroying peer authentication.
      Revert.  Per report from Christoph Berg.
      
      In passing, make sure get_user_name() zeroes *errstr on success on
      Windows as well as non-Windows.  I don't think any callers actually
      depend on this ATM, but we should be consistent across platforms.
      b777be0d
  7. 27 Mar, 2014 4 commits
  8. 26 Mar, 2014 10 commits
  9. 25 Mar, 2014 2 commits