Skip to content
Snippets Groups Projects
  1. Mar 17, 2008
  2. Mar 12, 2008
    • Tom Lane's avatar
      Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by postponing · 033eb158
      Tom Lane authored
      pg_listener modifications commanded by LISTEN and UNLISTEN until the end
      of the current transaction.  This allows us to hold the ExclusiveLock on
      pg_listener until after commit, with no greater risk of deadlock than there
      was before.  Aside from fixing the race condition, this gets rid of a
      truly ugly kludge that was there before, namely having to ignore
      HeapTupleBeingUpdated failures during NOTIFY.  There is a small potential
      incompatibility, which is that if a transaction issues LISTEN or UNLISTEN
      and then looks into pg_listener before committing, it won't see any resulting
      row insertion or deletion, where before it would have.  It seems unlikely
      that anyone would be depending on that, though.
      
      This patch also disallows LISTEN and UNLISTEN inside a prepared transaction.
      That case had some pretty undesirable properties already, such as possibly
      allowing pg_listener entries to be made for PIDs no longer present, so
      disallowing it seems like a better idea than trying to maintain the behavior.
      033eb158
  3. Mar 10, 2008
  4. Mar 03, 2008
  5. Feb 18, 2008
  6. Feb 15, 2008
  7. Feb 03, 2008
  8. Jan 16, 2008
  9. Jan 03, 2008
    • Tom Lane's avatar
      Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, · eedb068c
      Tom Lane authored
      and CLUSTER) execute as the table owner rather than the calling user, using
      the same privilege-switching mechanism already used for SECURITY DEFINER
      functions.  The purpose of this change is to ensure that user-defined
      functions used in index definitions cannot acquire the privileges of a
      superuser account that is performing routine maintenance.  While a function
      used in an index is supposed to be IMMUTABLE and thus not able to do anything
      very interesting, there are several easy ways around that restriction; and
      even if we could plug them all, there would remain a risk of reading sensitive
      information and broadcasting it through a covert channel such as CPU usage.
      
      To prevent bypassing this security measure, execution of SET SESSION
      AUTHORIZATION and SET ROLE is now forbidden within a SECURITY DEFINER context.
      
      Thanks to Itagaki Takahiro for reporting this vulnerability.
      
      Security: CVE-2007-6600
      eedb068c
  10. Dec 11, 2007
  11. Dec 04, 2007
  12. Nov 28, 2007
  13. Nov 26, 2007
  14. Nov 18, 2007
  15. Nov 10, 2007
  16. Nov 07, 2007
  17. Oct 30, 2007
  18. Oct 29, 2007
  19. Oct 25, 2007
  20. Oct 17, 2007
  21. Oct 10, 2007
  22. Oct 07, 2007
  23. Oct 03, 2007
  24. Sep 29, 2007
    • Tom Lane's avatar
      Change initdb and CREATE DATABASE to actively reject attempts to create · 70b9b9b7
      Tom Lane authored
      databases with encodings that are incompatible with the server's LC_CTYPE
      locale, when we can determine that (which we can on most modern platforms,
      I believe).  C/POSIX locale is compatible with all encodings, of course,
      so there is still some usefulness to CREATE DATABASE's ENCODING option,
      but this will insulate us against all sorts of recurring complaints
      caused by mismatched settings.
      
      I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
      a new src/port/ file so it could be shared by CREATE DATABASE.
      70b9b9b7
  25. Sep 27, 2007
    • Tom Lane's avatar
      Minor improvements in backup and recovery: · f18dfc48
      Tom Lane authored
      - create a separate archive_mode GUC, on which archive_command is dependent
      
      - %r option in recovery.conf sends last restartpoint to recovery command
      
      - %r used in pg_standby, updated README
      
      - minor other code cleanup in pg_standby
      
      - doc on Warm Standby now mentions pg_standby and %r
      
      - log_restartpoints recovery option emits LOG message at each restartpoint
      
      - end of recovery now displays last transaction end time, as requested
        by Warren Little; also shown at each restartpoint
      
      - restart archiver if needed to carry away WAL files at shutdown
      
      Simon Riggs
      f18dfc48
  26. Sep 24, 2007
  27. Sep 20, 2007
    • Tom Lane's avatar
      HOT updates. When we update a tuple without changing any of its indexed · 282d2a03
      Tom Lane authored
      columns, and the new version can be stored on the same heap page, we no longer
      generate extra index entries for the new version.  Instead, index searches
      follow the HOT-chain links to ensure they find the correct tuple version.
      
      In addition, this patch introduces the ability to "prune" dead tuples on a
      per-page basis, without having to do a complete VACUUM pass to recover space.
      VACUUM is still needed to clean up dead index entries, however.
      
      Pavan Deolasee, with help from a bunch of other people.
      282d2a03
  28. Sep 14, 2007
  29. Sep 11, 2007
    • Tom Lane's avatar
      Arrange for SET LOCAL's effects to persist until the end of the current top · 82a47982
      Tom Lane authored
      transaction, unless rolled back or overridden by a SET clause for the same
      variable attached to a surrounding function call.  Per discussion, these
      seem the best semantics.  Note that this is an INCOMPATIBLE CHANGE: in 8.0
      through 8.2, SET LOCAL's effects disappeared at subtransaction commit
      (leading to behavior that made little sense at the SQL level).
      
      I took advantage of the opportunity to rewrite and simplify the GUC variable
      save/restore logic a little bit.  The old idea of a "tentative" value is gone;
      it was a hangover from before we had a stack.  Also, we no longer need a stack
      entry for every nesting level, but only for those in which a variable's value
      actually changed.
      82a47982
  30. Sep 07, 2007
  31. Sep 03, 2007
  32. Aug 22, 2007
Loading