Re: pgsql: psql: Add test for query canceling

2021-08-20 Thread Tom Lane
Daniel Gustafsson writes: > On 20 Aug 2021, at 20:47, Tom Lane wrote: >> I think you should drop the overly-cute bit with a SIGALRM handler, >> and instead have a loop-with-delay around an attempt to read the >> psql.pid file, after launching the psql run without an immediate >> wait for terminat

Re: pgsql: psql: Add test for query canceling

2021-08-20 Thread Daniel Gustafsson
> On 20 Aug 2021, at 20:47, Tom Lane wrote: > > Daniel Gustafsson writes: >> If we want the test to run but not fail the entire test suite if it fails >> then >> it should use a TODO block instead, but that’s intended for tests known to >> fail >> and this doesn’t seem to fall in that category

Re: pgsql: psql: Add test for query canceling

2021-08-20 Thread Tom Lane
Daniel Gustafsson writes: > If we want the test to run but not fail the entire test suite if it fails then > it should use a TODO block instead, but that’s intended for tests known to > fail > and this doesn’t seem to fall in that category. That seems pretty useless. If we did break things in t

Re: pgsql: psql: Add test for query canceling

2021-08-20 Thread Daniel Gustafsson
> On 20 Aug 2021, at 17:40, Fabien COELHO wrote: > > >>> psql: Add test for query canceling >> >> Seems sidewinder didn’t quite like this: > >> Nothing obvious sticks out, could it be timing related? > > Hmmm. Possibly, as the test is time dependent, hence the "SKIP:" section, > which should

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.

2021-08-20 Thread Tom Lane
Fix performance bug in regexp's citerdissect/creviterdissect. After detecting a sub-match "dissect" failure (i.e., a backref match failure) in the i'th sub-match of an iteration node, we should proceed by adjusting the attempted length of the i'th submatch. As coded, though, these functions chang

Re: pgsql: psql: Add test for query canceling

2021-08-20 Thread Fabien COELHO
psql: Add test for query canceling Seems sidewinder didn’t quite like this: Nothing obvious sticks out, could it be timing related? Hmmm. Possibly, as the test is time dependent, hence the "SKIP:" section, which should mean that the test should be ignore when it fails. It seems that thi

Re: pgsql: psql: Add test for query canceling

2021-08-20 Thread Daniel Gustafsson
> On 20 Aug 2021, at 11:44, Peter Eisentraut wrote: > > psql: Add test for query canceling Seems sidewinder didn’t quite like this: ==~_~===-=-===~_~== pgsql.build/src/bin/psql/tmp_check/log/020_cancel_main.log ==~_~===-=-===~_~== 2021-08-20 12:52:29.992 CEST [9820:1] LOG: starting PostgreSQL

pgsql: Remove --quiet option from pg_amcheck

2021-08-20 Thread Daniel Gustafsson
Remove --quiet option from pg_amcheck Using --quiet in combination with --no-strict-names didn't work as documented, a warning message was still emitted. Since the --quiet flag was working in an unconventional way to other utilities, fix by removing the functionality instead. Backpatch through 14

pgsql: Remove --quiet option from pg_amcheck

2021-08-20 Thread Daniel Gustafsson
Remove --quiet option from pg_amcheck Using --quiet in combination with --no-strict-names didn't work as documented, a warning message was still emitted. Since the --quiet flag was working in an unconventional way to other utilities, fix by removing the functionality instead. Backpatch through 14

pgsql: psql: Add test for query canceling

2021-08-20 Thread Peter Eisentraut
psql: Add test for query canceling Query canceling in psql was accidentally broken by 3a5130672296ed4e682403a77a9a3ad3d21cef75 (since reverted), so having some test coverage for that seems useful. Reviewed-by: Fabien COELHO Discussion: https://www.postgresql.org/message-id/18c78a01-4a34-9dd4-f7

pgsql: pg_resetwal: Improve numeric command-line argument parsing

2021-08-20 Thread Peter Eisentraut
pg_resetwal: Improve numeric command-line argument parsing Check errno after strtoul()/strtol() to handle out of range errors better. For out of range, strtoul() returns ULONG_MAX, and the previous code would proceed with that result. Reported-by: Mark Dilger Discussion: https://www.postgresql

pgsql: pg_amcheck: Fix block number parsing on command line

2021-08-20 Thread Peter Eisentraut
pg_amcheck: Fix block number parsing on command line The previous code wouldn't handle higher block numbers on systems where sizeof(long) == 4. Reviewed-by: Mark Dilger Discussion: https://www.postgresql.org/message-id/flat/6a10a211-872b-3c4c-106b-909ae5fefa61%40enterprisedb.com Branch --

pgsql: pg_amcheck: Fix block number parsing on command line

2021-08-20 Thread Peter Eisentraut
pg_amcheck: Fix block number parsing on command line The previous code wouldn't handle higher block numbers on systems where sizeof(long) == 4. Reviewed-by: Mark Dilger Discussion: https://www.postgresql.org/message-id/flat/6a10a211-872b-3c4c-106b-909ae5fefa61%40enterprisedb.com Branch --