1. 18 11月, 2005 1 次提交
    • T
      DropRelFileNodeBuffers failed to fix the state of the lookup hash table · c859308a
      Tom Lane 提交于
      that was added to localbuf.c in 8.1; therefore, applying it to a temp table
      left corrupt lookup state in memory.  The only case where this had a
      significant chance of causing problems was an ON COMMIT DELETE ROWS temp
      table; the other possible paths left bogus state that was unlikely to
      be used again.  Per report from Csaba Nagy.
      c859308a
  2. 05 11月, 2005 1 次提交
    • T
      Repair an error introduced by log_line_prefix patch: it is not acceptable · 48052de7
      Tom Lane 提交于
      to assume that the string pointer passed to set_ps_display is good forever.
      There's no need to anyway since ps_status.c itself saves the string, and
      we already had an API (get_ps_display) to return it.
      I believe this explains Jim Nasby's report of intermittent crashes in
      elog.c when %i format code is in use in log_line_prefix.
      While at it, repair a previously unnoticed problem: on some platforms such as
      Darwin, the string returned by get_ps_display was blank-padded to the maximum
      length, meaning that lock.c's attempt to append " waiting" to it never worked.
      48052de7
  3. 29 10月, 2005 1 次提交
  4. 28 10月, 2005 1 次提交
    • T
      Tweak buffer manager so that 'internal' accesses to a buffer do not · fbbe0024
      Tom Lane 提交于
      advance its usage_count.  This includes writes of dirty buffers triggered
      by bgwriter, checkpoint, or FlushRelationBuffers, as well as various
      corner cases that really ought not count as accesses to the page.
      Should make for some marginal improvement in the quality of our decisions
      about when to recycle buffers.  Per suggestion from ITAGAKI Takahiro.
      fbbe0024
  5. 15 10月, 2005 1 次提交
  6. 13 10月, 2005 3 次提交
  7. 12 10月, 2005 1 次提交
  8. 08 10月, 2005 2 次提交
  9. 23 9月, 2005 1 次提交
  10. 20 9月, 2005 1 次提交
  11. 16 9月, 2005 1 次提交
  12. 26 8月, 2005 2 次提交
  13. 21 8月, 2005 1 次提交
    • T
      Convert the arithmetic for shared memory size calculation from 'int' · 0007490e
      Tom Lane 提交于
      to 'Size' (that is, size_t), and install overflow detection checks in it.
      This allows us to remove the former arbitrary restrictions on NBuffers
      etc.  It won't make any difference in a 32-bit machine, but in a 64-bit
      machine you could theoretically have terabytes of shared buffers.
      (How efficiently we could manage 'em remains to be seen.)  Similarly,
      num_temp_buffers, work_mem, and maintenance_work_mem can be set above
      2Gb on a 64-bit machine.  Original patch from Koichi Suzuki, additional
      work by moi.
      0007490e
  14. 20 8月, 2005 1 次提交
  15. 17 8月, 2005 1 次提交
  16. 13 8月, 2005 2 次提交
  17. 12 8月, 2005 2 次提交
    • T
      Remove BufferBlockPointers array in favor of a base + (bufnum) * BLCKSZ · 3ae7e4a3
      Tom Lane 提交于
      computation.  On modern machines this is as fast if not faster, and we
      don't have to clog the CPU's L2 cache with a tens-of-KB pointer array.
      If we ever decide to adopt a more dynamic allocation method for shared
      buffers, we'll probably have to revert this patch, but in the meantime
      we might as well save a few bytes and nanoseconds.  Per Qingqing Zhou.
      3ae7e4a3
    • T
      Solve the problem of OID collisions by probing for duplicate OIDs · 721e5378
      Tom Lane 提交于
      whenever we generate a new OID.  This prevents occasional duplicate-OID
      errors that can otherwise occur once the OID counter has wrapped around.
      Duplicate relfilenode values are also checked for when creating new
      physical files.  Per my recent proposal.
      721e5378
  18. 09 8月, 2005 1 次提交
  19. 08 8月, 2005 2 次提交
  20. 03 8月, 2005 1 次提交
  21. 02 8月, 2005 1 次提交
  22. 01 8月, 2005 1 次提交
  23. 30 7月, 2005 1 次提交
  24. 04 7月, 2005 1 次提交
    • T
      Arrange for the postmaster (and standalone backends, initdb, etc) to · eb5949d1
      Tom Lane 提交于
      chdir into PGDATA and subsequently use relative paths instead of absolute
      paths to access all files under PGDATA.  This seems to give a small
      performance improvement, and it should make the system more robust
      against naive DBAs doing things like moving a database directory that
      has a live postmaster in it.  Per recent discussion.
      eb5949d1
  25. 21 6月, 2005 1 次提交
  26. 20 6月, 2005 1 次提交
    • T
      Simplify uses of readdir() by creating a function ReadDir() that · 3f749924
      Tom Lane 提交于
      includes error checking and an appropriate ereport(ERROR) message.
      This gets rid of rather tedious and error-prone manipulation of errno,
      as well as a Windows-specific bug workaround, at more than a dozen
      call sites.  After an idea in a recent patch by Heikki Linnakangas.
      3f749924
  27. 18 6月, 2005 1 次提交
  28. 15 6月, 2005 1 次提交
    • T
      Simplify shared-memory lock data structures as per recent discussion: · 8563ccae
      Tom Lane 提交于
      it is sufficient to track whether a backend holds a lock or not, and
      store information about transaction vs. session locks only in the
      inside-the-backend LocalLockTable.  Since there can now be but one
      PROCLOCK per lock per backend, LockCountMyLocks() is no longer needed,
      thus eliminating some O(N^2) behavior when a backend holds many locks.
      Also simplify the LockAcquire/LockRelease API by passing just a
      'sessionLock' boolean instead of a transaction ID.  The previous API
      was designed with the idea that per-transaction lock holding would be
      important for subtransactions, but now that we have subtransactions we
      know that this is unwanted.  While at it, add an 'isTempObject' parameter
      to LockAcquire to indicate whether the lock is being taken on a temp
      table.  This is not used just yet, but will be needed shortly for
      two-phase commit.
      8563ccae
  29. 13 6月, 2005 1 次提交
    • T
      Adjust lo_open() so that specifying INV_READ without INV_WRITE creates · a2fb7b8a
      Tom Lane 提交于
      a descriptor that uses the current transaction snapshot, rather than
      SnapshotNow as it did before (and still does if INV_WRITE is set).
      This means pg_dump will now dump a consistent snapshot of large object
      contents, as it never could do before.  Also, add a lo_create() function
      that is similar to lo_creat() but allows the desired OID of the large
      object to be specified.  This will simplify pg_restore considerably
      (but I'll fix that in a separate commit).
      a2fb7b8a
  30. 07 6月, 2005 2 次提交
  31. 02 6月, 2005 1 次提交
    • T
      Change CRCs in WAL records from 64bit to 32bit for performance reasons. · 21fda22e
      Tom Lane 提交于
      Instead of a separate CRC on each backup block, include backup blocks
      in their parent WAL record's CRC; this is important to ensure that the
      backup block really goes with the WAL record, ie there was not a page
      tear right at the start of the backup block.  Implement a simple form
      of compression of backup blocks: drop any run of zeroes starting at
      pd_lower, so as not to store the unused 'hole' that commonly exists in
      PG heap and index pages.  Tweak PageRepairFragmentation and related
      routines to ensure they keep the unused space zeroed, so that the above
      compression method remains effective.  All per recent discussions.
      21fda22e
  32. 30 5月, 2005 1 次提交
    • T
      Improve LockAcquire API per my recent proposal. All error conditions · 140b078d
      Tom Lane 提交于
      are now reported via elog, eliminating the need to test the result code
      at most call sites.  Make it possible for the caller to distinguish a
      freshly acquired lock from one already held in the current transaction.
      Use that capability to avoid redundant AcceptInvalidationMessages() calls
      in LockRelation().
      140b078d