This project is mirrored from Pull mirroring updated .
  1. 03 Mar, 2021 10 commits
  2. 02 Mar, 2021 11 commits
    • Peter Geoghegan's avatar
      nbtree page deletion: Add leaftopparent assertion. · 5b2f2af3
      Peter Geoghegan authored
      Add documenting assertion.  This makes it easier to follow how we
      maintain the top parent link in target subtree's half-dead/leaf level
    • Peter Geoghegan's avatar
      Fix nbtree page deletion error messages. · 3d8d5787
      Peter Geoghegan authored
      Adjust some "can't happen" error messages that assumed that the page
      deletion target page must be a half-dead page.  This assumption was
      wrong in the case of an internal target page.  Simply refer to these
      pages as the target page instead.
      Internal pages are never marked half-dead.  There is exactly one
      half-dead page for each subtree undergoing deletion.  The half-dead page
      is also the target subtree's leaf-level page.  This has been the case
      since commit efada2b8, which totally overhauled nbtree page deletion.
    • Tom Lane's avatar
      Mark default_transaction_read_only as GUC_REPORT. · d16f8c8e
      Tom Lane authored
      This allows clients to find out the setting at connection time without
      having to expend a query round trip to do so; which is helpful when
      trying to identify read/write servers.  (One must also look at
      in_hot_standby, but that's already GUC_REPORT, cf bf8a662c.)
      Modifying libpq to make use of this will come soon, but I felt it
      cleaner to push the server change separately.
      Haribabu Kommi, Greg Nancarrow, Vignesh C; reviewed at various times
      by Laurenz Albe, Takayuki Tsunakawa, Peter Smith.
    • Alvaro Herrera's avatar
      Use native path separators to pg_ctl in initdb · 75dbfe4c
      Alvaro Herrera authored
      On Windows, CMD.EXE allegedly does not run a command that uses forward slashes,
      so let's convert the path to use backslashes instead.
      Backpatch to 10.
      Author: Nitin Jadhav <>
      Reviewed-by: default avatarJuan José Santamaría Flecha <>
    • Tom Lane's avatar
      Suppress unnecessary regex subre nodes in a couple more cases. · 4604f83f
      Tom Lane authored
      This extends the changes made in commit cebc1d34, teaching
      parseqatom() to generate fewer or cheaper subre nodes in some edge
      cases.  The case of interest here is a quantified atom that is "messy"
      only because it has greediness opposite to what preceded it (whereas
      captures and backrefs are intrinsically messy).  In this case we don't
      need an iteration node, since we don't care where the sub-matches of
      the quantifier are; and we might also not need a second concatenation
      node.  This seems of only marginal real-world use according to my
      testing, but I wanted to get it in before wrapping up this series of
      regex performance fixes.
    • Tom Lane's avatar
      Improve performance of regular expression back-references. · 0c3405cf
      Tom Lane authored
      In some cases, at the time that we're doing an NFA-based precheck
      of whether a backref subexpression can match at a particular place
      in the string, we already know which substring the referenced
      subexpression matched.  If so, we might as well forget about the NFA
      and just compare the substring; this is faster and it gives an exact
      rather than approximate answer.
      In general, this optimization can help while we are prechecking within
      the second child expression of a concat node, while the capture was
      within the first child expression; then the substring was saved during
      cdissect() of the first child and will be available to NFA checks done
      while cdissect() recurses into the second child.  It can help quite a
      lot if the tree looks like
                   /      \
            capture        concat
                          /      \
           expensive stuff        backref
      as we will be able to avoid recursively dissecting the "expensive
      stuff" before discovering that the backref isn't satisfied with a
      particular midpoint that the lower concat node is testing.  This
      doesn't help if the concat tree is left-deep, as the capture node
      won't get set soon enough (and it's hard to fix that without changing
      the engine's match behavior).  Fortunately, right-deep concat trees
      are the common case.
      Patch by me, reviewed by Joel Jacobson
    • Tom Lane's avatar
      Fix semantics of regular expression back-references. · 4aea704a
      Tom Lane authored
      POSIX defines the behavior of back-references thus:
          The back-reference expression '\n' shall match the same (possibly
          empty) string of characters as was matched by a subexpression
          enclosed between "\(" and "\)" preceding the '\n'.
      As far as I can see, the back-reference is supposed to consider only
      the data characters matched by the referenced subexpression.  However,
      because our engine copies the NFA constructed from the referenced
      subexpression, it effectively enforces any constraints therein, too.
      As an example, '(^.)\1' ought to match 'xx', or any other string
      starting with two occurrences of the same character; but in our code
      it does not, and indeed can't match anything, because the '^' anchor
      constraint is included in the backref's copied NFA.  If POSIX intended
      that, you'd think they'd mention it.  Perl for one doesn't act that
      way, so it's hard to conclude that this isn't a bug.
      Fix by modifying the backref's NFA immediately after it's copied from
      the reference, replacing all constraint arcs by EMPTY arcs so that the
      constraints are treated as automatically satisfied.  This still allows
      us to enforce matching rules that depend only on the data characters;
      for example, in '(^\d+).*\1' the NFA matching step will still know
      that the backref can only match strings of digits.
      Perhaps surprisingly, this change does not affect the results of any
      of a rather large corpus of real-world regexes.  Nonetheless, I would
      not consider back-patching it, since it's a clear compatibility break.
      Patch by me, reviewed by Joel Jacobson
    • Michael Paquier's avatar
      Fix duplicated test case in TAP tests of reindexdb · c5530d84
      Michael Paquier authored
      The same test for REINDEX (VERBOSE) was done twice, while it is clear
      that the second test should use --concurrently.  Issue introduced in
      5dc92b84, for what looks like a copy-paste mistake.
      Reviewed-by: Mark Dilger
      Backpatch-through: 12
    • Michael Paquier's avatar
      Simplify code to switch pg_class.relrowsecurity in tablecmds.c · fabde52f
      Michael Paquier authored
      The same code pattern was repeated twice to enable or disable ROW LEVEL
      SECURITY with an ALTER TABLE command.  This makes the code slightly
      Author: Justin Pryzby
      Reviewed-by: Zhihong Yu
    • Michael Paquier's avatar
      doc: Improve description of data checksums · bd1b8d0e
      Michael Paquier authored
      This partially reverts bcf2667b that got incorrectly merged, and this
      improves the wording of the documentation that existed before that.
      Per discussion with Justin Pryzby.
    • Michael Paquier's avatar
      doc: Mention archive_command failure handling on signals · 8c1b6a18
      Michael Paquier authored
      The behavior is similar to restore_command, which was already documented
      for the restore part, but not the archive part.
      Author: Benoit Lobréau
      Reviewed-by: Julien Rouhaud
  3. 01 Mar, 2021 12 commits
  4. 28 Feb, 2021 3 commits
  5. 27 Feb, 2021 4 commits