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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/dd50f1a43290bb3c67e24e808d4d8656e9532c9a

Modified Files
--
src/include/port/atomics/generic-xlc.h | 39 ++
1 file changed, 35 insertions(+), 4 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/f380c5190134a4e928bf30a4ff9fec775cdcc692

Modified Files
--
src/test/regress/regress.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/585fc561f8246fde76cee691607cc43325e16b29

Modified Files
--
src/test/regress/regress.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/e7ff59686eacf5021fb84be921116986c3828d8a

Modified Files
--
configure  | 40 ++
configure.in   | 20 +++
src/include/pg_config.h.in |  3 ++
src/include/port/atomics/arch-ppc.h| 98 ++
src/include/port/atomics/generic-xlc.h | 66 ---
5 files changed, 161 insertions(+), 66 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/8972ac69666550535a885aebe0930550c151b4a3

Modified Files
--
src/include/port/atomics/generic-xlc.h | 39 ++
1 file changed, 35 insertions(+), 4 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/40ad4202513c72f5c1beeb03e26dfbc8890770c0

Modified Files
--
src/include/port/atomics/generic-xlc.h | 39 ++
1 file changed, 35 insertions(+), 4 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/4737d3a75b725b6babf2d402c767751a105b67e9

Modified Files
--
src/test/regress/regress.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/a1df9a015dac30d467a00f2d42510765d4f0dd5b

Modified Files
--
src/include/port/atomics/generic-xlc.h | 39 ++
1 file changed, 35 insertions(+), 4 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/8d32f82ca5dd3da76edc298c04d3fd6041ae

Modified Files
--
src/test/regress/regress.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/1c6b62a7d0e57bf9ac7a91d47484b1ea9f2857cd

Modified Files
--
src/include/port/atomics/generic-xlc.h | 39 ++
1 file changed, 35 insertions(+), 4 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/5b5b0f721d9cece8fb68ecdd1d53c3bffe6e753c

Modified Files
--
src/test/regress/regress.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/75941f257aacbc68b08e1cbf2e55110d00a06fff

Modified Files
--
src/include/port/atomics/generic-xlc.h | 39 ++
1 file changed, 35 insertions(+), 4 deletions(-)



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/20190831071157.ga3251...@rfd.leadboat.com

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/e6a90ded5a6c2085a71b0e564451b48e800f4e8f

Modified Files
--
src/test/regress/regress.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)



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...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/b360e0fcd7dcffe3238187209911a6f523057b0c

Modified Files
--
src/backend/utils/sort/tuplesort.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/4f7dbf0ef50b0569cfac1d604eb721c89ee65647

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/41f3d262693b1d735a3683104e334f1e9b48d7f4

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/7110f5c37721914dc4b948a7d0ba4eab09cb88a5

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/96b5033e117141eecf3782ee555f39b3006a732f

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/ae4305f6d303d246b69a1fcdbb28f346d6a7f4db

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/bac2fae05c7737530a6fe8276cd27d210d25c6ac

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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_ASSIGNMENT messages are critical in order for
sub-transactions to be correctly assigned to their parent transactions,
or at least one assert misbehaves, as reported by Ildar Musin.

Diagnosed-by: Masahiko Sawada
Author: Masahiko Sawada
Discussion: 
https://postgr.es/m/caonyftov+er1p3wauwusy1zscfrsyvphlhapc_fmd-znarw...@mail.gmail.com

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/e8c7f40a1f8ad2a017ff646f19ef42b07bf4ab51

Modified Files
--
src/backend/replication/logical/decode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)



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 incredibly dangerous due to their
> lack of parentheses.
> 
> I'd initially thought that we already had bugs in existing usages like
> 
>   if (options & REINDEXOPT_VERBOSE)
> 
> After consulting a nearby C reference I see that we're accidentally
> saved by << having higher priority than &, but this is not safely-
> maintainable code.  Expressions like "~REINDEXOPT_VERBOSE" would not
> do what one expects.

Fixed back to 9.5, where this macro appeared.  I was unable to come up
with a way to search for other occurrences of the same problem :-(

Thanks,

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




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://postgr.es/m/19795.1568400...@sss.pgh.pa.us

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/00f167bed782363b4fe05ecd870155eb84336a8b

Modified Files
--
src/include/nodes/parsenodes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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://postgr.es/m/19795.1568400...@sss.pgh.pa.us

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/ce5d04b6463d9f642e30d1f6abf45846e1255be0

Modified Files
--
src/include/nodes/parsenodes.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



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://postgr.es/m/19795.1568400...@sss.pgh.pa.us

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/a0a40f611e9af81507a48f7fd96833ad57c8e4ae

Modified Files
--
src/include/nodes/parsenodes.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



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://postgr.es/m/19795.1568400...@sss.pgh.pa.us

Branch
--
REL9_5_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/83c2c97114de330dc0c1a11f0edfe0f9bf116614

Modified Files
--
src/include/nodes/parsenodes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



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 << 1  /* report pgstat progress */
> 
> Surely these macro definitions are incredibly dangerous due to their
> lack of parentheses.

Ugh, I knew there was something odd here in the back of my mind but I
was unable to see what it was :-(  I'll fix those definitions.

Thanks for looking,

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




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 macro definitions are incredibly dangerous due to their
lack of parentheses.

I'd initially thought that we already had bugs in existing usages like

if (options & REINDEXOPT_VERBOSE)

After consulting a nearby C reference I see that we're accidentally
saved by << having higher priority than &, but this is not safely-
maintainable code.  Expressions like "~REINDEXOPT_VERBOSE" would not
do what one expects.

regards, tom lane




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 REINDEX.

(The reason this bugfix is this small is that I had already noticed this
problem when writing monitoring for CREATE INDEX, and had already worked
around it, as can be seen in discussion starting at
https://postgr.es/m/20190329150218.GA25010@alvherre.pgsql Fixing the
problem is just a matter of fixing one place touched by the REINDEX
monitoring.)

Reported by: Álvaro Herrera
Author: Álvaro Herrera
Discussion: https://postgr.es/m/20190801184333.GA21369@alvherre.pgsql

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/da47e43dc32e3c5916396f0cbcfa974b371e4875

Modified Files
--
src/backend/catalog/index.c  | 24 +++-
src/backend/commands/indexcmds.c |  4 ++--
src/include/nodes/parsenodes.h   |  1 +
3 files changed, 18 insertions(+), 11 deletions(-)



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 REINDEX.

(The reason this bugfix is this small is that I had already noticed this
problem when writing monitoring for CREATE INDEX, and had already worked
around it, as can be seen in discussion starting at
https://postgr.es/m/20190329150218.GA25010@alvherre.pgsql Fixing the
problem is just a matter of fixing one place touched by the REINDEX
monitoring.)

Reported by: Álvaro Herrera
Author: Álvaro Herrera
Discussion: https://postgr.es/m/20190801184333.GA21369@alvherre.pgsql

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/6212276e4343f729b0152e81824f850d1a21d57e

Modified Files
--
src/backend/catalog/index.c  | 24 +++-
src/backend/commands/indexcmds.c |  4 ++--
src/include/nodes/parsenodes.h   |  1 +
3 files changed, 18 insertions(+), 11 deletions(-)



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
---
https://git.postgresql.org/pg/commitdiff/6eb9b20bb7dd770c78bf43b205b98e15972e2341

Modified Files
--
doc/src/sgml/charset.sgml | 2 +-
doc/src/sgml/config.sgml  | 2 +-
doc/src/sgml/func.sgml| 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)



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.com
Author: Liudmila Mantrova, Alexander Lakhin
Reviewed-by: Alexander Korotkov, Alvaro Herrera
Backpatch-through: 12

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/9f771868c446c44dae6b97c68eeb1b19da32c50a

Modified Files
--
doc/src/sgml/func.sgml | 41 +++--
doc/src/sgml/json.sgml | 10 +-
2 files changed, 24 insertions(+), 27 deletions(-)



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://git.postgresql.org/pg/commitdiff/eb57bd9c1d83a20eaff559a53b2f584dcd0668a8

Modified Files
--
doc/src/sgml/charset.sgml | 2 +-
doc/src/sgml/config.sgml  | 2 +-
doc/src/sgml/func.sgml| 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)



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.com
Author: Liudmila Mantrova, Alexander Lakhin
Reviewed-by: Alexander Korotkov, Alvaro Herrera
Backpatch-through: 12

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/c30fc9ddd596f7981555318d1c236fc55279cac8

Modified Files
--
doc/src/sgml/func.sgml | 41 +++--
doc/src/sgml/json.sgml | 10 +-
2 files changed, 24 insertions(+), 27 deletions(-)



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/fc16778873d081b07930d642622ee0cf22c3f9b7

Modified Files
--
src/bin/psql/tab-complete.c | 35 +--
1 file changed, 25 insertions(+), 10 deletions(-)