1. 06 May, 2020 4 commits
    • Tom Lane's avatar
      Doc: remove now-redundant align specifications in colspecs. · 90be0914
      Tom Lane authored
      In the wake of commit f2159931, we don't need to set table columns'
      align specs retail.  Undo a few such settings I'd added in commit
      5545b69a.  (The column width adjustments stay, though.)
      90be0914
    • Alvaro Herrera's avatar
      Heed lock protocol in DROP OWNED BY · 5be594ca
      Alvaro Herrera authored
      We were acquiring object locks then deleting objects one by one, instead
      of acquiring all object locks first, ignoring those that did not exist,
      and then deleting all objects together.   The latter is the correct
      protocol to use, and what this commits changes to code to do.  Failing
      to follow that leads to "cache lookup failed for relation XYZ" error
      reports when DROP OWNED runs concurrently with other DDL -- for example,
      a session termination that removes some temp tables.
      
      Author: Álvaro Herrera
      Reported-by: Mithun Chicklore Yogendra (Mithun CY)
      Reviewed-by: Ahsan Hadi, Tom Lane
      Discussion: https://postgr.es/m/CADq3xVZTbzK4ZLKq+dn_vB4QafXXbmMgDP3trY-GuLnib2Ai1w@mail.gmail.com
      5be594ca
    • Tom Lane's avatar
      Doc: further fooling-about with rendering of tables in PDF output. · f2159931
      Tom Lane authored
      I concluded that we really just ought to force all tables in PDF output
      to default to "left" alignment (instead of "justify"); that is what the
      HTML toolchain does and that's what most people have been designing the
      tables to look good with.  There are few if any places where "justify"
      produces better-looking output, and there are many where it looks
      horrible.  So change stylesheet-fo.xsl to make that true.
      
      Also tweak column widths in a few more tables to make them look better
      and avoid "exceed the available area" warnings.  This commit fixes
      basically everything that can be fixed through that approach.  The
      remaining tables that give warnings either are scheduled for redesign
      as per recent discussions, or need a fundamental rethink because they
      Just Don't Work in a narrow view.
      f2159931
    • Michael Paquier's avatar
      Handle spaces for Python install location in MSVC scripts · beb2516e
      Michael Paquier authored
      Attempting to use an installation path of Python that includes spaces
      caused the MSVC builds to fail.  This fixes the issue by using the same
      quoting method as ad7595b8 for OpenSSL.
      
      Author: Victor Wagner
      Discussion: https://postgr.es/m/20200430150608.6dc6b8c4@antares.wagner.home
      Backpatch-through: 9.5
      beb2516e
  2. 05 May, 2020 18 commits
  3. 04 May, 2020 4 commits
    • Tom Lane's avatar
      Doc: improve PDF presentation of some tables by adjusting column widths. · 5545b69a
      Tom Lane authored
      The PDF toolchain defaults to laying out all columns of a table with
      equal widths, in contrast to the HTML rendering which automatically
      varies the column widths to fit the data.  In many places, this
      results in very badly laid-out tables, with lots of useless whitespace
      in some places and text that overruns its cell in other places.
      
      For tables that have reasonably static content, we can improve
      matters by adding <colspec> entries to hand-assign the column widths.
      This commit does that for a few of the tables that were worst off;
      it eliminates close to 200 "contents ... exceed the available area"
      warnings in an A4 PDF build.
      
      I also forced align="left" in these tables, overriding the PDF
      toolchain's default which is evidently "justify".  (The HTML toolchain
      seems to default to that already.)  Anyplace where things are tight
      enough that we need to worry about this, forced justification tends to
      look truly awful.
      5545b69a
    • Peter Geoghegan's avatar
      Add posting list tuple amcheck test case. · 20c6905d
      Peter Geoghegan authored
      Add a test case to contrib/amcheck that creates coverage of code paths
      that are used to verify posting list tuples (tuples created when
      deduplication merges together existing tuples to avoid a leaf page
      split).
      20c6905d
    • Tom Lane's avatar
      Doc: standardize markup a bit more. · 47046763
      Tom Lane authored
      We had a mishmash of <replaceable>, <replaceable class="parameter">,
      and <parameter> markup for operator/function arguments.  Use <parameter>
      consistently for things that are in fact names of parameters (including
      OUT parameters), reserving <replaceable> for things that aren't.  The
      latter class includes some made-up-by-the-docs type class names, like
      "numeric_type", as well as placeholders for arguments that don't have
      well-defined types.  Possibly we could do better with those categories
      as well, but for the moment I'm content not to have parameter names
      marked up in different ways in different places.
      
      (This commit aligns the earlier sections of chapter 9 with a policy
      that I'd arrived at while working on commit 1ad23335, which is why
      the last few sections need no changes.)
      47046763
    • Tom Lane's avatar
      Doc: update sections 9.22 - 9.30 for new function table layout. · 1ad23335
      Tom Lane authored
      With the usual quota of minor and less-minor editorial changes.
      1ad23335
  4. 03 May, 2020 2 commits
  5. 02 May, 2020 5 commits
  6. 01 May, 2020 7 commits
    • Tomas Vondra's avatar
      Simplify cost_incremental_sort a bit · 60fbb4d7
      Tomas Vondra authored
      Commit de0dc1a8 added code to cost_incremental_sort to handle varno 0.
      Explicitly removing the RelabelType is not really necessary, because the
      pull_varnos handles that just fine, which simplifies the code a bit.
      
      Author: Richard Guo
      Discussion: https://postgr.es/m/CAMbWs4_3_D2J5XxOuw68hvn0-gJsw9FXNSGcZka9aTymn9UJ8A%40mail.gmail.com
      Discussion: https://postgr.es/m/20200411214639.GK2228%40telsasoft.com
      60fbb4d7
    • Tomas Vondra's avatar
      Remove pg_xact entry from SLRU stats · 2e08d314
      Tomas Vondra authored
      The "pg_xact" entry was duplicate with "clog" and was added by mistake.
      
      Reported-by: Fujii Masao
      Discussion: https://postgr.es/m/20200119143707.gyinppnigokesjok@development
      2e08d314
    • Tom Lane's avatar
      Get rid of trailing semicolons in C macro definitions. · 0da06d9f
      Tom Lane authored
      Writing a trailing semicolon in a macro is almost never the right thing,
      because you almost always want to write a semicolon after each macro
      call instead.  (Even if there was some reason to prefer not to, pgindent
      would probably make a hash of code formatted that way; so within PG the
      rule should basically be "don't do it".)  Thus, if we have a semi inside
      the macro, the compiler sees "something;;".  Much of the time the extra
      empty statement is harmless, but it could lead to mysterious syntax
      errors at call sites.  In perhaps an overabundance of neatnik-ism, let's
      run around and get rid of the excess semicolons whereever possible.
      
      The only thing worse than a mysterious syntax error is a mysterious
      syntax error that only happens in the back branches; therefore,
      backpatch these changes where relevant, which is most of them because
      most of these mistakes are old.  (The lack of reported problems shows
      that this is largely a hypothetical issue, but still, it could bite
      us in some future patch.)
      
      John Naylor and Tom Lane
      
      Discussion: https://postgr.es/m/CACPNZCs0qWTqJ2QUSGJ07B7uvAvzMb-KbG2q+oo+J3tsWN5cqw@mail.gmail.com
      0da06d9f
    • Tom Lane's avatar
      Doc: update sections 9.17 - 9.21 for new function table layout. · d6693544
      Tom Lane authored
      With the usual quota of minor editorial changes.
      d6693544
    • Peter Geoghegan's avatar
      Clear up issue with FSM and oldest bpto.xact. · 69cf853f
      Peter Geoghegan authored
      On further reflection, code comments added by commit b0229f26 slightly
      misrepresented how we determine the oldest bpto.xact for the index.
      btvacuumpage() does not treat the bpto.xact of a page that it put in the
      FSM as a candidate to be the oldest deleted page (the delete-marked page
      that has the oldest bpto.xact XID among all pages encountered).
      
      The definition of a deleted page for the purposes of the bpto.xact
      calculation is different from the definition used by the bulk delete
      statistics.  The bulk delete statistics don't distinguish between pages
      that were deleted by the current VACUUM, pages deleted by a previous
      VACUUM operation but not yet recyclable/reusable, and pages that are
      reusable (though reusable pages are counted separately).
      
      Backpatch: 11-, just like commit b0229f26.
      69cf853f
    • Peter Geoghegan's avatar
      4e21f8b6
    • Peter Geoghegan's avatar
      Fix undercounting in VACUUM VERBOSE output. · 73a076b0
      Peter Geoghegan authored
      The logic for determining how many nbtree pages in an index are deleted
      pages sometimes undercounted pages.  Pages that were deleted by the
      current VACUUM operation (as opposed to some previous VACUUM operation
      whose deleted pages have yet to be reused) were sometimes overlooked.
      The final count is exposed to users through VACUUM VERBOSE's "%u index
      pages have been deleted" output.
      
      btvacuumpage() avoided double-counting when _bt_pagedel() deleted more
      than one page by assuming that only one page was deleted, and that the
      additional deleted pages would get picked up during a future call to
      btvacuumpage() by the same VACUUM operation.  _bt_pagedel() can
      legitimately delete pages that the btvacuumscan() scan will not visit
      again, though, so that assumption was slightly faulty.
      
      Fix the accounting by teaching _bt_pagedel() about its caller's
      requirements.  It now only reports on pages that it knows btvacuumscan()
      won't visit again (including the current btvacuumpage() page), so
      everything works out in the end.
      
      This bug has been around forever.  Only backpatch to v11, though, to
      keep _bt_pagedel() is sync on the branches that have today's bugfix
      commit b0229f26.  Note that this commit changes the signature of
      _bt_pagedel(), just like commit b0229f26.
      
      Author: Peter Geoghegan
      Reviewed-By: Masahiko Sawada
      Discussion: https://postgr.es/m/CAH2-WzkrXBcMQWAYUJMFTTvzx_r4q=pYSjDe07JnUXhe+OZnJA@mail.gmail.com
      Backpatch: 11-
      73a076b0