1. 19 1月, 2010 2 次提交
  2. 18 1月, 2010 4 次提交
    • T
      Fix incorrect comparison of scan key in GIN. Per report from · a0a7e634
      Teodor Sigaev 提交于
      Vyacheslav Kalinin <vka@mgcp.com>
      a0a7e634
    • T
      Fix portalmem.c to avoid keeping a dangling pointer to a cached plan list · 376c6203
      Tom Lane 提交于
      after it's released its reference count for the cached plan.  There are
      code paths that might try to examine the plan list before noticing that
      the portal is already in aborted state.  Report and diagnosis by Tatsuo
      Ishii, though this isn't exactly his proposed patch.
      376c6203
    • T
      Update SET CONSTRAINTS reference page --- it failed to mention EXCLUDE · 04ef4040
      Tom Lane 提交于
      constraints and was lacking a couple of other interesting details.
      04ef4040
    • T
      Improve the handling of SET CONSTRAINTS commands by having them search · 9a915e59
      Tom Lane 提交于
      pg_constraint before searching pg_trigger.  This allows saner handling of
      corner cases; in particular we now say "constraint is not deferrable"
      rather than "constraint does not exist" when the command is applied to
      a constraint that's inherently non-deferrable.  Per a gripe several months
      ago from hubert depesz lubaczewski.
      
      To make this work without breaking user-defined constraint triggers,
      we have to add entries for them to pg_constraint.  However, in return
      we can remove the pgconstrname column from pg_constraint, which represents
      a fairly sizable space savings.  I also replaced the tgisconstraint column
      with tgisinternal; the old meaning of tgisconstraint can now be had by
      testing for nonzero tgconstraint, while there is no other way to get
      the old meaning of nonzero tgconstraint, namely that the trigger was
      internally generated rather than being user-created.
      
      In passing, fix an old misstatement in the docs and comments, namely that
      pg_trigger.tgdeferrable is exactly redundant with pg_constraint.condeferrable.
      Actually, we mark RI action triggers as nondeferrable even when they belong to
      a nominally deferrable FK constraint.  The SET CONSTRAINTS code now relies on
      that instead of hard-coding a list of exception OIDs.
      9a915e59
  3. 17 1月, 2010 7 次提交
  4. 16 1月, 2010 14 次提交
  5. 15 1月, 2010 5 次提交
  6. 14 1月, 2010 4 次提交
    • S
      First part of refactoring of code for ResolveRecoveryConflict. Purposes · e99767bc
      Simon Riggs 提交于
      of this are to centralise the conflict code to allow further change,
      as well as to allow passing through the full reason for the conflict
      through to the conflicting backends. Backend state alters how we
      can handle different types of conflict so this is now required.
      As originally suggested by Heikki, no longer optional.
      e99767bc
    • T
      Simplify validate_exec() by using access(2) to check file permissions, · 0fba3bef
      Tom Lane 提交于
      rather than trying to implement the equivalent logic by hand.  The motivation
      for the original coding appears to have been to check with the effective uid's
      permissions not the real uid's; but there is no longer any difference, because
      we don't run the postmaster setuid (indeed, main.c enforces that they're the
      same).  Using access() means we will get it right in situations the original
      coding failed to handle, such as ACL-based permissions.  Besides it's a lot
      shorter, cleaner, and more thread-safe.  Per bug #5275 from James Bellinger.
      0fba3bef
    • T
      When loading critical system indexes into the relcache, ensure we lock the · 715120e7
      Tom Lane 提交于
      underlying catalog not only the index itself.  Otherwise, if the cache
      load process touches the catalog (which will happen for many though not
      all of these indexes), we are locking index before parent table, which can
      result in a deadlock against processes that are trying to lock them in the
      normal order.  Per today's failure on buildfarm member gothic_moth; it's
      surprising the problem hadn't been identified before.
      
      Back-patch to 8.2.  Earlier releases didn't have the issue because they
      didn't try to lock these indexes during load (instead assuming that they
      couldn't change schema at all during multiuser operation).
      715120e7
    • T
      Fix bug #5269: ResetPlanCache mustn't invalidate cached utility statements, · dbba3a14
      Tom Lane 提交于
      especially not ROLLBACK.  ROLLBACK might need to be executed in an already
      aborted transaction, when there is no safe way to revalidate the plan.  But
      in general there's no point in marking utility statements invalid, since
      they have no plans in the normal sense of the word; so we might as well
      work a bit harder here to avoid future revalidation cycles.
      
      Back-patch to 8.4, where the bug was introduced.
      dbba3a14
  7. 13 1月, 2010 4 次提交