pgsql: Add tab completion for CREATE OR REPLACE in psql.

2019-09-13 Thread Fujii Masao
Add tab completion for CREATE OR REPLACE in psql. Author: Shenhao Wang Discussion: https://postgr.es/m/63580B24E208E3429D94153A03C68E0901AA8002D5@G08CNEXMBPEKD02.g08.fujitsu.local Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fc16778873d081b07930d642622ee0cf22c3f

pgsql: Typo fixes for documentation

2019-09-13 Thread Alexander Korotkov
Typo fixes for documentation Discussion: https://postgr.es/m/CAEkD-mDUZrRE%3Dk-FznEg4Ed2VdjpZCyHoyo%2Bp0%2B8KvHqR%3DpNVQ%40mail.gmail.com Author: Liudmila Mantrova, Alexander Lakhin Reviewed-by: Alexander Korotkov, Alvaro Herrera Backpatch-through: 12 Branch -- master Details --- https:

pgsql: Documentation improvements to jsonpath

2019-09-13 Thread Alexander Korotkov
Documentation improvements to jsonpath Besides cosmetic improvements it removes statement that operators necessary need to be separated from operands with spaces, which is not really true. Discussion: https://postgr.es/m/CAEkD-mDUZrRE%3Dk-FznEg4Ed2VdjpZCyHoyo%2Bp0%2B8KvHqR%3DpNVQ%40mail.gmail.co

pgsql: Typo fixes for documentation

2019-09-13 Thread Alexander Korotkov
Typo fixes for documentation Discussion: https://postgr.es/m/CAEkD-mDUZrRE%3Dk-FznEg4Ed2VdjpZCyHoyo%2Bp0%2B8KvHqR%3DpNVQ%40mail.gmail.com Author: Liudmila Mantrova, Alexander Lakhin Reviewed-by: Alexander Korotkov, Alvaro Herrera Backpatch-through: 12 Branch -- REL_12_STABLE Details ---

pgsql: Documentation improvements to jsonpath

2019-09-13 Thread Alexander Korotkov
Documentation improvements to jsonpath Besides cosmetic improvements it removes statement that operators necessary need to be separated from operands with spaces, which is not really true. Discussion: https://postgr.es/m/CAEkD-mDUZrRE%3Dk-FznEg4Ed2VdjpZCyHoyo%2Bp0%2B8KvHqR%3DpNVQ%40mail.gmail.co

pgsql: Fix progress reporting of CLUSTER / VACUUM FULL

2019-09-13 Thread Alvaro Herrera
Fix progress reporting of CLUSTER / VACUUM FULL The progress state was being clobbered once the first index completed being rebuilt, causing the final phases of the operation not show anything in the progress view. This was inadvertently broken in 03f9e5cba0ee, which added progress tracking for R

pgsql: Fix progress reporting of CLUSTER / VACUUM FULL

2019-09-13 Thread Alvaro Herrera
Fix progress reporting of CLUSTER / VACUUM FULL The progress state was being clobbered once the first index completed being rebuilt, causing the final phases of the operation not show anything in the progress view. This was inadvertently broken in 03f9e5cba0ee, which added progress tracking for R

Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL

2019-09-13 Thread Tom Lane
Alvaro Herrera writes: > Fix progress reporting of CLUSTER / VACUUM FULL Not a new problem of this patch, exactly, but: /* Reindex options */ #define REINDEXOPT_VERBOSE 1 << 0 /* print progress info */ +#define REINDEXOPT_REPORT_PROGRESS 1 << 1 /* report pgstat progress */ Surely these mac

Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL

2019-09-13 Thread Alvaro Herrera
On 2019-Sep-13, Tom Lane wrote: > Alvaro Herrera writes: > > Fix progress reporting of CLUSTER / VACUUM FULL > > Not a new problem of this patch, exactly, but: > > /* Reindex options */ > #define REINDEXOPT_VERBOSE 1 << 0 /* print progress info */ > +#define REINDEXOPT_REPORT_PROGRESS 1 <<

pgsql: Fix under-parenthesized macro definitions

2019-09-13 Thread Alvaro Herrera
Fix under-parenthesized macro definitions Lack of parens in the definitions could cause a statement using these macros to have unexpected semantics. In current code no bug is apparent, but best to fix the definitions to avoid problems down the line. Reported-by: Tom Lane Discussion: https://post

pgsql: Fix under-parenthesized macro definitions

2019-09-13 Thread Alvaro Herrera
Fix under-parenthesized macro definitions Lack of parens in the definitions could cause a statement using these macros to have unexpected semantics. In current code no bug is apparent, but best to fix the definitions to avoid problems down the line. Reported-by: Tom Lane Discussion: https://post

pgsql: Fix under-parenthesized macro definitions

2019-09-13 Thread Alvaro Herrera
Fix under-parenthesized macro definitions Lack of parens in the definitions could cause a statement using these macros to have unexpected semantics. In current code no bug is apparent, but best to fix the definitions to avoid problems down the line. Reported-by: Tom Lane Discussion: https://post

pgsql: Fix under-parenthesized macro definitions

2019-09-13 Thread Alvaro Herrera
Fix under-parenthesized macro definitions Lack of parens in the definitions could cause a statement using these macros to have unexpected semantics. In current code no bug is apparent, but best to fix the definitions to avoid problems down the line. Reported-by: Tom Lane Discussion: https://post

pgsql: Fix under-parenthesized macro definitions

2019-09-13 Thread Alvaro Herrera
Fix under-parenthesized macro definitions Lack of parens in the definitions could cause a statement using these macros to have unexpected semantics. In current code no bug is apparent, but best to fix the definitions to avoid problems down the line. Reported-by: Tom Lane Discussion: https://post

pgsql: Fix under-parenthesized macro definitions

2019-09-13 Thread Alvaro Herrera
Fix under-parenthesized macro definitions Lack of parens in the definitions could cause a statement using these macros to have unexpected semantics. In current code no bug is apparent, but best to fix the definitions to avoid problems down the line. Reported-by: Tom Lane Discussion: https://post

Re: pgsql: Fix progress reporting of CLUSTER / VACUUM FULL

2019-09-13 Thread Alvaro Herrera
On 2019-Sep-13, Tom Lane wrote: > Not a new problem of this patch, exactly, but: > > /* Reindex options */ > #define REINDEXOPT_VERBOSE 1 << 0 /* print progress info */ > +#define REINDEXOPT_REPORT_PROGRESS 1 << 1 /* report pgstat progress */ > > Surely these macro definitions are incredibl

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: logical decoding: process ASSIGNMENT during snapshot build

2019-09-13 Thread Alvaro Herrera
logical decoding: process ASSIGNMENT during snapshot build Most WAL records are ignored in early SnapBuild snapshot build phases. But it's critical to process some of them, so that later messages have the correct transaction state after the snapshot is completely built; in particular, XLOG_XACT_AS

pgsql: Make tuplesort_set_bound() assertions more comprehensible, hopef

2019-09-13 Thread Tom Lane
Make tuplesort_set_bound() assertions more comprehensible, hopefully. Add the comments that I griped were missing. Also re-order tests so that parallelism-related tests aren't randomly separated from each other. Discussion: https://postgr.es/m/CAAaqYe9GD__4Crm=ddz+-XXcNhfY_V5gFYdLdmkFNq=2vho...

pgsql: Replace xlc __fetch_and_add() with inline asm.

2019-09-13 Thread Noah Misch
Replace xlc __fetch_and_add() with inline asm. PostgreSQL has been unusable when built with xlc 13 and newer, which are incompatible with our use of __fetch_and_add(). Back-patch to 9.5, which introduced pg_atomic_fetch_add_u32(). Reviewed by Tom Lane. Discussion: https://postgr.es/m/2019083107

pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c

2019-09-13 Thread Noah Misch
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. Back-patch to 9.5, which introduced these functions. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected] Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: Replace xlc __fetch_and_add() with inline asm.

2019-09-13 Thread Noah Misch
Replace xlc __fetch_and_add() with inline asm. PostgreSQL has been unusable when built with xlc 13 and newer, which are incompatible with our use of __fetch_and_add(). Back-patch to 9.5, which introduced pg_atomic_fetch_add_u32(). Reviewed by Tom Lane. Discussion: https://postgr.es/m/2019083107

pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c

2019-09-13 Thread Noah Misch
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. Back-patch to 9.5, which introduced these functions. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected] Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c

2019-09-13 Thread Noah Misch
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. Back-patch to 9.5, which introduced these functions. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected] Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: Replace xlc __fetch_and_add() with inline asm.

2019-09-13 Thread Noah Misch
Replace xlc __fetch_and_add() with inline asm. PostgreSQL has been unusable when built with xlc 13 and newer, which are incompatible with our use of __fetch_and_add(). Back-patch to 9.5, which introduced pg_atomic_fetch_add_u32(). Reviewed by Tom Lane. Discussion: https://postgr.es/m/2019083107

pgsql: Replace xlc __fetch_and_add() with inline asm.

2019-09-13 Thread Noah Misch
Replace xlc __fetch_and_add() with inline asm. PostgreSQL has been unusable when built with xlc 13 and newer, which are incompatible with our use of __fetch_and_add(). Back-patch to 9.5, which introduced pg_atomic_fetch_add_u32(). Reviewed by Tom Lane. Discussion: https://postgr.es/m/2019083107

pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c

2019-09-13 Thread Noah Misch
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. Back-patch to 9.5, which introduced these functions. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected] Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: Replace xlc __fetch_and_add() with inline asm.

2019-09-13 Thread Noah Misch
Replace xlc __fetch_and_add() with inline asm. PostgreSQL has been unusable when built with xlc 13 and newer, which are incompatible with our use of __fetch_and_add(). Back-patch to 9.5, which introduced pg_atomic_fetch_add_u32(). Reviewed by Tom Lane. Discussion: https://postgr.es/m/2019083107

pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c

2019-09-13 Thread Noah Misch
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. Back-patch to 9.5, which introduced these functions. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdi

pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c

2019-09-13 Thread Noah Misch
Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. Back-patch to 9.5, which introduced these functions. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected] Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: For all ppc compilers, implement pg_atomic_fetch_add_ with inlin

2019-09-13 Thread Noah Misch
For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm. This is more like how we handle s_lock.h and arch-x86.h. This does not materially affect code generation for gcc 7.2.0 or xlc 13.1.3. Reviewed by Tom Lane. Discussion: https://postgr.es/m/[email protected]

pgsql: Replace xlc __fetch_and_add() with inline asm.

2019-09-13 Thread Noah Misch
Replace xlc __fetch_and_add() with inline asm. PostgreSQL has been unusable when built with xlc 13 and newer, which are incompatible with our use of __fetch_and_add(). Back-patch to 9.5, which introduced pg_atomic_fetch_add_u32(). Reviewed by Tom Lane. Discussion: https://postgr.es/m/2019083107