1. 21 8月, 2012 1 次提交
    • H
      Don't get confused if a WAL partial record header has xl_tot_len == 0. · 51fed14d
      Heikki Linnakangas 提交于
      If a WAL record header was split across pages, but xl_tot_len was 0, we
      would get confused and conclude that we had already read the whole record,
      and proceed to CRC check it. That can lead to a crash in RecordIsValid(),
      which isn't careful to not read beyond end-of-record, as defined by
      xl_tot_len.
      
      Add an explicit sanity check for xl_tot_len <= SizeOfXlogRecord. Also,
      make RecordIsValid() more robust by checking in each step that it doesn't
      try to access memory beyond end of record, even if a length field in the
      record's or a backup block's header is bogus.
      
      Per report and analysis by Tom Lane.
      51fed14d
  2. 20 8月, 2012 3 次提交
  3. 19 8月, 2012 2 次提交
    • T
      Make use of LATERAL in information_schema.sequences view. · c246eb5a
      Tom Lane 提交于
      It said "XXX: The following could be improved if we had LATERAL" ...
      so let's do that.
      
      No catversion bump since either version of the view works fine.
      c246eb5a
    • T
      Another round of planner fixes for LATERAL. · 084a29c9
      Tom Lane 提交于
      Formerly, subquery pullup had no need to examine other entries in the range
      table, since they could not contain any references to the subquery being
      pulled up.  That's no longer true with LATERAL, so now we need to be able
      to visit rangetable subexpressions to replace Vars referencing the
      pulled-up subquery.  Also, this means that extract_lateral_references must
      be unsurprised at encountering lateral PlaceHolderVars, since such might be
      created when pulling up a subquery that's underneath an outer join with
      respect to the lateral reference.
      084a29c9
  4. 18 8月, 2012 1 次提交
  5. 17 8月, 2012 8 次提交
  6. 16 8月, 2012 19 次提交
  7. 15 8月, 2012 6 次提交
    • B
      Document that foreign "version" and "type" values are only useful to · fc5f2005
      Bruce Momjian 提交于
      certain foreign data wrappers.
      fc5f2005
    • T
      Disallow extensions from owning the schema they are assigned to. · 4d642b59
      Tom Lane 提交于
      This situation creates a dependency loop that confuses pg_dump and probably
      other things.  Moreover, since the mental model is that the extension
      "contains" schemas it owns, but "is contained in" its extschema (even
      though neither is strictly true), having both true at once is confusing for
      people too.  So prevent the situation from being set up.
      
      Reported and patched by Thom Brown.  Back-patch to 9.1 where extensions
      were added.
      4d642b59
    • B
      Properly escape usernames in initdb, so names with single-quotes are · a9732965
      Bruce Momjian 提交于
      supported.  Also add assert to catch future breakage.
      
      Also, improve documentation that "double"-quotes must be used in
      pg_hba.conf (not single quotes).
      a9732965
    • T
      Resurrect the "last ditch" code path in join_search_one_level(). · eb919e8f
      Tom Lane 提交于
      This essentially reverts commit e54b10a6,
      in which I'd decided that the "last ditch" join logic was useless.  The
      folly of that is now exposed by a report from Pavel Stehule: although the
      function should always find at least one join in a self-contained join
      problem, it can still fail to do so in a sub-problem created by artificial
      from_collapse_limit or join_collapse_limit constraints.  Adjust the
      comments to describe this, and simplify the code a bit to match the new
      coding of the earlier loop in the function.
      
      I'm not terribly happy about this: I still subscribe to the opinion stated
      in the previous commit message that the "last ditch" code can obscure logic
      bugs elsewhere.  But the alternative seems to be to complicate the earlier
      tests for does-this-relation-have-a-join-clause to the point where they can
      tell whether the join clauses link outside the current join sub-problem.
      And that looks messy, slow, and possibly a source of bugs in itself.
      In any case, now is not the time to be inserting experimental code into
      9.2, so let's just go back to the time-tested solution.
      eb919e8f
    • B
      Add more limited large object trigger example. · 864de654
      Bruce Momjian 提交于
      864de654
    • B
      Add doc example of restricting large object trigger firing to only · 9e84cccf
      Bruce Momjian 提交于
      updates of the column of interest.
      9e84cccf