Skip to content
Snippets Groups Projects
  1. Jul 19, 2007
  2. Jul 18, 2007
  3. Jul 17, 2007
    • Tom Lane's avatar
      Fix incorrect optimization of foreign-key checks. When an UPDATE on the · 2c535bfe
      Tom Lane authored
      referencing table does not change the tuple's FK column(s), we don't bother
      to check the PK table since the constraint was presumably already valid.
      However, the check is still necessary if the tuple was inserted by our own
      transaction, since in that case the INSERT trigger will conclude it need not
      make the check (since its version of the tuple has been deleted).  We got this
      right for simple cases, but not when the insert and update are in different
      subtransactions of the current top-level transaction; in such cases the FK
      check would never be made at all.  (Hence, problem dates back to 8.0 when
      subtransactions were added --- it's actually the subtransaction version of a
      bug fixed in 7.3.5.)  Fix, and add regression test cases.  Report and fix by
      Affan Salman.
      2c535bfe
    • Neil Conway's avatar
      Implement CREATE TABLE LIKE ... INCLUDING INDEXES. Patch from NikhilS, · 47477491
      Neil Conway authored
      based in part on an earlier patch from Trevor Hardcastle, and reviewed
      by myself.
      47477491
    • Tom Lane's avatar
      Fix outfuncs.c to dump A_Const nodes representing NULLs correctly. This has · 804f016f
      Tom Lane authored
      been broken since forever, but was not noticed because people seldom look
      at raw parse trees.  AFAIK, no impact on users except that debug_print_parse
      might fail; but patch it all the way back anyway.  Per report from Jeff Ross.
      804f016f
  4. Jul 16, 2007
  5. Jul 13, 2007
  6. Jul 12, 2007
  7. Jul 11, 2007
  8. Jul 10, 2007
  9. Jul 09, 2007
    • Tom Lane's avatar
      Fix stddev_pop(numeric) and var_pop(numeric), which were incorrectly producing · 6244c2df
      Tom Lane authored
      the same outputs as stddev_samp() and var_samp() respectively.
      6244c2df
    • Tom Lane's avatar
      Fix single-user mode so that interrupts (particularly SIGTERM and · 9e09e3b1
      Tom Lane authored
      SIGQUIT) will be recognized and processed while waiting for input,
      rather than only after something has been typed.  Also make SIGQUIT
      do the same thing as SIGTERM in single-user mode, ie, do a normal
      shutdown and exit.  Since it's relatively easy to provoke SIGQUIT
      from the keyboard, people may try that instead of control-D, and we'd
      rather this leads to orderly shutdown.  Per report from Leon Mergen
      and subsequent discussion.
      9e09e3b1
    • Tom Lane's avatar
      Remove the pgstat_drop_relation() call from smgr_internal_unlink(), because · b09cb0cf
      Tom Lane authored
      we don't know at that point which relation OID to tell pgstat to forget.
      The code was passing the relfilenode, which is incorrect, and could possibly
      cause some other relation's stats to be zeroed out.  While we could try to
      clean this up, it seems much simpler and more reliable to let the next
      invocation of pgstat_vacuum_tabstat() fix things; which indeed is how it
      worked before I introduced the buggy code into 8.1.3 and later :-(.
      Problem noticed by Itagaki Takahiro, fix is per subsequent discussion.
      b09cb0cf
  10. Jul 07, 2007
    • Tom Lane's avatar
      Fix a couple of planner bugs introduced by the new ability to discard · 48d9d8e1
      Tom Lane authored
      ORDER BY <constant> as redundant.  One is that this means query_planner()
      has to canonicalize pathkeys even when the query jointree is empty;
      the canonicalization was always a no-op in such cases before, but no more.
      Also, we have to guard against thinking that a set-returning function is
      "constant" for this purpose.  Add a couple of regression tests for these
      evidently under-tested cases.  Per report from Greg Stark and subsequent
      experimentation.
      48d9d8e1
  11. Jul 06, 2007
  12. Jul 03, 2007
  13. Jul 02, 2007
    • Tom Lane's avatar
      Fix failure to restart Postgres when Linux kernel returns EIDRM for shmctl(). · 1c7fe33f
      Tom Lane authored
      This is a Linux kernel bug that apparently exists in every extant kernel
      version: sometimes shmctl() will fail with EIDRM when EINVAL is correct.
      We were assuming that EIDRM indicates a possible conflict with pre-existing
      backends, and refusing to start the postmaster when this happens.  Fortunately,
      there does not seem to be any case where Linux can legitimately return EIDRM
      (it doesn't track shmem segments in a way that would allow that), so we can
      get away with just assuming that EIDRM means EINVAL on this platform.
      
      Per reports from Michael Fuhr and Jon Lapham --- it's a bit surprising
      we have not seen more reports, actually.
      1c7fe33f
  14. Jul 01, 2007
  15. Jun 30, 2007
  16. Jun 29, 2007
    • Alvaro Herrera's avatar
      Arrange for SIGINT in autovacuum workers to cancel the current table and · 10af02b9
      Alvaro Herrera authored
      continue with the schedule.  Change current uses of SIGINT to abort a worker
      into SIGTERM, which keeps the old behaviour of terminating the process.
      
      Patch from ITAGAKI Takahiro, with some editorializing of my own.
      10af02b9
    • Tom Lane's avatar
      Fix a passel of ancient bugs in to_char(), including two distinct buffer · 6faf7956
      Tom Lane authored
      overruns (neither of which seem likely to be exploitable as security holes,
      fortunately, since the provoker can't control the data written).  One of
      these is due to choosing to stomp on the output of a called function, which
      is bad news in any case; make it treat the called functions' results as
      read-only.  Avoid some unnecessary palloc/pfree traffic too; it's not
      really helpful to free small temporary objects, and again this is presuming
      more than it ought to about the nature of the results of called functions.
      Per report from Patrick Welche and additional code-reading by Imad.
      6faf7956
  17. Jun 28, 2007
    • Tom Lane's avatar
      Implement "distributed" checkpoints in which the checkpoint I/O is spread · 867e2c91
      Tom Lane authored
      over a fairly long period of time, rather than being spat out in a burst.
      This happens only for background checkpoints carried out by the bgwriter;
      other cases, such as a shutdown checkpoint, are still done at full speed.
      
      Remove the "all buffers" scan in the bgwriter, and associated stats
      infrastructure, since this seems no longer very useful when the checkpoint
      itself is properly throttled.
      
      Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas,
      and some minor API editorialization by me.
      867e2c91
  18. Jun 26, 2007
  19. Jun 25, 2007
Loading