1. 12 Feb, 2020 6 commits
    • Tom Lane's avatar
      Remove long-dead comments. · 0973f560
      Tom Lane authored
      These should've been dropped by a8bb8eb5, but evidently were
      missed.  Not important enough to back-patch.
      0973f560
    • Tom Lane's avatar
      Doc: fix old oversights in GRANT/REVOKE documentation. · dce98814
      Tom Lane authored
      The GRANTED BY clause in GRANT/REVOKE ROLE has been there since 2005
      but was never documented.  I'm not sure now whether that was just an
      oversight or was intentional (given the limited capability of the
      option).  But seeing that pg_dumpall does emit code that uses this
      option, it seems like not documenting it at all is a bad idea.
      
      Also, when we upgraded the syntax to allow CURRENT_USER/SESSION_USER
      as the privilege recipient, the role form of GRANT was incorrectly
      not modified to show that, and REVOKE's docs weren't touched at all.
      
      Although I'm not that excited about GRANTED BY, the other oversight
      seems serious enough to justify a back-patch.
      
      Discussion: https://postgr.es/m/3070.1581526786@sss.pgh.pa.us
      dce98814
    • 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