Re: pgsql: Allow pgbench to exit immediately when any client is aborted.

2023-08-29 Thread Tatsuo Ishii
> Hi Ishii-san, > > On Wed, Aug 30, 2023 at 01:05:15AM +, Tatsuo Ishii wrote: >> Allow pgbench to exit immediately when any client is aborted. >> >> Previously when client was aborted due to some error during >> benchmarking, other clients continued their run until certain number >> of

Re: pgsql: Allow pgbench to exit immediately when any client is aborted.

2023-08-29 Thread Michael Paquier
Hi Ishii-san, On Wed, Aug 30, 2023 at 01:05:15AM +, Tatsuo Ishii wrote: > Allow pgbench to exit immediately when any client is aborted. > > Previously when client was aborted due to some error during > benchmarking, other clients continued their run until certain number > of transactions

pgsql: Fix misuse of PqMsg_Close.

2023-08-29 Thread Nathan Bossart
Fix misuse of PqMsg_Close. EndCommand() and EndReplicationCommand() should use PqMsg_CommandComplete instead. Oversight in commit f4b54e1ed9. Reported-by: Pavel Stehule, Tatsuo Ishii Author: Pavel Stehule Reviewed-by: Aleksander Alekseev, Michael Paquier Discussion:

pgsql: Allow pgbench to exit immediately when any client is aborted.

2023-08-29 Thread Tatsuo Ishii
Allow pgbench to exit immediately when any client is aborted. Previously when client was aborted due to some error during benchmarking, other clients continued their run until certain number of transactions specified -t was reached or the time specified by -T was expired. At the end, the results

pgsql: Fix comment of PQputCopyEnd()

2023-08-29 Thread Michael Paquier
Fix comment of PQputCopyEnd() The comment describing the error codes of this routine mentioned 0 as a possible value, but this error code has never been used. Author: Junwang Zhao Reviewed-by: Aleksander Alekseev Discussion:

pgsql: Avoid possible overflow with ltsGetFreeBlock() in logtape.c

2023-08-29 Thread Michael Paquier
Avoid possible overflow with ltsGetFreeBlock() in logtape.c nFreeBlocks, defined as a long, stores the number of free blocks in a logical tape. ltsGetFreeBlock() has been using an int to store the value of nFreeBlocks, which could lead to overflows on platforms where long and int are not the

pgsql: Avoid possible overflow with ltsGetFreeBlock() in logtape.c

2023-08-29 Thread Michael Paquier
Avoid possible overflow with ltsGetFreeBlock() in logtape.c nFreeBlocks, defined as a long, stores the number of free blocks in a logical tape. ltsGetFreeBlock() has been using an int to store the value of nFreeBlocks, which could lead to overflows on platforms where long and int are not the

pgsql: Avoid possible overflow with ltsGetFreeBlock() in logtape.c

2023-08-29 Thread Michael Paquier
Avoid possible overflow with ltsGetFreeBlock() in logtape.c nFreeBlocks, defined as a long, stores the number of free blocks in a logical tape. ltsGetFreeBlock() has been using an int to store the value of nFreeBlocks, which could lead to overflows on platforms where long and int are not the

pgsql: Avoid possible overflow with ltsGetFreeBlock() in logtape.c

2023-08-29 Thread Michael Paquier
Avoid possible overflow with ltsGetFreeBlock() in logtape.c nFreeBlocks, defined as a long, stores the number of free blocks in a logical tape. ltsGetFreeBlock() has been using an int to store the value of nFreeBlocks, which could lead to overflows on platforms where long and int are not the

pgsql: Avoid possible overflow with ltsGetFreeBlock() in logtape.c

2023-08-29 Thread Michael Paquier
Avoid possible overflow with ltsGetFreeBlock() in logtape.c nFreeBlocks, defined as a long, stores the number of free blocks in a logical tape. ltsGetFreeBlock() has been using an int to store the value of nFreeBlocks, which could lead to overflows on platforms where long and int are not the

pgsql: Tag refs/tags/REL_16_RC1 was created

2023-08-29 Thread noreply
Tag refs/tags/REL_16_RC1 was created.

pgsql: Disallow changing NO INHERIT status of a not-null constraint

2023-08-29 Thread Alvaro Herrera
Disallow changing NO INHERIT status of a not-null constraint It makes no sense to add a NO INHERIT not-null constraint to a child table that already has one in that column inherited from its parent. Disallow that, and add tests for the relevant cases. Per complaint from Kyotaro Horiguchi. I

pgsql: Perl: Remove useless lines

2023-08-29 Thread Alvaro Herrera
Perl: Remove useless lines Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/952db4979f9fea3fb4fd1eb07b310c85fdc2a8b9 Modified Files -- src/bin/pgbench/t/002_pgbench_no_server.pl | 1 - src/test/perl/PostgreSQL/Test/Cluster.pm | 1 - 2 files changed, 2

pgsql: psql/t/001_basic: use locale-aware decimals in new test

2023-08-29 Thread Alvaro Herrera
psql/t/001_basic: use locale-aware decimals in new test As cd82e5c79d14 did. Otherwise, the test fails in locales that use decimal separators other than ".". Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8421f6bce16cd1d58106f47e48762319e7d22ab0 Modified Files

pgsql: Generate a locale-agnostic initdb template

2023-08-29 Thread Alvaro Herrera
Generate a locale-agnostic initdb template Fixup for 252dcb32397f. Without this, the "template" data directory created in the initial test steps uses a non-C locale, upsetting numerous tests that rely on parsing English error messages. Discussion:

pgsql: Rename logical_replication_mode to debug_logical_replication_str

2023-08-29 Thread Peter Eisentraut
Rename logical_replication_mode to debug_logical_replication_streaming The logical_replication_mode GUC is intended for testing and debugging purposes, but its current name may be misleading and encourage users to make unnecessary changes. To avoid confusion, renaming the GUC to a less

pgsql: Rename logical_replication_mode to debug_logical_replication_str

2023-08-29 Thread Peter Eisentraut
Rename logical_replication_mode to debug_logical_replication_streaming The logical_replication_mode GUC is intended for testing and debugging purposes, but its current name may be misleading and encourage users to make unnecessary changes. To avoid confusion, renaming the GUC to a less

pgsql: Reword user-facing message for "power of two"

2023-08-29 Thread Daniel Gustafsson
Reword user-facing message for "power of two" While there are numerous instances of using "power of 2" in the code, translated user-facing messages use "power of two". Fix two instances which used "power of 2" instead. This is a backpatch of 95fff2abee in master. Author: Kyotaro Horiguchi

pgsql: Allow \watch queries to stop on minimum rows returned

2023-08-29 Thread Daniel Gustafsson
Allow \watch queries to stop on minimum rows returned When running a repeat query with \watch in psql, it can be helpful to be able to stop the watch process when the query no longer returns the expected amount of rows. An example would be to watch for the presence of a certain event in

pgsql: Reword user-facing message for "power of two"

2023-08-29 Thread Daniel Gustafsson
Reword user-facing message for "power of two" While there are numerous instances of using "power of 2" in the code, translated user-facing messages use "power of two". Fix two instances which used "power of 2" instead. Author: Kyotaro Horiguchi Discussion:

pgsql: Remove useless if condition

2023-08-29 Thread Peter Eisentraut
Remove useless if condition We can call GetAttributeCompression() with a NULL argument. It handles that internally already. This change makes all the callers of GetAttributeCompression() uniform. Reviewed-by: Alvaro Herrera Discussion:

pgsql: Remove useless if condition

2023-08-29 Thread Peter Eisentraut
Remove useless if condition This is useless because these fields are not set anywhere before, so we can assign them unconditionally. This also makes this more consistent with ATExecAddColumn(). Reviewed-by: Alvaro Herrera Discussion:

pgsql: Make more use of makeColumnDef()

2023-08-29 Thread Peter Eisentraut
Make more use of makeColumnDef() Since we already have it, we might as well make full use of it, instead of assembling ColumnDef by hand in several places. Reviewed-by: Alvaro Herrera Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e...@eisentraut.org

pgsql: Add some const decorations

2023-08-29 Thread Peter Eisentraut
Add some const decorations Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e...@eisentraut.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2b088c8e4a2c9879d2f37fa4b38ae925184cea64 Modified Files --

pgsql: Initialize ListenSocket array earlier.

2023-08-29 Thread Heikki Linnakangas
Initialize ListenSocket array earlier. After commit b0bea38705, syslogger prints 63 warnings about failing to close a listen socket at postmaster startup. That's because the syslogger process forks before the ListenSockets array is initialized, so ClosePostmasterPorts() calls "close(0)" 64 times.

pgsql: Initialize ListenSocket array earlier.

2023-08-29 Thread Heikki Linnakangas
Initialize ListenSocket array earlier. After commit b0bea38705, syslogger prints 63 warnings about failing to close a listen socket at postmaster startup. That's because the syslogger process forks before the ListenSockets array is initialized, so ClosePostmasterPorts() calls "close(0)" 64 times.

pgsql: Initialize ListenSocket array earlier.

2023-08-29 Thread Heikki Linnakangas
Initialize ListenSocket array earlier. After commit b0bea38705, syslogger prints 63 warnings about failing to close a listen socket at postmaster startup. That's because the syslogger process forks before the ListenSockets array is initialized, so ClosePostmasterPorts() calls "close(0)" 64 times.

pgsql: Initialize ListenSocket array earlier.

2023-08-29 Thread Heikki Linnakangas
Initialize ListenSocket array earlier. After commit b0bea38705, syslogger prints 63 warnings about failing to close a listen socket at postmaster startup. That's because the syslogger process forks before the ListenSockets array is initialized, so ClosePostmasterPorts() calls "close(0)" 64 times.

pgsql: Initialize ListenSocket array earlier.

2023-08-29 Thread Heikki Linnakangas
Initialize ListenSocket array earlier. After commit b0bea38705, syslogger prints 63 warnings about failing to close a listen socket at postmaster startup. That's because the syslogger process forks before the ListenSockets array is initialized, so ClosePostmasterPorts() calls "close(0)" 64 times.