1. 21 May, 2020 1 commit
    • Michael Paquier's avatar
      Fix MSVC installations with multiple "configure" files detected · d2a99599
      Michael Paquier authored
      When installing binaries and libraries using the MSVC installation
      routines, the operation gets done after moving to the root folder, whose
      location is detected by checking if "configure" exists two times in a
      row.  So, calling the installation script from src/tools/msvc/ with an
      extra "configure" file four levels up the root path of the code tree
      causes the execution to go further up, leading to a failure in finding
      the builds.  This commit fixes the issue by moving to the root folder of
      the code tree only once, when necessary.
      
      Author: Arnold Müller
      Reviewed-by: Daniel Gustafsson
      Discussion: https://postgr.es/m/16343-f638f67e7e52b86c@postgresql.org
      Backpatch-through: 9.5
      d2a99599
  2. 20 May, 2020 4 commits
  3. 19 May, 2020 1 commit
    • Peter Geoghegan's avatar
      Reconsider nbtree page deletion assertion. · 67b0b2db
      Peter Geoghegan authored
      Commit 624686ab added an assertion that verified that _bt_search
      successfully relocated the leaf page undergoing deletion.  Page deletion
      cannot deal with the case where the descent stack is to the right of the
      page, so this seemed critical (deletion can only handle the case where
      the descent stack is to the left of the leaf/target page).  However, the
      assertion went a bit too far.
      
      Since only a buffer pin is held on the leaf page throughout the call to
      _bt_search, nothing guarantees that it can't have split during this
      small window.  And if does actually split, _bt_search may end up
      "relocating" a page to the right of the original target leaf page.  This
      scenario seems extremely unlikely, but it must still be considered.
      Remove the assertion, and document how we cope in this scenario.
      67b0b2db
  4. 18 May, 2020 7 commits
  5. 17 May, 2020 6 commits
  6. 16 May, 2020 8 commits
  7. 15 May, 2020 13 commits
    • Tom Lane's avatar
      Drop the redundant "Lock" suffix from LWLock wait event names. · 14a91010
      Tom Lane authored
      This was mostly confusing, especially since some wait events in
      this class had the suffix and some did not.
      
      While at it, stop exposing MainLWLockNames[] as a globally visible
      name; any code using that directly is almost certainly wrong, as
      its name has been misleading for some time.
      (GetLWLockIdentifier() is what to use instead.)
      
      Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
      14a91010
    • Tom Lane's avatar
      Fix bogus initialization of replication origin shared memory state. · 80484049
      Tom Lane authored
      The previous coding zeroed out offsetof(ReplicationStateCtl, states)
      more bytes than it was entitled to, as a consequence of starting the
      zeroing from the wrong pointer (or, if you prefer, using the wrong
      calculation of how much to zero).
      
      It's unsurprising that this has not caused any reported problems,
      since it can be expected that the newly-allocated block is at the end
      of what we've used in shared memory, and we always make the shmem
      block substantially bigger than minimally necessary.  Nonetheless,
      this is wrong and it could bite us someday; plus it's a dangerous
      model for somebody to copy.
      
      This dates back to the introduction of this code (commit 5aa23504),
      so back-patch to all supported branches.
      80484049
    • Tom Lane's avatar
      Rename assorted LWLock tranches. · 36ac359d
      Tom Lane authored
      Choose names that fit into the conventions for wait event names
      (particularly, that multi-word names are in the style MultiWordName)
      and hopefully convey more information to non-hacker users than the
      previous names did.
      
      Also rename SerializablePredicateLockListLock to
      SerializablePredicateListLock; the old name was long enough to cause
      table formatting problems, plus the double occurrence of "Lock" seems
      confusing/error-prone.
      
      Also change a couple of particularly opaque LWLock field names.
      
      Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
      36ac359d
    • Alvaro Herrera's avatar
      a0ab4f49
    • Alvaro Herrera's avatar
      Avoid killing btree items that are already dead · 242dfcba
      Alvaro Herrera authored
      _bt_killitems marks btree items dead when a scan leaves the page where
      they live, but it does so with only share lock (to improve concurrency).
      This was historicall okay, since killing a dead item has no
      consequences.  However, with the advent of data checksums and
      wal_log_hints, this action incurs a WAL full-page-image record of the
      page.  Multiple concurrent processes would write the same page several
      times, leading to WAL bloat.  The probability of this happening can be
      reduced by only killing items if they're not already dead, so change the
      code to do that.
      
      The problem could eliminated completely by having _bt_killitems upgrade
      to exclusive lock upon seeing a killable item, but that would reduce
      concurrency so it's considered a cure worse than the disease.
      
      Backpatch all the way back to 9.5, since wal_log_hints was introduced in
      9.4.
      
      Author: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
      Discussion: https://postgr.es/m/CA+fd4k6PeRj2CkzapWNrERkja5G0-6D-YQiKfbukJV+qZGFZ_Q@mail.gmail.com
      242dfcba
    • Tom Lane's avatar
      Rename SLRU structures and associated LWLocks. · 5da14938
      Tom Lane authored
      Originally, the names assigned to SLRUs had no purpose other than
      being shmem lookup keys, so not a lot of thought went into them.
      As of v13, though, we're exposing them in the pg_stat_slru view and
      the pg_stat_reset_slru function, so it seems advisable to take a bit
      more care.  Rename them to names based on the associated on-disk
      storage directories (which fortunately we *did* think about, to some
      extent; since those are also visible to DBAs, consistency seems like
      a good thing).  Also rename the associated LWLocks, since those names
      are likewise user-exposed now as wait event names.
      
      For the most part I only touched symbols used in the respective modules'
      SimpleLruInit() calls, not the names of other related objects.  This
      renaming could have been taken further, and maybe someday we will do so.
      But for now it seems undesirable to change the names of any globally
      visible functions or structs, so some inconsistency is unavoidable.
      
      (But I *did* terminate "oldserxid" with prejudice, as I found that
      name both unreadable and not descriptive of the SLRU's contents.)
      
      Table 27.12 needs re-alphabetization now, but I'll leave that till
      after the other LWLock renamings I have in mind.
      
      Discussion: https://postgr.es/m/28683.1589405363@sss.pgh.pa.us
      5da14938
    • Alvaro Herrera's avatar
      Review of the glossary · 756abe2b
      Alvaro Herrera authored
      Add some more terms, clarify some definitions, remove redundant terms,
      move a couple of terms to keep alphabetical order.
      Co-authored-by: default avatarJürgen Purtz <juergen@purtz.de>
      Co-authored-by: default avatarErik Rijkers <er@xs4all.nl>
      Co-authored-by: default avatarLaurenz Albe <laurenz.albe@cybertec.at>
      Discussion: https://postgr.es/m/7b9b469e804777ac9df4d37716db935e@xs4all.nl
      756abe2b
    • Bruce Momjian's avatar
      doc: PG 13 rels: use xref labels referencing ref/*.sgml files · 6755b618
      Bruce Momjian authored
      This avoids using <link> and supplied text.
      6755b618
    • Bruce Momjian's avatar
      docs: add xreflabel entries for autovacuum, SP-GiST, and TOAST · 85af628d
      Bruce Momjian authored
      This is for use by the PG 13 release notes, but might be used for minor
      release notes in the future.
      
      Backpatch-through: 9.5
      85af628d
    • Bruce Momjian's avatar
      doc: add missing xreflabels to the main docs (not refs) · 75fcdd2a
      Bruce Momjian authored
      Add missing xreflabels for index types, geqo, libpq, spi, server-side
      languages, ecpg, and vaacuumlo.
      
      Backpatch-through: 9.5
      75fcdd2a
    • Bruce Momjian's avatar
      bc1c1de2
    • Bruce Momjian's avatar
      doc: PG 13 relnotes: fix uuid item · 065ea0c3
      Bruce Momjian authored
      065ea0c3
    • Bruce Momjian's avatar
      e9080708