Re: run pgindent on a regular basis / scripted manner

2023-02-08 Thread Andrew Dunstan
On 2023-02-07 Tu 12:21, Jelte Fennema wrote: On Mon, Feb 6, 2023 at 10:21 AM Andrew Dunstan wrote: Here's a quick patch for 1 and 3. Would also need to adjust the docco. This time with patch. When supplying the --commit flag it still formats all files for me. I was able to fix that by

Re: OpenSSL 3.0.0 vs old branches

2023-02-08 Thread Andrew Dunstan
On 2023-02-07 Tu 23:37, Tom Lane wrote: Michael Paquier writes: On Tue, Feb 07, 2023 at 01:28:26PM -0500, Tom Lane wrote: I think Peter's misremembering the history, and OpenSSL 3 *is* supported in these branches. There could be an argument for not back-patching f0d2c65f17 on the grounds

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2023-02-08 Thread Alvaro Herrera
On 2023-Feb-08, Alvaro Herrera wrote: > I propose instead the following: each command is prepared just before > it's executed, as previously, and if we see a \startpipeline, then we > prepare all commands starting with the one just after, and until the > \endpipeline. Here's the patch. --

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2023-02-08 Thread Alvaro Herrera
On 2022-Sep-30, Yugo NAGATA wrote: > Well, I still don't understand why we need to prepare only "the > commands within a pipeline" before starting pipeline. In the current > behavior, the entire script is prepared in advance just before executing > the first SQL command in the script, instead

Re: meson: Non-feature feature options

2023-02-08 Thread Nazir Bilal Yavuz
Hi, On 2/8/23 13:45, Peter Eisentraut wrote: The problem is that these features now cannot be automatically enabled and behave annoyingly different from other feature options. Agreed. For the 'ssl' option, we have deprecated the --with-openssl option in configure and replaced it with

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-08 Thread Tatsuo Ishii
>> Attached is the v2 patch. > > Thanks for the patch! > > With the patch, I got the following error when executing make_etags.. > > $ ./src/tools/make_etags > etags: invalid option -- 'e' > Try 'etags --help' for a complete list of options. > sort: No such file or directory Oops. Thank

Re: A bug with ExecCheckPermissions

2023-02-08 Thread Amit Langote
On Wed, Feb 8, 2023 at 16:19 Alvaro Herrera wrote: > On 2023-Feb-08, o.tselebrovs...@postgrespro.ru wrote: > > > But if you debug function ExecCheckPermissions and look into what is > passed > > to function (contents of rangeTable and rteperminfos to be exact), > > you'll see some strange

Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

2023-02-08 Thread Nitin Jadhav
> Okay, the part to add an initialization check for GUC_NO_SHOW_ALL and > GUC_NOT_IN_SAMPLE looked fine by me, so applied after more comment > polishing. > > 0001 has been applied to clean up the existing situation. Thanks for committing these 2 changes. > On top of that, I have noticed an

REASSIGN OWNED vs ALTER TABLE OWNER TO permission inconsistencies

2023-02-08 Thread Nazir Bilal Yavuz
Hi, My colleague Adam realized that when transferring ownership, 'REASSIGN OWNED' command doesn't check 'CREATE privilege on the table's schema' on new owner but 'ALTER TABLE OWNER TO' docs state that: To alter the owner, you must also be a direct or indirect member of the new owning role,

Re: A bug with ExecCheckPermissions

2023-02-08 Thread Alvaro Herrera
On 2023-Feb-08, o.tselebrovs...@postgrespro.ru wrote: > But if you debug function ExecCheckPermissions and look into what is passed > to function (contents of rangeTable and rteperminfos to be exact), > you'll see some strange behaviour: > Both of RangeTableEntries have a perminfoindex of 0 and

meson: Non-feature feature options

2023-02-08 Thread Peter Eisentraut
Most meson options (meson_options.txt) that enable an external dependency (e.g., icu, ldap) are of type 'feature'. Most of these have a default value of 'auto', which means they are pulled in automatically if found. Some have a default value of 'disabled' for specific reasons (e.g.,

Re: Performance issues with parallelism and LIMIT

2023-02-08 Thread Tomas Vondra
On 2/1/23 14:41, David Geier wrote: > Hi hackers, > > While migrating from PostgreSQL 14 to 15, we encountered the following > performance degradation caused by commit 46846433a03dff: "shm_mq: Update > mq_bytes_written less often", discussion in [1]. > > The batching can make queries with a

Re: deadlock-hard flakiness

2023-02-08 Thread Thomas Munro
On Wed, Feb 8, 2023 at 11:34 PM Thomas Munro wrote: > On Wed, Feb 8, 2023 at 2:10 PM Andres Freund wrote: > > I'm fairly sure I've seen this failure on the buildfarm as well, but I'm too > > impatient to wait for the buildfarm database query (it really should be > > updated to use lz4 toast

Re: deadlock-hard flakiness

2023-02-08 Thread Thomas Munro
On Wed, Feb 8, 2023 at 2:10 PM Andres Freund wrote: > I'm fairly sure I've seen this failure on the buildfarm as well, but I'm too > impatient to wait for the buildfarm database query (it really should be > updated to use lz4 toast compression). Failures in deadlock-hard (excluding crashes,

Re: generic plans and "initial" pruning

2023-02-08 Thread Amit Langote
On Tue, Feb 7, 2023 at 23:38 Andres Freund wrote: > Hi, > > On 2023-02-03 22:01:09 +0900, Amit Langote wrote: > > I've added a test case under src/modules/delay_execution by adding a > > new ExecutorStart_hook that works similarly as > > delay_execution_planner(). The test works by allowing a

Re: meson: Optionally disable installation of test modules

2023-02-08 Thread Peter Eisentraut
On 01.02.23 13:41, Nazir Bilal Yavuz wrote: On 1/31/23 11:44, Peter Eisentraut wrote: On 30.01.23 18:42, Andres Freund wrote: Bilal, with a bit of help by me, worked on an alternative approach to this. It's a lot more verbose in the initial change, but wouldn't increase the amount of

Re: make_ctags: use -I option to ignore pg_node_attr macro

2023-02-08 Thread Fujii Masao
On 2023/02/08 9:49, Tatsuo Ishii wrote: I am not sure if this is good way to check if ctags supports "-e" or not. + thenctags --version 2>&1 | grep -- -e >/dev/null Perhaps, "--help" might be intended rather than "--version" to check supported options? Yeah, that was my mistake.

Re: Why cann't simplify stable function in planning phase?

2023-02-08 Thread Tomas Vondra
On 2/8/23 09:59, tender wang wrote: > Hi hackers, >    In evaluate_function(), I find codes as shown below: > >  /* >   * Ordinarily we are only allowed to simplify immutable functions. But for >   * purposes of estimation, we consider it okay to simplify functions that >   * are merely

Re: Why cann't simplify stable function in planning phase?

2023-02-08 Thread Laurenz Albe
On Wed, 2023-02-08 at 16:59 +0800, tender wang wrote: >    In evaluate_function(), I find codes as shown below: > >  /* >   * Ordinarily we are only allowed to simplify immutable functions. But for >   * purposes of estimation, we consider it okay to simplify functions that >   * are merely

Re: pglz compression performance, take two

2023-02-08 Thread Tomas Vondra
On 2/7/23 21:18, Andres Freund wrote: > Hi, > > On 2023-02-05 10:36:39 -0800, Andrey Borodin wrote: >> On Fri, Jan 6, 2023 at 10:02 PM Andrey Borodin wrote: >>> >>> Hello! Please find attached v8. >> >> I got some interesting feedback from some patch users. >> There was an oversight that

RE: Exit walsender before confirming remote flush in logical replication

2023-02-08 Thread Hayato Kuroda (Fujitsu)
> > Dear Horiguchi-san, > > Thank you for checking the patch! PSA new version. PSA rebased patch that supports updated time-delayed patch[1]. [1]: https://www.postgresql.org/message-id/tyapr01mb5866c11daf8ab04f3cc181d3f5...@tyapr01mb5866.jpnprd01.prod.outlook.com Best Regards, Hayato Kuroda

PostgreSQL 16 Dev apt-based Linux unable to install

2023-02-08 Thread André Verwijs
PostgreSQL 16 Dev  apt-based Linux,  unable to install  make sure all dependencies are resolved, like libpq5 (or higher) for testing ... " postgresql-client-16 : Prerequisites: libpq5 (>= 16~~devel) but 15.1-1.pgdg+1+b1 will be installed " --

Why cann't simplify stable function in planning phase?

2023-02-08 Thread tender wang
Hi hackers, In evaluate_function(), I find codes as shown below: /* * Ordinarily we are only allowed to simplify immutable functions. But for * purposes of estimation, we consider it okay to simplify functions that * are merely stable; the risk that the result might change from planning

A bug with ExecCheckPermissions

2023-02-08 Thread o . tselebrovskiy
Greetings, everyone! While working on an extension my colleague and I have found an interesting case; When you try to execute next SQL statements on master branch of PostgreSQL: CREATE TABLE parted_fk_naming ( id bigint NOT NULL default 1, id_abc bigint,

Re: Deadlock between logrep apply worker and tablesync worker

2023-02-08 Thread Peter Smith
On Tue, Feb 7, 2023 at 6:46 PM houzj.f...@fujitsu.com wrote: > > On Tuesday, February 7, 2023 12:12 PM Peter Smith > wrote: > > On Fri, Feb 3, 2023 at 6:58 PM houzj.f...@fujitsu.com > > > > wrote: > > > > > ... > > > > Right, I think that case could be addressed by Tom's patch to some > > > >

Re: Add sub-transaction overflow status in pg_stat_activity

2023-02-08 Thread Kirill Reshke
On Tue, 20 Dec 2022 at 09:23, Dilip Kumar wrote: > > On Tue, Dec 20, 2022 at 2:32 AM Robert Haas wrote: > > > > On Mon, Dec 19, 2022 at 3:48 PM Ted Yu wrote: > > > It seems the comment for `backend_subxact_overflowed` missed a word. > > > > > > Please see the patch. > > > > Committed this fix,

Re: daitch_mokotoff module

2023-02-08 Thread Alvaro Herrera
On 2023-Jan-17, Dag Lem wrote: > + * Daitch-Mokotoff Soundex > + * > + * Copyright (c) 2021 Finance Norway > + * Author: Dag Lem Hmm, I don't think we accept copyright lines that aren't "PostgreSQL Global Development Group". Is it okay to use that, and update the year to 2023? (Note that

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-08 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing! PSA new version. > == > doc/src/sgml/glossary.sgml > > 1. > + > + Replication setup that applies time-delayed copy of the data. > + > > That sentence seemed a bit strange to me. > > SUGGESTION > Replication setup that delays the

Re: bitscan forward/reverse on Windows

2023-02-08 Thread John Naylor
I wrote: > Attached is a quick-and-dirty attempt to add MSVC support for the rightmost/leftmost-one-pos functions. > > 0001 adds asserts to the existing coding. > 0002 adds MSVC support. Tests pass on CI, but it's of course possible that there is some bug that prevents hitting the fastpath. I've

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-08 Thread Pavel Stehule
hi st 8. 2. 2023 v 7:33 odesílatel Julien Rouhaud napsal: > On Tue, Feb 07, 2023 at 08:48:22PM +0100, Pavel Stehule wrote: > > > > I have a question about the possibility of simply getting the name of the > > currently executed function. The reason for this request is > simplification > > of

Re: Logical replication timeout problem

2023-02-08 Thread Amit Kapila
On Wed, Feb 8, 2023 at 10:57 AM Andres Freund wrote: > > On 2023-02-03 10:13:54 +0530, Amit Kapila wrote: > > I am planning to push this to HEAD sometime next week (by Wednesday). > > To backpatch this, we need to fix it in some non-standard way, like > > without introducing a callback which I am

RE: Exit walsender before confirming remote flush in logical replication

2023-02-08 Thread Hayato Kuroda (Fujitsu)
Dear Horiguchi-san, Thank you for checking the patch! PSA new version. > 0002: > > This patch doesn't seem to offer a means to change the default > walsender behavior. We need a subscription option named like > "walsender_exit_mode" to do that. As I said in another mail[1], I'm thinking the

<    1   2