1. 12 Feb, 2020 4 commits
    • Andres Freund's avatar
      Try to harden insert-conflict-specconflict against autovacuum. · 997563df
      Andres Freund authored
      Looks like guaibasaurus had a autovacuum running during the
      controller_print_speculative_locks step (just added in
      43e08419). Which does indeed seem quite possible.
      
      Avoid the problem by only looking for the backends participating in
      the test.
      997563df
    • Michael Paquier's avatar
      Add %x to default PROMPT1 and PROMPT2 in psql · dcdbb5a5
      Michael Paquier authored
      %d can be used to track if the current connection is in a transaction
      block or not, and adding it by default to the prompt has the advantage
      to not need a modification of .psqlrc, something not possible depending
      on the environment.
      
      This discussion has happened across various sources, and there was a
      strong consensus in favor of this change.
      
      Author: Vik Fearing
      Reviewed-by: Fabien Coelho
      Discussion: https://postgr.es/m/09502c40-cfe1-bb29-10f9-4b3fa7b2bbb2@2ndquadrant.com
      dcdbb5a5
    • Andres Freund's avatar
      Test additional speculative conflict scenarios. · 43e08419
      Andres Freund authored
      Previously, the speculative insert tests did not cover the case when a
      tuple t is inserted into a table with a unique index on a column but
      before it can insert into the index, a concurrent transaction has
      inserted a conflicting value into the index and the insertion of tuple t
      must be aborted.
      
      The basic permutation is one session successfully inserts into the table
      and an associated unique index while a concurrent session successfully
      inserts into the table but discovers a conflict before inserting into
      the index and must abort the insertion.
      
      Several variants on this include:
      - swap which session is successful
      - first session insert transaction does not commit, so second session
      must wait on a transaction lock
      - first session insert does not "complete", so second session must wait
      on a speculative insertion lock
      
      Also, refactor the existing TOAST table upsert test to be in the same
      spec and reuse the steps.
      
      Author: Melanie Plageman, Ashwin Agrawal, Andres Freund
      Reviewed-by: Andres Freund, Taylor Vesely
      Discussion: https://postgr.es/m/CAAKRu_ZRmxy_OEryfY3G8Zp01ouhgw59_-_Cm8n7LzRH5BAvng@mail.gmail.com
      43e08419
    • Fujii Masao's avatar
      Fix bug in pg_basebackup -F plain -R. · be6221e9
      Fujii Masao authored
      Commit caba97a9 changed pg_basebackup -F plain -R so that
      it overwrote postgresql.auto.conf in the backup, with new connection
      setting. This could cause the existing postgresql.auto.conf settings
      in the server to get lost unexpectedly. This is a bug.
      
      This commit fixes the bug by making pg_basebackup -F plain -R
      append the connection setting into postgresql.auto.conf in the backup.
      
      Author: Fujii Masao
      Reviewed-by: Sergei Kornilov
      Discussion: https://postgr.es/m/250dcf2a-94e7-c05e-824a-73cfb38a48a4@oss.nttdata.com
      be6221e9
  2. 11 Feb, 2020 2 commits
  3. 10 Feb, 2020 11 commits
  4. 09 Feb, 2020 2 commits
  5. 07 Feb, 2020 12 commits
  6. 06 Feb, 2020 7 commits
  7. 05 Feb, 2020 2 commits
    • Andrew Gierth's avatar
      Force tuple conversion when the source has missing attributes. · bf6cc19e
      Andrew Gierth authored
      Tuple conversion incorrectly concluded that no conversion was needed
      as long as all the attributes lined up. But if the source tuple has a
      missing attribute (from addition of a column with default), then the
      destination tupdesc might not reflect the same default. The typical
      symptom was that the affected columns would be unexpectedly NULL.
      
      Repair by always forcing conversion if the source has missing
      attributes, which will be filled in by the deform operation. (In
      theory we could optimize for when the destination has the same
      default, but that seemed overkill.)
      
      Backpatch to 11 where missing attributes were added.
      
      Per bug #16242.
      
      Vik Fearing (discovery, code, testing) and me (analysis, testcase).
      
      Discussion: https://postgr.es/m/16242-d1c9fca28445966b@postgresql.org
      bf6cc19e
    • Alvaro Herrera's avatar
      Make vacuum buffer counters 64 bits wide · 15d13e82
      Alvaro Herrera authored
      Using 32 bit counters means they can now realistically wrap around when
      vacuuming extremely large tables.  Because they're signed integers,
      stats printed by vacuum look very odd when they do.
      
      We'd love to backpatch this, but refrain because the variables are
      exported and could cause third-party code to break.
      
      Reviewed-by: Julien Rouhaud, Tom Lane, Michael Paquier
      Discussion: https://postgr.es/m/20200131205926.GA16367@alvherre.pgsql
      15d13e82