Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

tablecmds.c

Blame
    • Tom Lane's avatar
      5b562644
      Teach ANALYZE to clear pg_class.relhassubclass when appropriate. · 5b562644
      Tom Lane authored
      In the past, relhassubclass always remained true if a relation had ever had
      child relations, even if the last subclass was long gone.  While this had
      only marginal performance implications in most cases, it was annoying, and
      I'm now considering some planner changes that would raise the cost of a
      false positive.  It was previously impractical to fix this because of race
      condition concerns.  However, given the recent change that made tablecmds.c
      take ShareExclusiveLock on relations that are gaining a child (commit
      fbcf4b92), we can now allow ANALYZE to
      clear the flag when it's no longer relevant.  There is no additional
      locking cost to do so, since ANALYZE takes ShareExclusiveLock anyway.
      5b562644
      History
      Teach ANALYZE to clear pg_class.relhassubclass when appropriate.
      Tom Lane authored
      In the past, relhassubclass always remained true if a relation had ever had
      child relations, even if the last subclass was long gone.  While this had
      only marginal performance implications in most cases, it was annoying, and
      I'm now considering some planner changes that would raise the cost of a
      false positive.  It was previously impractical to fix this because of race
      condition concerns.  However, given the recent change that made tablecmds.c
      take ShareExclusiveLock on relations that are gaining a child (commit
      fbcf4b92), we can now allow ANALYZE to
      clear the flag when it's no longer relevant.  There is no additional
      locking cost to do so, since ANALYZE takes ShareExclusiveLock anyway.
    tablecmds.c 290.40 KiB