Skip to content
Snippets Groups Projects
  1. Aug 29, 2004
  2. Aug 28, 2004
    • Tom Lane's avatar
      Fix relcache to account properly for subtransaction status of 'new' · 1c72d0de
      Tom Lane authored
      relcache entries.  Also, change TransactionIdIsCurrentTransactionId()
      so that if consulted during transaction abort, it will not say that
      the aborted xact is still current.  (It would be better to ensure that
      it's never called at all during abort, but I'm not sure we can easily
      guarantee that.)  In combination, these fix a crash we have seen
      occasionally during parallel regression tests of 8.0.
      1c72d0de
    • Joe Conway's avatar
      Further tightening of the array literal parser. Prevent junk · f900af79
      Joe Conway authored
      from being accepted after the outer right brace. Per report from
      Markus Bertheau.
      
      Also add regression test cases for this change, and for previous
      recent array literal parser changes.
      f900af79
  3. Aug 27, 2004
    • Tom Lane's avatar
      Introduce local hash table for lock state, as per recent proposal. · 1785aceb
      Tom Lane authored
      PROCLOCK structs in shared memory now have only a bitmask for held
      locks, rather than counts (making them 40 bytes smaller, which is a
      good thing).  Multiple locks within a transaction are counted in the
      local hash table instead, and we have provision for tracking which
      ResourceOwner each count belongs to.  Solves recently reported problem
      with memory leakage within long transactions.
      1785aceb
  4. Aug 25, 2004
    • Tom Lane's avatar
      Revise ResourceOwner code to avoid accumulating ResourceOwner objects · fe455ee1
      Tom Lane authored
      for every command executed within a transaction.  For long transactions
      this was a significant memory leak.  Instead, we can delete a portal's
      or subtransaction's ResourceOwner immediately, if we physically transfer
      the information about its locks up to the parent owner.  This does not
      fully solve the leak problem; we need to do something about counting
      multiple acquisitions of the same lock in order to fix it.  But it's a
      necessary step along the way.
      fe455ee1
  5. Aug 22, 2004
    • Tom Lane's avatar
      Tweak code so that pg_subtrans is never consulted for XIDs older than · f009c316
      Tom Lane authored
      RecentXmin (== MyProc->xmin).  This ensures that it will be safe to
      truncate pg_subtrans at RecentGlobalXmin, which should largely eliminate
      any fear of bloat.  Along the way, eliminate SubTransXidsHaveCommonAncestor,
      which isn't really needed and could not give a trustworthy result anyway
      under the lookback restriction.
      In an unrelated but nearby change, #ifdef out GetUndoRecPtr, which has
      been dead code since 2001 and seems unlikely to ever be resurrected.
      f009c316
  6. Aug 20, 2004
    • Bruce Momjian's avatar
      > After all that about numbering centuries and millenia correctly, · 46be0c18
      Bruce Momjian authored
      > why does CVS tip still give me
      >
      > regression=# select extract(century from now());
      >  date_part
      > -----------
      >         20
      > (1 row)
      > [ ... looks in code ... ]
      >
      > Apparently it's because you fixed only timestamp_part, and not
      > timestamptz_part.  I'm not too sure about what timestamp_trunc or
      > timestamptz_trunc should do, but they may be wrong as well.
      
      Sigh... as usual, what is not tested does not work:-(
      
      
      > Could we have a more complete patch?
      
      Please find a submission attached. I hope it really fixes all decade,
      century and millenium issues for extract and *_trunc functions on
      interval
      and other timestamp types. If someone could check that the results
      are reasonnable, it would be great.
      
      I indeed overlooked the fact that there were two functions. The patch
      fixes the code so that both variants agree.
      
      I added comments to interval extractions, because it relies on the C
      division to have a negative remainder: -7/10 = 0 and remains -7.
      
      As for *_trunc functions, I have chosen to put the first year of the
      century or millennium: -100, 1, 101... 1001 2001 etc. Indeed, I don't
      think it would make sense to put 2000 (last year of the 2nd millennium)
      for rounding all years of the third millenium.
      
      I also fixed the code so that all decades last 10 years and decade 199
      means the 1990's.
      
      I have added some tests that are relevant to deal with tricky cases. The
      formula may be simplified, but all these cases must pass. Please keep
      them.
      
      Fabien Coelho
      46be0c18
  7. Aug 19, 2004
    • Tom Lane's avatar
      Repair some issues with column aliases and RowExpr construction in the · bbd6eb5b
      Tom Lane authored
      presence of dropped columns.  Document the already-presumed fact that
      eref aliases in relation RTEs are supposed to have entries for dropped
      columns; cause the user alias structs to have such entries too, so that
      there's always a one-to-one mapping to the underlying physical attnums.
      Adjust expandRTE() and related code to handle the case where a column
      that is part of a JOIN has been dropped.  Generalize expandRTE()'s API
      so that it can be used in a couple of places that formerly rolled their
      own implementation of the same logic.  Fix ruleutils.c to suppress
      display of aliases for columns that were dropped since the rule was made.
      bbd6eb5b
  8. Aug 17, 2004
    • Tom Lane's avatar
      Standardize on the assumption that the arguments of a RowExpr correspond · fcaad7e2
      Tom Lane authored
      to the physical layout of the rowtype, ie, there are dummy arguments
      corresponding to any dropped columns in the rowtype.  We formerly had a
      couple of places that did it this way and several others that did not.
      Fixes Gaetano Mendola's "cache lookup failed for type 0" bug of 5-Aug.
      fcaad7e2
  9. Aug 16, 2004
  10. Aug 13, 2004
  11. Aug 12, 2004
  12. Aug 11, 2004
  13. Aug 08, 2004
  14. Aug 07, 2004
  15. Aug 06, 2004
  16. Aug 05, 2004
    • Joe Conway's avatar
      Require that array literals produce "rectangular" arrays, i.e. all the · 0e13d627
      Joe Conway authored
      subarrays of a given dimension have the same number of elements/subarrays.
      
      Also repair a longstanding undocumented (as far as I can see) ability to
      explicitly set array bounds in the array literal syntax. It now can
      deal properly with negative array indicies. Modify array_out so that
      arrays with non-standard lower bounds (i.e. not 1) are output with
      the expicit dimension syntax. This fixes a longstanding issue whereby
      arrays with non-default lower bounds had them changed to default
      after a dump/reload cycle.
      
      Modify regression tests and docs to suit, and add some minimal
      documentation regarding the explicit dimension syntax.
      0e13d627
  17. Aug 04, 2004
  18. Aug 03, 2004
    • Tom Lane's avatar
      Add functions pg_start_backup, pg_stop_backup to create backup label · 58c41712
      Tom Lane authored
      and history files as per recent discussion.  While at it, remove
      pg_terminate_backend, since we have decided we do not have time during
      this release cycle to address the reliability concerns it creates.
      Split the 'Miscellaneous Functions' documentation section into
      'System Information Functions' and 'System Administration Functions',
      which hopefully will draw the eyes of those looking for such things.
      58c41712
  19. Aug 02, 2004
  20. Aug 01, 2004
    • Tom Lane's avatar
      Cause ALTER OWNER commands to update the object's ACL, replacing references · d6f8a76c
      Tom Lane authored
      to the old owner with the new owner.  This is not necessarily right, but
      it's sure a lot more likely to be what the user wants than doing nothing.
      Christopher Kings-Lynne, some rework by Tom Lane.
      d6f8a76c
    • Tom Lane's avatar
      Some mop-up work for savepoints (nested transactions). Store a small · efcaf1e8
      Tom Lane authored
      number of active subtransaction XIDs in each backend's PGPROC entry,
      and use this to avoid expensive probes into pg_subtrans during
      TransactionIdIsInProgress.  Extend EOXactCallback API to allow add-on
      modules to get control at subxact start/end.  (This is deliberately
      not compatible with the former API, since any uses of that API probably
      need manual review anyway.)  Add basic reference documentation for
      SAVEPOINT and related commands.  Minor other cleanups to check off some
      of the open issues for subtransactions.
      Alvaro Herrera and Tom Lane.
      efcaf1e8
  21. Jul 31, 2004
  22. Jul 29, 2004
  23. Jul 28, 2004
    • Tom Lane's avatar
      Fix subtransaction behavior for large objects, temp namespace, files, · 1bf3d615
      Tom Lane authored
      password/group files.  Also allow read-only subtransactions of a read-write
      parent, but not vice versa.  These are the reasonably noncontroversial
      parts of Alvaro's recent mop-up patch, plus further work on large objects
      to minimize use of the TopTransactionResourceOwner.
      1bf3d615
  24. Jul 24, 2004
  25. Jul 21, 2004
Loading