1. 18 8月, 2011 9 次提交
  2. 17 8月, 2011 12 次提交
    • A
      Properly handle empty arrays returned from plperl functions. · 68c903a6
      Andrew Dunstan 提交于
      Bug reported by David Wheeler, fix by Alex Hunsaker.
      68c903a6
    • P
      Translation updates · 1bf80041
      Peter Eisentraut 提交于
      1bf80041
    • H
      a1a847d3
    • H
      Fix comment about which version had BACKUP METHOD line in backup_lable, again. · 1d0392b2
      Heikki Linnakangas 提交于
      It was invalidated again by Fujii's patch to 9.1.
      1d0392b2
    • M
      Adjust wording now that estimated size can increase · e5cb7563
      Magnus Hagander 提交于
      Per comment form Fujii Masao.
      e5cb7563
    • P
      Move \r out of translatable strings · 7f699804
      Peter Eisentraut 提交于
      The translation tools are very unhappy about seeing \r in translatable
      strings, so move it to a separate fprintf call.
      7f699804
    • P
      MacOS -> Mac OS · 13684090
      Peter Eisentraut 提交于
      Josh Kupershmidt
      13684090
    • T
      Revise sinval code to remove no-longer-used tuple TID from inval messages. · b5282aa8
      Tom Lane 提交于
      This requires adjusting the API for syscache callback functions: they now
      get a hash value, not a TID, to identify the target tuple.  Most of them
      weren't paying any attention to that argument anyway, but plancache did
      require a small amount of fixing.
      
      Also, improve performance a trifle by avoiding sending duplicate inval
      messages when a heap_update isn't changing the catcache lookup columns.
      b5282aa8
    • T
      Forget about targeting catalog cache invalidations by tuple TID. · 632ae682
      Tom Lane 提交于
      The TID isn't stable enough: we might queue an sinval event before a VACUUM
      FULL, and then process it afterwards, when the target tuple no longer has
      the same TID.  So we must invalidate entries on the basis of hash value
      only.  The old coding can be shown to result in various bizarre,
      hard-to-reproduce errors in the presence of concurrent VACUUM FULLs on
      system catalogs, and could easily result in permanent catalog corruption,
      up to and including complete loss of tables.
      
      This commit is just a minimal fix that removes the unsafe comparison.
      We should remove transmission of the tuple TID from sinval messages
      altogether, and then arrange to suppress the extra message in the common
      case of a heap_update that doesn't change the key hashvalue.  But that's
      going to be much more invasive, and will only produce a probably-marginal
      performance gain, so it doesn't seem like material for a back-patch.
      
      Back-patch to 9.0.  Before that, VACUUM FULL refused to do any tuple moving
      if it found any INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples (and
      CLUSTER would give up altogether), so there was no risk of moving a tuple
      that might be the subject of an unsent sinval message.
      632ae682
    • T
      Fix incorrect order of operations during sinval reset processing. · f4d7f1ad
      Tom Lane 提交于
      We have to be sure that we have revalidated each nailed-in-cache relcache
      entry before we try to use it to load data for some other relcache entry.
      The introduction of "mapped relations" in 9.0 broke this, because although
      we updated the state kept in relmapper.c early enough, we failed to
      propagate that information into relcache entries soon enough; in
      particular, we could try to fetch pg_class rows out of pg_class before
      we'd updated its relcache entry's rd_node.relNode value from the map.
      
      This bug accounts for Dave Gould's report of failures after "vacuum full
      pg_class", and I believe that there is risk for other system catalogs
      as well.
      
      The core part of the fix is to copy relmapper data into the relcache
      entries during "phase 1" in RelationCacheInvalidate(), before they'll be
      used in "phase 2".  To try to future-proof the code against other similar
      bugs, I also rearranged the order in which nailed relations are visited
      during phase 2: now it's pg_class first, then pg_class_oid_index, then
      other nailed relations.  This should ensure that RelationClearRelation can
      apply RelationReloadIndexInfo to all nailed indexes without risking use
      of not-yet-revalidated relcache entries.
      
      Back-patch to 9.0 where the relation mapper was introduced.
      f4d7f1ad
    • T
      Preserve toast value OIDs in toast-swap-by-content for CLUSTER/VACUUM FULL. · 7b0d0e93
      Tom Lane 提交于
      This works around the problem that a catalog cache entry might contain a
      toast pointer that we try to dereference just as a VACUUM FULL completes
      on that catalog.  We will see the sinval message on the cache entry when
      we acquire lock on the toast table, but by that point we've already told
      tuptoaster.c "here's the pointer to fetch", so it's difficult from a code
      structural standpoint to update the pointer before we use it.  Much less
      painful to ensure that toast pointers are not invalidated in the first
      place.  We have to add a bit of code to deal with the case that a value
      that previously wasn't toasted becomes so; but that should be a
      seldom-exercised corner case, so the inefficiency shouldn't be significant.
      
      Back-patch to 9.0.  In prior versions, we didn't allow CLUSTER on system
      catalogs, and VACUUM FULL didn't result in reassignment of toast OIDs, so
      there was no problem.
      7b0d0e93
    • T
      Fix race condition in relcache init file invalidation. · 2ada6779
      Tom Lane 提交于
      The previous code tried to synchronize by unlinking the init file twice,
      but that doesn't actually work: it leaves a window wherein a third process
      could read the already-stale init file but miss the SI messages that would
      tell it the data is stale.  The result would be bizarre failures in catalog
      accesses, typically "could not read block 0 in file ..." later during
      startup.
      
      Instead, hold RelCacheInitLock across both the unlink and the sending of
      the SI messages.  This is more straightforward, and might even be a bit
      faster since only one unlink call is needed.
      
      This has been wrong since it was put in (in 2002!), so back-patch to all
      supported releases.
      2ada6779
  3. 16 8月, 2011 5 次提交
  4. 15 8月, 2011 4 次提交
    • P
      Adjust regression tests for error message change · 5845f427
      Peter Eisentraut 提交于
      5845f427
    • P
      Add "Reason code" prefix to internal SSI error messages · e5475a80
      Peter Eisentraut 提交于
      This makes it clearer that the error message is perhaps not supposed
      to be understood by users, and it also makes it somewhat clearer that
      it was not accidentally omitted from translation.
      
      Idea from Heikki Linnakangas, except that we don't mark "Reason code"
      for translation at this point, because that would make the
      implementation too cumbersome.
      e5475a80
    • T
      Fix unsafe order of operations in foreign-table DDL commands. · 52994e9e
      Tom Lane 提交于
      When updating or deleting a system catalog tuple, it's necessary to acquire
      RowExclusiveLock on the catalog before looking up the tuple; otherwise a
      concurrent VACUUM FULL on the catalog might move the tuple to a different
      TID before we can apply the update.  Coding patterns that find the tuple
      via a table scan aren't at risk here, but when obtaining the tuple from a
      catalog cache, correct ordering is important; and several routines in
      foreigncmds.c got it wrong.  Noted while running the regression tests in
      parallel with VACUUM FULL of assorted system catalogs.
      
      For consistency I moved all the heap_open calls to the starts of their
      functions, including a couple for which there was no actual bug.
      
      Back-patch to 8.4 where foreigncmds.c was added.
      52994e9e
    • P
      Message style improvements · 85612039
      Peter Eisentraut 提交于
      85612039
  5. 14 8月, 2011 2 次提交
    • P
      Fix typo · 7431cb25
      Peter Eisentraut 提交于
      7431cb25
    • T
      Fix incorrect timeout handling during initial authentication transaction. · 592b615d
      Tom Lane 提交于
      The statement start timestamp was not set before initiating the transaction
      that is used to look up client authentication information in pg_authid.
      In consequence, enable_sig_alarm computed a wrong value (far in the past)
      for statement_fin_time.  That didn't have any immediate effect, because the
      timeout alarm was set without reference to statement_fin_time; but if we
      subsequently blocked on a lock for a short time, CheckStatementTimeout
      would consult the bogus value when we cancelled the lock timeout wait,
      and then conclude we'd timed out, leading to immediate failure of the
      connection attempt.  Thus an innocent "vacuum full pg_authid" would cause
      failures of concurrent connection attempts.  Noted while testing other,
      more serious consequences of vacuum full on system catalogs.
      
      We should set the statement timestamp before StartTransactionCommand(),
      so that the transaction start timestamp is also valid.  I'm not sure if
      there are any non-cosmetic effects of it not being valid, but the xact
      timestamp is at least sent to the statistics machinery.
      
      Back-patch to 9.0.  Before that, the client authentication timeout was done
      outside any transaction and did not depend on this state to be valid.
      592b615d
  6. 13 8月, 2011 1 次提交
  7. 12 8月, 2011 2 次提交
  8. 11 8月, 2011 5 次提交
    • R
      Display both per-table and per-column FDW options in psql's \d output. · d82d8486
      Robert Haas 提交于
      Along the way, rename "Options" to "FDW Options" in various places for
      consistency and clarity.
      
      Shigeru Hanada
      d82d8486
    • R
      Unbreak legacy syntax "COMMENT ON RULE x IS y", with no relation name. · 5057366e
      Robert Haas 提交于
      check_object_ownership() isn't happy about the null relation pointer.
      We could fix it there, but this seems more future-proof.
      5057366e
    • R
      Change psql's \dd command to do something more useful. · 59414cde
      Robert Haas 提交于
      Instead of displaying comments on an arbitrary subset of the object
      types which support them, make \dd display comments on exactly those
      object types which don't have their own backlash commands.  We now
      regard the display of comments as properly the job of the relevant
      backslash command (though many of them do so only in verbose mode)
      rather than something that \dd should be responsible for.  However,
      a handful of object types have no backlash command, so make \dd
      give information about those.
      
      Josh Kupershmidt
      59414cde
    • T
      Remove wal_sender_delay GUC, because it's no longer useful. · cff75130
      Tom Lane 提交于
      The latch infrastructure is now capable of detecting all cases where the
      walsender loop needs to wake up, so there is no reason to have an arbitrary
      timeout.
      
      Also, modify the walsender loop logic to follow the standard pattern of
      ResetLatch, test for work to do, WaitLatch.  The previous coding was both
      hard to follow and buggy: it would sometimes busy-loop despite having
      nothing available to do, eg between receipt of a signal and the next time
      it was caught up with new WAL, and it also had interesting choices like
      deciding to update to WALSNDSTATE_STREAMING on the strength of information
      known to be obsolete.
      cff75130
    • T
      Add a bit of debug logging to backend_read_statsfile(). · 79b2ee20
      Tom Lane 提交于
      This is in hopes of learning more about what causes "pgstat wait timeout"
      warnings in the buildfarm.  This patch should probably be reverted once
      we've learned what we can.  As coded, it will result in regression test
      "failures" at half the delay that the existing code does, so I expect
      to see a few more than before.
      79b2ee20