Skip to content
Snippets Groups Projects
  1. Feb 07, 2016
    • Tom Lane's avatar
      Improve documentation about PRIMARY KEY constraints. · ddcc256c
      Tom Lane authored
      Get rid of the false implication that PRIMARY KEY is exactly equivalent to
      UNIQUE + NOT NULL.  That was more-or-less true at one time in our
      implementation, but the standard doesn't say that, and we've grown various
      features (many of them required by spec) that treat a pkey differently from
      less-formal constraints.  Per recent discussion on pgsql-general.
      
      I failed to resist the temptation to do some other wordsmithing in the
      same area.
      ddcc256c
    • Tom Lane's avatar
      3d6c9888
  2. Jan 31, 2016
  3. Jan 02, 2016
  4. Dec 28, 2015
    • Tom Lane's avatar
      Document the exponentiation operator as associating left to right. · 7adbde26
      Tom Lane authored
      Common mathematical convention is that exponentiation associates right to
      left.  We aren't going to change the parser for this, but we could note
      it in the operator's description.  (It's already noted in the operator
      precedence/associativity table, but users might not look there.)
      Per bug #13829 from Henrik Pauli.
      7adbde26
  5. Dec 14, 2015
    • Tom Lane's avatar
      Docs: document that psql's "\i -" means read from stdin. · 6436445e
      Tom Lane authored
      This has worked that way for a long time, maybe always, but you would
      not have known it from the documentation.  Also back-patch the notes
      I added to HEAD earlier today about behavior of the "-f -" switch,
      which likewise have been valid for many releases.
      6436445e
  6. Dec 13, 2015
  7. Dec 04, 2015
    • Tom Lane's avatar
      Further improve documentation of the role-dropping process. · 255cc9b2
      Tom Lane authored
      In commit 1ea0c73c I added a section to user-manag.sgml about how to drop
      roles that own objects; but as pointed out by Stephen Frost, I neglected
      that shared objects (databases or tablespaces) may need special treatment.
      Fix that.  Back-patch to supported versions, like the previous patch.
      255cc9b2
  8. Nov 22, 2015
    • Tom Lane's avatar
      Adopt the GNU convention for handling tar-archive members exceeding 8GB. · b054ca03
      Tom Lane authored
      The POSIX standard for tar headers requires archive member sizes to be
      printed in octal with at most 11 digits, limiting the representable file
      size to 8GB.  However, GNU tar and apparently most other modern tars
      support a convention in which oversized values can be stored in base-256,
      allowing any practical file to be a tar member.  Adopt this convention
      to remove two limitations:
      * pg_dump with -Ft output format failed if the contents of any one table
      exceeded 8GB.
      * pg_basebackup failed if the data directory contained any file exceeding
      8GB.  (This would be a fatal problem for installations configured with a
      table segment size of 8GB or more, and it has also been seen to fail when
      large core dump files exist in the data directory.)
      
      File sizes under 8GB are still printed in octal, so that no compatibility
      issues are created except in cases that would have failed entirely before.
      
      In addition, this patch fixes several bugs in the same area:
      
      * In 9.3 and later, we'd defined tarCreateHeader's file-size argument as
      size_t, which meant that on 32-bit machines it would write a corrupt tar
      header for file sizes between 4GB and 8GB, even though no error was raised.
      This broke both "pg_dump -Ft" and pg_basebackup for such cases.
      
      * pg_restore from a tar archive would fail on tables of size between 4GB
      and 8GB, on machines where either "size_t" or "unsigned long" is 32 bits.
      This happened even with an archive file not affected by the previous bug.
      
      * pg_basebackup would fail if there were files of size between 4GB and 8GB,
      even on 64-bit machines.
      
      * In 9.3 and later, "pg_basebackup -Ft" failed entirely, for any file size,
      on 64-bit big-endian machines.
      
      In view of these potential data-loss bugs, back-patch to all supported
      branches, even though removal of the documented 8GB limit might otherwise
      be considered a new feature rather than a bug fix.
      b054ca03
  9. Nov 10, 2015
    • Tom Lane's avatar
      Improve our workaround for 'TeX capacity exceeded' in building PDF files. · e12a99c8
      Tom Lane authored
      In commit a5ec86a7 I wrote a quick hack
      that reduced the number of TeX string pool entries created while converting
      our documentation to PDF form.  That held the fort for awhile, but as of
      HEAD we're back up against the same limitation.  It turns out that the
      original coding of \FlowObjectSetup actually results in *three* string pool
      entries being generated for every "flow object" (that is, potential
      cross-reference target) in the documentation, and my previous hack only got
      rid of one of them.  With a little more care, we can reduce the string
      count to one per flow object plus one per actually-cross-referenced flow
      object (about 115000 + 5000 as of current HEAD); that should work until
      the documentation volume roughly doubles from where it is today.
      
      As a not-incidental side benefit, this change also causes pdfjadetex to
      stop emitting unreferenced hyperlink anchors (bookmarks) into the PDF file.
      It had been making one willy-nilly for every flow object; now it's just one
      per actually-cross-referenced object.  This results in close to a 2X
      savings in PDF file size.  We will still want to run the output through
      "jpdftweak" to get it to be compressed; but we no longer need removal of
      unreferenced bookmarks, so we might be able to find a quicker tool for
      that step.
      
      Although the failure only affects HEAD and US-format output at the moment,
      9.5 cannot be more than a few pages short of failing likewise, so it
      will inevitably fail after a few rounds of minor-version release notes.
      I don't have a lot of faith that we'll never hit the limit in the older
      branches; and anyway it would be nice to get rid of jpdftweak across the
      board.  Therefore, back-patch to all supported branches.
      e12a99c8
  10. Oct 07, 2015
    • Tom Lane's avatar
      Improve documentation of the role-dropping process. · 53951058
      Tom Lane authored
      In general one may have to run both REASSIGN OWNED and DROP OWNED to get
      rid of all the dependencies of a role to be dropped.  This was alluded to
      in the REASSIGN OWNED man page, but not really spelled out in full; and in
      any case the procedure ought to be documented in a more prominent place
      than that.  Add a section to the "Database Roles" chapter explaining this,
      and do a bit of wordsmithing in the relevant commands' man pages.
      53951058
  11. Oct 05, 2015
  12. Oct 02, 2015
    • Tom Lane's avatar
      Docs: add disclaimer about hazards of using regexps from untrusted sources. · 52511fd6
      Tom Lane authored
      It's not terribly hard to devise regular expressions that take large
      amounts of time and/or memory to process.  Recent testing by Greg Stark has
      also shown that machines with small stack limits can be driven to stack
      overflow by suitably crafted regexps.  While we intend to fix these things
      as much as possible, it's probably impossible to eliminate slow-execution
      cases altogether.  In any case we don't want to treat such things as
      security issues.  The history of that code should already discourage
      prudent DBAs from allowing execution of regexp patterns coming from
      possibly-hostile sources, but it seems like a good idea to warn about the
      hazard explicitly.
      
      Currently, similar_escape() allows access to enough of the underlying
      regexp behavior that the warning has to apply to SIMILAR TO as well.
      We might be able to make it safer if we tightened things up to allow only
      SQL-mandated capabilities in SIMILAR TO; but that would be a subtly
      non-backwards-compatible change, so it requires discussion and probably
      could not be back-patched.
      
      Per discussion among pgsql-security list.
      52511fd6
  13. Sep 22, 2015
  14. Sep 16, 2015
    • Tom Lane's avatar
      Fix documentation of regular expression character-entry escapes. · 11103c6d
      Tom Lane authored
      The docs claimed that \uhhhh would be interpreted as a Unicode value
      regardless of the database encoding, but it's never been implemented
      that way: \uhhhh and \xhhhh actually mean exactly the same thing, namely
      the character that pg_mb2wchar translates to 0xhhhh.  Moreover we were
      falsely dismissive of the usefulness of Unicode code points above FFFF.
      Fix that.
      
      It's been like this for ages, so back-patch to all supported branches.
      11103c6d
  15. Sep 07, 2015
  16. Aug 27, 2015
  17. Aug 26, 2015
    • Tom Lane's avatar
      Docs: be explicit about datatype matching for lead/lag functions. · 8cffc4f5
      Tom Lane authored
      The default argument, if given, has to be of exactly the same datatype
      as the first argument; but this was not stated in so many words, and
      the error message you get about it might not lead your thought in the
      right direction.  Per bug #13587 from Robert McGehee.
      
      A quick scan says that these are the only two built-in functions with two
      anyelement arguments and no other polymorphic arguments.  There are plenty
      of cases of, eg, anyarray and anyelement, but those seem less likely to
      confuse.  For instance this doesn't seem terribly hard to figure out:
      "function array_remove(integer[], numeric) does not exist".  So I've
      contented myself with fixing these two cases.
      8cffc4f5
  18. Aug 15, 2015
    • Tom Lane's avatar
      Improve documentation about MVCC-unsafe utility commands. · ed511659
      Tom Lane authored
      The table-rewriting forms of ALTER TABLE are MVCC-unsafe, in much the same
      way as TRUNCATE, because they replace all rows of the table with newly-made
      rows with a new xmin.  (Ideally, concurrent transactions with old snapshots
      would continue to see the old table contents, but the data is not there
      anymore --- and if it were there, it would be inconsistent with the table's
      updated rowtype, so there would be serious implementation problems to fix.)
      This was nowhere documented though, and the problem was only documented for
      TRUNCATE in a note in the TRUNCATE reference page.  Create a new "Caveats"
      section in the MVCC chapter that can be home to this and other limitations
      on serializable consistency.
      
      In passing, fix a mistaken statement that VACUUM and CLUSTER would reclaim
      space occupied by a dropped column.  They don't reconstruct existing tuples
      so they couldn't do that.
      
      Back-patch to all supported branches.
      ed511659
  19. Aug 05, 2015
  20. Jul 29, 2015
    • Tom Lane's avatar
      Update our documentation concerning where to create data directories. · 263f2259
      Tom Lane authored
      Although initdb has long discouraged use of a filesystem mount-point
      directory as a PG data directory, this point was covered nowhere in the
      user-facing documentation.  Also, with the popularity of pg_upgrade,
      we really need to recommend that the PG user own not only the data
      directory but its parent directory too.  (Without a writable parent
      directory, operations such as "mv data data.old" fail immediately.
      pg_upgrade itself doesn't do that, but wrapper scripts for it often do.)
      
      Hence, adjust the "Creating a Database Cluster" section to address
      these points.  I also took the liberty of wordsmithing the discussion
      of NFS a bit.
      
      These considerations aren't by any means new, so back-patch to all
      supported branches.
      263f2259
  21. Jul 28, 2015
    • Andres Freund's avatar
      Disable ssl renegotiation by default. · 2f91e7bb
      Andres Freund authored
      While postgres' use of SSL renegotiation is a good idea in theory, it
      turned out to not work well in practice. The specification and openssl's
      implementation of it have lead to several security issues. Postgres' use
      of renegotiation also had its share of bugs.
      
      Additionally OpenSSL has a bunch of bugs around renegotiation, reported
      and open for years, that regularly lead to connections breaking with
      obscure error messages. We tried increasingly complex workarounds to get
      around these bugs, but we didn't find anything complete.
      
      Since these connection breakages often lead to hard to debug problems,
      e.g. spuriously failing base backups and significant latency spikes when
      synchronous replication is used, we have decided to change the default
      setting for ssl renegotiation to 0 (disabled) in the released
      backbranches and remove it entirely in 9.5 and master..
      
      Author: Michael Paquier, with changes by me
      Discussion: 20150624144148.GQ4797@alap3.anarazel.de
      Backpatch: 9.0-9.4; 9.5 and master get a different patch
      2f91e7bb
  22. Jul 10, 2015
    • Tom Lane's avatar
      Improve documentation about array concat operator vs. underlying functions. · 349ce287
      Tom Lane authored
      The documentation implied that there was seldom any reason to use the
      array_append, array_prepend, and array_cat functions directly.  But that's
      not really true, because they can help make it clear which case is meant,
      which the || operator can't do since it's overloaded to represent all three
      cases.  Add some discussion and examples illustrating the potentially
      confusing behavior that can ensue if the parser misinterprets what was
      meant.
      
      Per a complaint from Michael Herold.  Back-patch to 9.2, which is where ||
      started to behave this way.
      349ce287
  23. Jul 09, 2015
    • Heikki Linnakangas's avatar
      Fix another broken link in documentation. · 8dc8a31a
      Heikki Linnakangas authored
      Tom fixed another one of these in commit 7f32dbcd, but there was another
      almost identical one in libpq docs. Per his comment:
      
      HP's web server has apparently become case-sensitive sometime recently.
      Per bug #13479 from Daniel Abraham.  Corrected link identified by Alvaro.
      8dc8a31a
  24. Jul 06, 2015
    • Fujii Masao's avatar
      Remove incorrect warning from pg_archivecleanup document. · e27d1f3c
      Fujii Masao authored
      The .backup file name can be passed to pg_archivecleanup even if
      it includes the extension which is specified in -x option.
      However, previously the document incorrectly warned a user
      not to do that.
      
      Back-patch to 9.2 where pg_archivecleanup's -x option and
      the warning were added.
      e27d1f3c
  25. Jul 01, 2015
    • Tom Lane's avatar
      Fix broken link in documentation. · 49946f2b
      Tom Lane authored
      HP's web server has apparently become case-sensitive sometime recently.
      Per bug #13479 from Daniel Abraham.  Corrected link identified by Alvaro.
      49946f2b
  26. Jun 25, 2015
  27. Jun 09, 2015
  28. Jun 01, 2015
  29. May 20, 2015
  30. May 18, 2015
    • Tom Lane's avatar
      Last-minute updates for release notes. · f1946b13
      Tom Lane authored
      Add entries for security issues.
      
      Security: CVE-2015-3165 through CVE-2015-3167
      f1946b13
    • Noah Misch's avatar
      pgcrypto: Report errant decryption as "Wrong key or corrupt data". · 0ba20043
      Noah Misch authored
      This has been the predominant outcome.  When the output of decrypting
      with a wrong key coincidentally resembled an OpenPGP packet header,
      pgcrypto could instead report "Corrupt data", "Not text data" or
      "Unsupported compression algorithm".  The distinct "Corrupt data"
      message added no value.  The latter two error messages misled when the
      decrypted payload also exhibited fundamental integrity problems.  Worse,
      error message variance in other systems has enabled cryptologic attacks;
      see RFC 4880 section "14. Security Considerations".  Whether these
      pgcrypto behaviors are likewise exploitable is unknown.
      
      In passing, document that pgcrypto does not resist side-channel attacks.
      Back-patch to 9.0 (all supported versions).
      
      Security: CVE-2015-3167
      0ba20043
  31. May 17, 2015
  32. May 16, 2015
    • Tom Lane's avatar
      Fix docs typo · 639bf57c
      Tom Lane authored
      I don't think "respectfully" is what was meant here ...
      639bf57c
  33. May 14, 2015
  34. May 09, 2015
    • Stephen Frost's avatar
      Recommend include_realm=1 in docs · 21cb21de
      Stephen Frost authored
      As discussed, the default setting of include_realm=0 can be dangerous in
      multi-realm environments because it is then impossible to differentiate
      users with the same username but who are from two different realms.
      
      Recommend include_realm=1 and note that the default setting may change
      in a future version of PostgreSQL and therefore users may wish to
      explicitly set include_realm to avoid issues while upgrading.
      21cb21de
Loading