1. 07 5月, 2013 4 次提交
    • T
      Desultory copy-editing of the 9.3 release notes. · f1ff90cf
      Tom Lane 提交于
      I had time for a quick review of the notes, so here are some fixes.
      f1ff90cf
    • T
      Move materialized views' is-populated status into their pg_class entries. · 1d6c72a5
      Tom Lane 提交于
      Previously this state was represented by whether the view's disk file had
      zero or nonzero size, which is problematic for numerous reasons, since it's
      breaking a fundamental assumption about heap storage.  This was done to
      allow unlogged matviews to revert to unpopulated status after a crash
      despite our lack of any ability to update catalog entries post-crash.
      However, this poses enough risk of future problems that it seems better to
      not support unlogged matviews until we can find another way.  Accordingly,
      revert that choice as well as a number of existing kluges forced by it
      in favor of creating a pg_class.relispopulated flag column.
      1d6c72a5
    • T
      Back out some recent translation updates. · 5da57980
      Tom Lane 提交于
      Very old versions of msgfmt choke on these specific messages, for reasons
      that are unclear at the moment.  Remove them so that we can ship a beta
      release and not get complaints from testers (these messages will just go
      untranslated, instead, and we're hardly at 100% coverage anyway).
      Peter Eisentraut will look for a better fix later.
      5da57980
    • T
      Disallow unlogged materialized views. · 3223b25f
      Tom Lane 提交于
      The initial implementation of this feature was really unsupportable,
      because it's relying on the physical size of an on-disk file to carry the
      relation's populated/unpopulated state, which is at least a modularity
      violation and could have serious long-term consequences.  We could say that
      an unlogged matview goes to empty on crash, but not everybody likes that
      definition, so let's just remove the feature for 9.3.  We can add it back
      when we have a less klugy implementation.
      
      I left the grammar and tab-completion support for CREATE UNLOGGED
      MATERIALIZED VIEW in place, since it's harmless and allows delivering a
      more specific error message about the unsupported feature.
      
      I'm committing this separately to ease identification of what should be
      reverted when/if we are able to re-enable the feature.
      3223b25f
  2. 06 5月, 2013 6 次提交
  3. 05 5月, 2013 3 次提交
  4. 04 5月, 2013 9 次提交
  5. 03 5月, 2013 2 次提交
  6. 02 5月, 2013 3 次提交
    • B
      095018bc
    • A
      Use correct length to convert json unicode escapes. · 5f8b4319
      Andrew Dunstan 提交于
      Bug reported on IRC - fix due to Andrew Gierth.
      5f8b4319
    • T
      Fix permission tests for views/tables proven empty by constraint exclusion. · 50c13748
      Tom Lane 提交于
      A view defined as "select <something> where false" had the curious property
      that the system wouldn't check whether users had the privileges necessary
      to select from it.  More generally, permissions checks could be skipped
      for tables referenced in sub-selects or views that were proven empty by
      constraint exclusion (although some quick testing suggests this seldom
      happens in cases of practical interest).  This happened because the planner
      failed to include rangetable entries for such tables in the finished plan.
      
      This was noticed in connection with erroneous handling of materialized
      views, but actually the issue is quite unrelated to matviews.  Therefore,
      revert commit 200ba166 in favor of a more
      direct test for the real problem.
      
      Back-patch to 9.2 where the bug was introduced (by commit
      7741dd65).
      50c13748
  7. 01 5月, 2013 1 次提交
  8. 30 4月, 2013 11 次提交
    • S
      Fix pg_upgrade for 9.3 with data checksums. · 87d3b35a
      Simon Riggs 提交于
      Previous changes misconstrued pg_upgrade internals
      causing build farm breakages.
      87d3b35a
    • S
      Revert previous temporary patch · be475a24
      Simon Riggs 提交于
      be475a24
    • S
      Temporarily silence pg_upgrade's checksums check · 28377213
      Simon Riggs 提交于
      28377213
    • S
      Bump PG_CONTROL_VERSION to 937 · ceabfb20
      Simon Riggs 提交于
      ceabfb20
    • S
      Record data_checksum_version in control file. · 44395174
      Simon Riggs 提交于
      The value is not used anywhere in code, but will
      allow future changes to the checksum version
      should that become necessary in the future.
      44395174
    • S
      Ensure we MarkBufferDirty before visibilitymap_set() · 73092439
      Simon Riggs 提交于
      logs the heap page and sets the LSN. Otherwise a
      checkpoint could occur between those actions and
      leave us in an inconsistent state.
      
      Jeff Davis
      73092439
    • S
      Compiler optimizations for page checksum code. · fdea2530
      Simon Riggs 提交于
      Ants Aasma and Jeff Davis
      fdea2530
    • P
      pg_upgrade: Remove PGPORT handling from test suite · 3d53173e
      Peter Eisentraut 提交于
      This code was left over from when pg_upgrade paid attention to PGPORT.
      Now it would only affects the regression test run before the test run of
      pg_upgrade.  You can still set PGPORT for that, but there is no reason
      to have the test driver default it to 50432.
      3d53173e
    • P
      Revert "pg_ctl: Add idempotent option" · 187ca5e8
      Peter Eisentraut 提交于
      This reverts commit 87306184.  The
      behavior in certain cases is still being debated, and it's too late to
      solve this before beta.
      187ca5e8
    • T
      Postpone creation of pathkeys lists to fix bug #8049. · db9f0e1d
      Tom Lane 提交于
      This patch gets rid of the concept of, and infrastructure for,
      non-canonical PathKeys; we now only ever create canonical pathkey lists.
      
      The need for non-canonical pathkeys came from the desire to have
      grouping_planner initialize query_pathkeys and related pathkey lists before
      calling query_planner.  However, since query_planner didn't actually *do*
      anything with those lists before they'd been made canonical, we can get rid
      of the whole mess by just not creating the lists at all until the point
      where we formerly canonicalized them.
      
      There are several ways in which we could implement that without making
      query_planner itself deal with grouping/sorting features (which are
      supposed to be the province of grouping_planner).  I chose to add a
      callback function to query_planner's API; other alternatives would have
      required adding more fields to PlannerInfo, which while not bad in itself
      would create an ABI break for planner-related plugins in the 9.2 release
      series.  This still breaks ABI for anything that calls query_planner
      directly, but it seems somewhat unlikely that there are any such plugins.
      
      I had originally conceived of this change as merely a step on the way to
      fixing bug #8049 from Teun Hoogendoorn; but it turns out that this fixes
      that bug all by itself, as per the added regression test.  The reason is
      that now get_eclass_for_sort_expr is adding the ORDER BY expression at the
      end of EquivalenceClass creation not the start, and so anything that is in
      a multi-member EquivalenceClass has already been created with correct
      em_nullable_relids.  I am suspicious that there are related scenarios in
      which we still need to teach get_eclass_for_sort_expr to compute correct
      nullable_relids, but am not eager to risk destabilizing either 9.2 or 9.3
      to fix bugs that are only hypothetical.  So for the moment, do this and
      stop here.
      
      Back-patch to 9.2 but not to earlier branches, since they don't exhibit
      this bug for lack of join-clause-movement logic that depends on
      em_nullable_relids being correct.  (We might have to revisit that choice
      if any related bugs turn up.)  In 9.2, don't change the signature of
      make_pathkeys_for_sortclauses nor remove canonicalize_pathkeys, so as
      not to risk more plugin breakage than we have to.
      db9f0e1d
    • K
      Ensure ANALYZE phase is not skipped because of canceled truncate. · 5fc89376
      Kevin Grittner 提交于
      Patch b19e4250 attempted to
      preserve existing behavior regarding statistics generation in the
      case that a truncation attempt was canceled due to lock conflicts.
      It failed to do this accurately in two regards: (1) autovacuum had
      previously generated statistics if the truncate attempt failed to
      initially get the lock rather than having started the attempt, and
      (2) the VACUUM ANALYZE command had always generated statistics.
      
      Both of these changes were unintended, and are reverted by this
      patch.  On review, there seems to be consensus that the previous
      failure to generate statistics when the truncate was terminated
      was more an unfortunate consequence of how that effort was
      previously terminated than a feature we want to keep; so this
      patch generates statistics even when an autovacuum truncation
      attempt terminates early.  Another unintended change which is kept
      on the basis that it is an improvement is that when a VACUUM
      command is truncating, it will the new heuristic for avoiding
      blocking other processes, rather than keeping an
      AccessExclusiveLock on the table for however long the truncation
      takes.
      
      Per multiple reports, with some renaming per patch by Jeff Janes.
      
      Backpatch to 9.0, where problem was created.
      5fc89376
  9. 29 4月, 2013 1 次提交
    • R
      Attempt to fix error recovery in COPY BOTH mode. · 91fa8532
      Robert Haas 提交于
      Previously, libpq and the backend had opposite ideas about whether
      it was necessary for the client to send a CopyDone message after
      receiving an ErrorResponse, making it impossible to cleanly exit
      COPY BOTH mode.  Fix libpq so that works correctly, adopting the
      backend's notion that an ErrorResponse kills the copy in both
      directions.
      
      Adjust receivelog.c to avoid a degradation in the quality of the
      resulting error messages.  libpqwalreceiver.c is already doing
      the right thing, so no adjustment needed there.
      
      Add an explicit statement to the documentation explaining how
      this part of the protocol is supposed to work, in the hopes of
      avoiding future confusion in this area.
      
      Since the consequences of all this confusion are very limited,
      especially in the back-branches where no client ever attempts
      to exit COPY BOTH mode without closing the connection entirely,
      no back-patch.
      91fa8532