1. 01 May, 2019 3 commits
    • Magnus Hagander's avatar
      Fix union for pgstat message types · 659e5349
      Magnus Hagander authored
      The message type for temp files and for checksum failures were missing
      from the union. Due to the coding style used there was no compiler error
      when this happend. So change the code to actively use the union thereby
      producing a compiler error if the same mistake happens again, suggested
      by Tom Lane.
      
      Author: Julien Rouhaud
      Reported-By: Tomas Vondra
      Discussion: https://postgr.es/m/20190430163328.zd4rrlnbvgaqlcdz@development
      659e5349
    • Andres Freund's avatar
      Run catalog reindexing test from 3dbb317d serially, to avoid deadlocks. · 809c9b48
      Andres Freund authored
      The tests turn out to cause deadlocks in some circumstances. Fairly
      reproducibly so with -DRELCACHE_FORCE_RELEASE
      -DCATCACHE_FORCE_RELEASE.  Some of the deadlocks may be hard to fix
      without disproportionate measures, but others probably should be fixed
      - but not in 12.
      
      We discussed removing the new tests until we can fix the issues
      underlying the deadlocks, but results from buildfarm animal
      markhor (which runs with CLOBBER_CACHE_ALWAYS) indicates that there
      might be a more severe, as of yet undiagnosed, issue (including on
      stable branches) with reindexing catalogs. The failure is:
      ERROR: could not read block 0 in file "base/16384/28025": read only 0 of 8192 bytes
      Therefore it seems advisable to keep the tests.
      
      It's not certain that running the tests in isolation removes the risk
      of deadlocks. It's possible that additional locks are needed to
      protect against a concurrent auto-analyze or such.
      
      Per discussion with Tom Lane.
      
      Discussion: https://postgr.es/m/28926.1556664156@sss.pgh.pa.us
      Backpatch: 9.4-, like 3dbb317d
      809c9b48
    • Andres Freund's avatar
      Fix unused variable compiler warning in !debug builds. · 4b40d40b
      Andres Freund authored
      Introduced in 3dbb317d.  Fix by using the new local variable in more
      places.
      
      Reported-By: Bruce Momjian (off-list)
      Backpatch: 9.4-, like 3dbb317d
      4b40d40b
  2. 30 Apr, 2019 10 commits
    • Andres Freund's avatar
      b06a354e
    • Andres Freund's avatar
    • Andres Freund's avatar
      Improve code inferring length of bitmap for JITed tuple deforming. · 3a48005b
      Andres Freund authored
      While discussing comment improvements (see next commit) by Justin
      Pryzby, Tom complained about a few details of the logic to infer the
      length of the NULL bitmap when building the JITed tuple deforming
      function. That bitmap allows to avoid checking the tuple header's
      natts, a check which often causes a pipeline stall
      
      Improvements:
      a) As long as missing columns aren't taken into account, we can
         continue to infer the length of the NULL bitmap from NOT NULL
         columns following it. Previously we stopped at the first missing
         column.  It's unlikely to matter much in practice, but the
         alternative would have been to document why we stop.
      b) For robustness reasons it seems better to also check against
         attisdropped - RemoveAttributeById() sets attnotnull to false, but
         an additional check is trivial.
      c) Improve related comments
      
      Discussion: https://postgr.es/m/20637.1555957068@sss.pgh.pa.us
      Backpatch: -
      3a48005b
    • Tom Lane's avatar
      Clean up handling of constraint_exclusion and enable_partition_pruning. · e03ff739
      Tom Lane authored
      The interaction of these parameters was a bit confused/confusing,
      and in fact v11 entirely misses the opportunity to apply partition
      constraints when a partition is accessed directly (rather than
      indirectly from its parent).
      
      In HEAD, establish the principle that enable_partition_pruning controls
      partition pruning and nothing else.  When accessing a partition via its
      parent, we do partition pruning (if enabled by enable_partition_pruning)
      and then there is no need to consider partition constraints in the
      constraint_exclusion logic.  When accessing a partition directly, its
      partition constraints are applied by the constraint_exclusion logic,
      only if constraint_exclusion = on.
      
      In v11, we can't have such a clean division of these GUCs' effects,
      partly because we don't want to break compatibility too much in a
      released branch, and partly because the clean coding requires
      inheritance_planner to have applied partition pruning to a partitioned
      target table, which it doesn't in v11.  However, we can tweak things
      enough to cover the missed case, which seems like a good idea since
      it's potentially a performance regression from v10.  This patch keeps
      v11's previous behavior in which enable_partition_pruning overrides
      constraint_exclusion for an inherited target table, though.
      
      In HEAD, also teach relation_excluded_by_constraints that it's okay to use
      inheritable constraints when trying to prune a traditional inheritance
      tree.  This might not be thought worthy of effort given that that feature
      is semi-deprecated now, but we have enough infrastructure that it only
      takes a couple more lines of code to do it correctly.
      
      Amit Langote and Tom Lane
      
      Discussion: https://postgr.es/m/9813f079-f16b-61c8-9ab7-4363cab28d80@lab.ntt.co.jp
      Discussion: https://postgr.es/m/29069.1555970894@sss.pgh.pa.us
      e03ff739
    • Bruce Momjian's avatar
      ad23adc5
    • Bruce Momjian's avatar
    • Alvaro Herrera's avatar
      Message style fixes · 9f8b717a
      Alvaro Herrera authored
      9f8b717a
    • Alvaro Herrera's avatar
      Widen tuple counter variables from long to int64 · 9a83afec
      Alvaro Herrera authored
      Mistake in ab0dfc96; progress reporting would have wrapped around
      for indexes created with more than 2^31 tuples.
      
      Reported-by: Peter Geoghegan
      Discussion: https://postgr.es/m/CAH2-Wz=WbNxc5ob5NJ9yqo2RMJ0q4HXDS30GVCobeCvC9A1L9A@mail.gmail.com
      9a83afec
    • Andres Freund's avatar
      Fix potential assertion failure when reindexing a pg_class index. · 3dbb317d
      Andres Freund authored
      When reindexing individual indexes on pg_class it was possible to
      either trigger an assertion failure:
      TRAP: FailedAssertion("!(!ReindexIsProcessingIndex(((index)->rd_id)))
      
      That's because reindex_index() called SetReindexProcessing() - which
      enables an asserts ensuring no index insertions happen into the index
      - before calling RelationSetNewRelfilenode(). That not correct for
      indexes on pg_class, because RelationSetNewRelfilenode() updates the
      relevant pg_class row, which needs to update the indexes.
      
      The are two reasons this wasn't noticed earlier. Firstly the bug
      doesn't trigger when reindexing all of pg_class, as reindex_relation
      has code "hiding" all yet-to-be-reindexed indexes. Secondly, the bug
      only triggers when the the update to pg_class doesn't turn out to be a
      HOT update - otherwise there's no index insertion to trigger the
      bug. Most of the time there's enough space, making this bug hard to
      trigger.
      
      To fix, move RelationSetNewRelfilenode() to before the
      SetReindexProcessing() (and, together with some other code, to outside
      of the PG_TRY()).
      
      To make sure the error checking intended by SetReindexProcessing() is
      more robust, modify CatalogIndexInsert() to check
      ReindexIsProcessingIndex() even when the update is a HOT update.
      
      Also add a few regression tests for REINDEXing of system catalogs.
      
      The last two improvements would have prevented some of the issues
      fixed in 5c156060 from being introduced in the first place.
      
      Reported-By: Michael Paquier
      Diagnosed-By: Tom Lane and Andres Freund
      Author: Andres Freund
      Reviewed-By: Tom Lane
      Discussion: https://postgr.es/m/20190418011430.GA19133@paquier.xyz
      Backpatch: 9.4-, the bug is present in all branches
      3dbb317d
    • Andres Freund's avatar
      Fix several recently introduced issues around handling new relation forks. · 5c156060
      Andres Freund authored
      Most of these stem from d25f5191 "tableam: relation creation, VACUUM
      FULL/CLUSTER, SET TABLESPACE.".
      
      1) To pass data to the relation_set_new_filenode()
         RelationSetNewRelfilenode() was made to update RelationData.rd_rel
         directly. That's not OK however, as it makes the relcache entries
         temporarily inconsistent. Which among other scenarios is a problem
         if a REINDEX targets an index on pg_class - the
         CatalogTupleUpdate() in RelationSetNewRelfilenode().  Presumably
         that was introduced because other places in the code do so - while
         those aren't "good practice" they don't appear to be actively
         buggy (e.g. because system tables may not be targeted).
      
         I (Andres) should have caught this while reviewing and signficantly
         evolving the code in that commit, mea culpa.
      
         Fix that by instead passing in the new RelFileNode as separate
         argument to relation_set_new_filenode() and rely on the relcache to
         update the catalog entry. Also revert that the
         RelationMapUpdateMap() call was changed to immediate, and undo some
         other more unnecessary changes.
      
      2) Document that the relation_set_new_filenode cannot rely on the
         whole relcache entry to be valid. It might be worthwhile to
         refactor the code to never have to rely on that, but given the way
         heap_create() is currently coded, that'd be a large change.
      
      3) ATExecSetTableSpace() shouldn't do FlushRelationBuffers() itself. A
         table AM might not use shared buffers at all. Move to
         index_copy_data() and heapam_relation_copy_data().
      
      4) heapam_relation_set_new_filenode() previously sometimes accessed
         rel->rd_rel->relpersistence rather than the `persistence`
         argument. Code movement mistake.
      
      5) Previously heapam_relation_set_new_filenode() re-opened the smgr
         relation to create the init for, if necesary. Instead have
         RelationCreateStorage() return the SMgrRelation and use it to
         create the init fork.
      
      6) Add a note about the danger of modifying the relcache directly to
         ATExecSetTableSpace() - it's currently not a bug because there's a
         check ERRORing for catalog tables.
      
      Regression tests and assertion improvements that together trigger the
      bug described in 1) will be added in a later commit, as there is a
      related bug on all branches.
      
      Reported-By: Michael Paquier
      Diagnosed-By: Tom Lane and Andres Freund
      Author: Andres Freund
      Reviewed-By: Tom Lane
      Discussion: https://postgr.es/m/20190418011430.GA19133@paquier.xyz
      5c156060
  3. 29 Apr, 2019 5 commits
    • Peter Geoghegan's avatar
      Remove obsolete _bt_insert_parent() comment. · 9ee7414e
      Peter Geoghegan authored
      Remove a comment that refers to a coding practice that was fully removed
      by commit a8b8f4db, which introduced MarkBufferDirty().  It looks like
      the comment was even obsolete before then, since it concerns
      write-ordering dependencies with synchronous buffer writes.
      9ee7414e
    • Tom Lane's avatar
      In walreceiver, don't try to do ereport() in a signal handler. · a1a789eb
      Tom Lane authored
      This is quite unsafe, even for the case of ereport(FATAL) where we won't
      return control to the interrupted code, and despite this code's use of
      a flag to restrict the areas where we'd try to do it.  It's possible
      for example that we interrupt malloc or free while that's holding a lock
      that's meant to protect against cross-thread interference.  Then, any
      attempt to do malloc or free within ereport() will result in a deadlock,
      preventing the walreceiver process from exiting in response to SIGTERM.
      We hypothesize that this explains some hard-to-reproduce failures seen
      in the buildfarm.
      
      Hence, get rid of the immediate-exit code in WalRcvShutdownHandler,
      as well as the logic associated with WalRcvImmediateInterruptOK.
      Instead, we need to take care that potentially-blocking operations
      in the walreceiver's data transmission logic (libpqwalreceiver.c)
      will respond reasonably promptly to the process's latch becoming
      set and then call ProcessWalRcvInterrupts.  Much of the needed code
      for that was already present in libpqwalreceiver.c.  I refactored
      things a bit so that all the uses of PQgetResult use latch-aware
      waiting, but didn't need to do much more.
      
      These changes should be enough to ensure that libpqwalreceiver.c
      will respond promptly to SIGTERM whenever it's waiting to receive
      data.  In principle, it could block for a long time while waiting
      to send data too, and this patch does nothing to guard against that.
      I think that that hazard is mostly theoretical though: such blocking
      should occur only if we fill the kernel's data transmission buffers,
      and we don't generally send enough data to make that happen without
      waiting for input.  If we find out that the hazard isn't just
      theoretical, we could fix it by using PQsetnonblocking, but that
      would require more ticklish changes than I care to make now.
      
      This is a bug fix, but it seems like too big a change to push into
      the back branches without much more testing than there's time for
      right now.  Perhaps we'll back-patch once we have more confidence
      in the change.
      
      Patch by me; thanks to Thomas Munro for review.
      
      Discussion: https://postgr.es/m/20190416070119.GK2673@paquier.xyz
      a1a789eb
    • Michael Paquier's avatar
    • Alvaro Herrera's avatar
      Message fixes · ffbce803
      Alvaro Herrera authored
      ffbce803
    • Peter Eisentraut's avatar
      Fix potential catalog corruption with temporary identity columns · cd3e2746
      Peter Eisentraut authored
      If a temporary table with an identity column and ON COMMIT DROP is
      created in a single-statement transaction (not useful, but allowed),
      it would leave the catalog corrupted.  We need to add a
      CommandCounterIncrement() so that PreCommit_on_commit_actions() sees
      the created dependency between table and sequence and can clean it
      up.
      
      The analogous and more useful case of doing this in a transaction
      block already runs some CommandCounterIncrement() before it gets to
      the on-commit cleanup, so it wasn't a problem in practical use.
      
      Several locations for placing the new CommandCounterIncrement() call
      were discussed.  This patch places it at the end of
      standard_ProcessUtility().  That would also help if other commands
      were to create catalog entries that some on-commit action would like
      to see.
      
      Bug: #15631
      Reported-by: default avatarSerge Latyntsev <dnsl48@gmail.com>
      Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
      Reviewed-by: default avatarMichael Paquier <michael@paquier.xyz>
      cd3e2746
  4. 28 Apr, 2019 4 commits
    • Tom Lane's avatar
      Do pre-release housekeeping on catalog data, and fix jsonpath send/recv. · c3f67ed6
      Tom Lane authored
      Run renumber_oids.pl to move high-numbered OIDs down, as per pre-beta
      tasks specified by RELEASE_CHANGES.  (The only change is 8394 -> 3428.)
      
      Also run reformat_dat_file.pl while I'm here.
      
      While looking at the reformat diffs, I chanced to notice that type
      jsonpath had typsend and typreceive = '-', which surely is not the
      intention given that jsonpath_send and jsonpath_recv exist.
      Fix that.  It's safe to assume that these functions have never been
      tested :-(.  I didn't try, but somebody should.
      c3f67ed6
    • Noah Misch's avatar
      Use preprocessor conditions compatible with Emacs indent. · 90e7f317
      Noah Misch authored
      Emacs wrongly indented hundreds of subsequent lines.
      90e7f317
    • Tom Lane's avatar
      Clean up minor warnings from buildfarm. · e481d262
      Tom Lane authored
      Be more consistent about use of XXXGetDatum macros in new jsonpath
      code.  This is mostly to avoid having code that looks randomly
      different from everyplace else that's doing the exact same thing.
      
      In pg_regress.c, avoid an unreferenced-function warning from
      compilers that don't understand pg_attribute_unused().  Putting
      the function inside the same #ifdef as its only caller is more
      straightforward coding anyway.
      
      In be-secure-openssl.c, avoid use of pg_attribute_unused() on a label.
      That's pretty creative, but there's no good reason to suppose that
      it's portable, and there's absolutely no need to use goto's here in the
      first place.  (This wasn't actually causing any buildfarm complaints,
      but it's new code in v12 so it has no portability track record.)
      e481d262
    • Michael Paquier's avatar
      Fix more typos and inconsistencies in documentation · ac862376
      Michael Paquier authored
      This fixes a couple of grammar mistakes, typos and inconsistencies in
      the documentation.  Particularly, the configuration parsing allows only
      "kB" to mean kilobyte but there were references in the docs to "KB".
      Some instances of the latter are still in the code comments.  Some
      parameter values were mentioned with "Minus-one", and using directly
      "-1" with proper markups is more helpful to the reader.
      
      Some of these have been pointed out by Justin, and some others are
      things I bumped into.
      
      Author: Justin Pryzby, Michael Paquier
      Reviewed-by: Tom Lane
      Discussion: https://postgr.es/m/20190330224333.GQ5815@telsasoft.com
      ac862376
  5. 27 Apr, 2019 7 commits
    • Tom Lane's avatar
      Avoid postgres_fdw crash for a targetlist entry that's just a Param. · 8cad5adb
      Tom Lane authored
      foreign_grouping_ok() is willing to put fairly arbitrary expressions into
      the targetlist of a remote SELECT that's doing grouping or aggregation on
      the remote side, including expressions that have no foreign component to
      them at all.  This is possibly a bit dubious from an efficiency standpoint;
      but it rises to the level of a crash-causing bug if the expression is just
      a Param or non-foreign Var.  In that case, the expression will necessarily
      also appear in the fdw_exprs list of values we need to send to the remote
      server, and then setrefs.c's set_foreignscan_references will mistakenly
      replace the fdw_exprs entry with a Var referencing the targetlist result.
      
      The root cause of this problem is bad design in commit e7cb7ee1: it put
      logic into set_foreignscan_references that IMV is postgres_fdw-specific,
      and yet this bug shows that it isn't postgres_fdw-specific enough.  The
      transformation being done on fdw_exprs assumes that fdw_exprs is to be
      evaluated with the fdw_scan_tlist as input, which is not how postgres_fdw
      uses it; yet it could be the right thing for some other FDW.  (In the
      bigger picture, setrefs.c has no business assuming this for the other
      expression fields of a ForeignScan either.)
      
      The right fix therefore would be to expand the FDW API so that the
      FDW could inform setrefs.c how it intends to evaluate these various
      expressions.  We can't change that in the back branches though, and we
      also can't just summarily change setrefs.c's behavior there, or we're
      likely to break external FDWs.
      
      As a stopgap, therefore, hack up postgres_fdw so that it won't attempt
      to send targetlist entries that look exactly like the fdw_exprs entries
      they'd produce.  In most cases this actually produces a superior plan,
      IMO, with less data needing to be transmitted and returned; so we probably
      ought to think harder about whether we should ship tlist expressions at
      all when they don't contain any foreign Vars or Aggs.  But that's an
      optimization not a bug fix so I left it for later.  One case where this
      produces an inferior plan is where the expression in question is actually
      a GROUP BY expression: then the restriction prevents us from using remote
      grouping.  It might be possible to work around that (since that would
      reduce to group-by-a-constant on the remote side); but it seems like a
      pretty unlikely corner case, so I'm not sure it's worth expending effort
      solely to improve that.  In any case the right long-term answer is to fix
      the API as sketched above, and then revert this hack.
      
      Per bug #15781 from Sean Johnston.  Back-patch to v10 where the problem
      was introduced.
      
      Discussion: https://postgr.es/m/15781-2601b1002bad087c@postgresql.org
      8cad5adb
    • Joe Conway's avatar
      Add viewBox attribute to storage page layout SVG image · 29046c44
      Joe Conway authored
      Recently added SVG image for storage page layout lacks
      a viewBox attribute which seems necessary to ensure propoer
      rendering. Add it.
      
      Author: Jonathan Katz
      Discussion: https://postgr.es/m/ba31e0e1-4c9b-b309-70e8-8e7ac14fc87e%40postgresql.org
      29046c44
    • Joe Conway's avatar
      Add guidance on making documentation SVG images responsive · 7dc78d8e
      Joe Conway authored
      Recently added guidance on adding SVG images to the documentation
      sources lacks advice on making the images responsive when rendered
      in a variety of media types and viewports. Add some.
      
      Patch by Jonathan Katz with some editorialization by me.
      
      Author: Jonathan Katz
      Discussion: https://postgr.es/m/6358ae6f-7191-a02b-e7b5-68050636ae71@postgresql.org
      7dc78d8e
    • Joe Conway's avatar
      Correct the URL pointing to PL/R · cf3ff97a
      Joe Conway authored
      As pointed out by documentation comment, the URL for PL/R
      needs to be updated to the correct current repository. Back-patch
      to all supported branches.
      cf3ff97a
    • Peter Eisentraut's avatar
      Update config.guess and config.sub · ddcaa596
      Peter Eisentraut authored
      ddcaa596
    • Tom Lane's avatar
      Portability fix for zic.c. · 48f8fa9c
      Tom Lane authored
      Missed an inttypes.h dependency in previous patch.  Per buildfarm.
      48f8fa9c
    • Michael Paquier's avatar
      Mention REINDEX CONCURRENTLY in documentation about index maintenance · a9678784
      Michael Paquier authored
      The documentation includes a section about index maintenance and
      reindexing, mentioning a set of steps based on CREATE INDEX CONCURRENTLY
      and ALTER TABLE (for constraint dependencies) to emulate REINDEX
      CONCURRENTLY.  Now that REINDEX CONCURRENTLY is supported, let's just
      directly mention it instead.
      
      Reported-by: Peter Geoghegan
      Author: Michael Paquier
      Reviewed-by: Peter Eisentraut, Tom Lane
      Discussion: https://postgr.es/m/CAH2-WzmEL168t6w29aKrKXtpq9-apcmp0HC7K-fKt6ZgLXV6Dg@mail.gmail.com
      a9678784
  6. 26 Apr, 2019 7 commits
    • Tom Lane's avatar
      Sync our copy of the timezone library with IANA release tzcode2019a. · acb897b8
      Tom Lane authored
      This corrects a small bug in zic that caused it to output an incorrect
      year-2440 transition in the Africa/Casablanca zone.
      
      More interestingly, zic has grown a "-r" option that limits the range of
      zone transitions that it will put into the output files.  That might be
      useful to people who don't like the weird GMT offsets that tzdb likes
      to use for very old dates.  It appears that for dates before the cutoff
      time specified with -r, zic will use the zone's standard-time offset
      as of the cutoff time.  So for example one might do
      
      	make install ZIC_OPTIONS='-r @-1893456000'
      
      to cause all dates before 1910-01-01 to be treated as though 1910
      standard time prevailed indefinitely far back.  (Don't blame me for
      the unfriendly way of specifying the cutoff time --- it's seconds
      since or before the Unix epoch.  You can use extract(epoch ...)
      to calculate it.)
      
      As usual, back-patch to all supported branches.
      acb897b8
    • Tom Lane's avatar
      Update time zone data files to tzdata release 2019a. · d312de3f
      Tom Lane authored
      DST law changes in Palestine and Metlakatla.
      Historical corrections for Israel.
      
      Etc/UCT is now a backward-compatibility link to Etc/UTC, instead
      of being a separate zone that generates the abbreviation "UCT",
      which nowadays is typically a typo.  Postgres will still accept
      "UCT" as an input zone name, but it won't output it.
      d312de3f
    • Peter Eisentraut's avatar
      Update key words table for version 12 · 686fef22
      Peter Eisentraut authored
      686fef22
    • Tom Lane's avatar
      Apply stopgap fix for bug #15672. · c01eb619
      Tom Lane authored
      Fix DefineIndex so that it doesn't attempt to pass down a to-be-reused
      index relfilenode to a child index creation, and fix TryReuseIndex
      to not think that reuse is sensible for a partitioned index.
      
      In v11, this fixes a problem where ALTER TABLE on a partitioned table
      could assign the same relfilenode to several different child indexes,
      causing very nasty catalog corruption --- in fact, attempting to DROP
      the partitioned table then leads not only to a database crash, but to
      inability to restart because the same crash will recur during WAL replay.
      
      Either of these two changes would be enough to prevent the failure, but
      since neither action could possibly be sane, let's put in both changes
      for future-proofing.
      
      In HEAD, no such bug manifests, but that's just an accidental consequence
      of having changed the pg_class representation of partitioned indexes to
      have relfilenode = 0.  Both of these changes still seem like smart
      future-proofing.
      
      This is only a stop-gap because the code for ALTER TABLE on a partitioned
      table with a no-op type change still leaves a great deal to be desired.
      As the added regression tests show, it gets things wrong for comments on
      child indexes/constraints, and it is regenerating child indexes it doesn't
      have to.  However, fixing those problems will take more work which may not
      get back-patched into v11.  We need a fix for the corruption problem now.
      
      Per bug #15672 from Jianing Yang.
      
      Patch by me, regression test cases based on work by Amit Langote,
      who also did a lot of the investigative work.
      
      Discussion: https://postgr.es/m/15672-b9fa7db32698269f@postgresql.org
      c01eb619
    • Alvaro Herrera's avatar
      pg_dump: store unused attribs as NULL instead of '\0' · 7fcdb5e0
      Alvaro Herrera authored
      Commit f831d4ac changed pg_dump to emit (and pg_restore to
      understand) NULLs for unused members in ArchiveEntry structs, as a side
      effect of some code beautification.  That broke pg_restore of dumps
      generated with older pg_dump, however, so it was reverted in
      19455c9f.  Since the archiver version number has been bumped in
      3b925e90, we can put it back.
      
      Author: Dmitry Dolgov
      Discussion: https://postgr.es/m/CA+q6zcXx0XHqLsFJLaUU2j5BDiBAHig=YRoBC_YVq7VJGvzBEA@mail.gmail.com
      7fcdb5e0
    • Peter Eisentraut's avatar
      doc: Update section on NFS · 60bbf075
      Peter Eisentraut authored
      The old section was ancient and didn't seem very helpful.  Here, we
      add some concrete advice on particular mount options.
      Reviewed-by: default avatarJoe Conway <mail@joeconway.com>
      Discussion: https://www.postgresql.org/message-id/flat/e90f24bb-5423-6abb-58ec-501176eb4afc%402ndquadrant.com
      60bbf075
    • Etsuro Fujita's avatar
      Add FDW documentation notes about insert and update tuple routing and COPY. · 90fca7a3
      Etsuro Fujita authored
      Author: Laurenz Albe and Etsuro Fujita
      Reviewed-by: Laurenz Albe and Amit Langote
      Backpatch-through: 11 where support for that by FDWs was added
      Discussion: https://postgr.es/m/bf36a0288e8f31b4f2f40952e225bf892dc1ffc5.camel@cybertec.at
      90fca7a3
  7. 25 Apr, 2019 4 commits
    • Peter Geoghegan's avatar
      Sanitize line pointers within contrib/amcheck. · a9ce839a
      Peter Geoghegan authored
      Adopt a more defensive approach to accessing index tuples in
      contrib/amcheck: verify that each line pointer looks sane before
      accessing associated tuple using pointer arithmetic based on line
      pointer's offset.  This avoids undefined behavior and assertion failures
      in cases where line pointers are corrupt.
      
      Issue spotted following a complaint about an assertion failure by
      Grigory Smolkin, which involved a test harness that deliberately
      corrupts indexes.
      
      This is arguably a bugfix, but no backpatch given the lack of field
      reports beyond Grigory's.
      
      Discussion: https://postgr.es/m/CAH2-WzmkurhCqnyLHxk0VkOZqd49+ZZsp1xAJOg7j2x7dmp_XQ@mail.gmail.com
      a9ce839a
    • Alvaro Herrera's avatar
      Fix partitioned index attachment · 05b38c7e
      Alvaro Herrera authored
      When an existing index in a partition is attached to a new index on
      its parent, we forgot to set the "relispartition" flag correctly, which
      meant that it was not possible to find the index in various operations,
      such as adding a foreign key constraint that references that partitioned
      table.  One of four places that was assigning the parent index was
      forgetting to do that, so fix by shifting responsibility of updating the
      flag to the routine that changes the parent.
      
      Author: Amit Langote, Álvaro Herrera
      Reported-by: Hubert "depesz" Lubaczewski
      Discussion: https://postgr.es/m/CA+HiwqHMsRtRYRWYTWavKJ8x14AFsv7bmAV46mYwnfD3vy8goQ@mail.gmail.com
      05b38c7e
    • Fujii Masao's avatar
      Fix file path in comment. · c247ae09
      Fujii Masao authored
      c247ae09
    • Fujii Masao's avatar
      Fix function names in comments. · 978b032d
      Fujii Masao authored
      Commit 3eb77eba renamed some functions, but forgot to
      update some comments referencing to those functions.
      This commit fixes those function names in the comments.
      
      Kyotaro Horiguchi
      978b032d