Re: Conflict between regression tests namespace & transactions due to recent changes

2023-05-16 Thread Michael Paquier
On Tue, May 16, 2023 at 11:02:45AM +0300, Marina Polyakova wrote: > It confuses me a little that different methods are used for the same > purpose. But the namespace test checks schemas. So see > diff_abc_to_txn_table.patch which replaces abc with txn_table in the > transaction test. Looks OK

Re: [DOC] Update ALTER SUBSCRIPTION documentation v3

2023-05-16 Thread Robert Sjöblom
Den ons 17 maj 2023 kl 03:18 skrev Peter Smith : > > + errhint("Use %s to disassociate the subscription from the slot after > disabling the subscription.", > > IMO it looked strange having the word "subscription" 2x in the same sentence. > > Maybe you can reword the errhint like: > > BEFORE > "Use

Re: Order changes in PG16 since ICU introduction

2023-05-16 Thread Jeff Davis
On Tue, 2023-05-16 at 15:35 -0400, Jonathan S. Katz wrote: > +  Sensitivity when determining equality, with > +  level1 the least sensitive and > +  identic the most sensitive. See +  linkend="icu-collation-levels"/> for details. > > This discusses equality

Re: Reload configuration more frequently in apply worker.

2023-05-16 Thread Amit Kapila
On Wed, May 17, 2023 at 7:18 AM Zhijie Hou (Fujitsu) wrote: > > Currently, the main loop of apply worker looks like below[1]. Since there are > two loops, the inner loop will keep receiving and applying message from > publisher until no more message left. The worker only reloads the >

Re: cutting down the TODO list thread

2023-05-16 Thread John Naylor
On Tue, May 16, 2023 at 1:16 AM Tom Lane wrote: > > Robert Haas writes: > >> Add support for polymorphic arguments and return types to languages other than PL/PgSQL > >> Add support for OUT and INOUT parameters to languages other than PL/PgSQL > > These actually seem like pretty interesting

Re: cutting down the TODO list thread

2023-05-16 Thread Julien Rouhaud
On Tue, 16 May 2023, 02:05 Matthias van de Meent, > > The result I got when searching for "automatic postgresql index > suggestions" was a combination of hypopg, pg_qualstats and some manual > glue to get suggested indexes in the current database - but none of > these are available in the main

Reload configuration more frequently in apply worker.

2023-05-16 Thread Zhijie Hou (Fujitsu)
Hi, Currently, the main loop of apply worker looks like below[1]. Since there are two loops, the inner loop will keep receiving and applying message from publisher until no more message left. The worker only reloads the configuration in the outer loop. This means if the publisher keeps sending

Re: benchmark results comparing versions 15.2 and 16

2023-05-16 Thread Michael Paquier
On Tue, May 16, 2023 at 06:00:00PM +0300, Alexander Lakhin wrote: > I can confirm that the patches improve (restore) performance for my test: > pgbench -i benchdb > pgbench -c 10 -T 300 benchdb Thanks for running these! > tps (over three runs): > HEAD (08c45ae23): > 10238.441580, 10697.202119,

Re: [DOC] Update ALTER SUBSCRIPTION documentation v3

2023-05-16 Thread Peter Smith
+ errhint("Use %s to disassociate the subscription from the slot after disabling the subscription.", IMO it looked strange having the word "subscription" 2x in the same sentence. Maybe you can reword the errhint like: BEFORE "Use %s to disassociate the subscription from the slot after disabling

Re: running logical replication as the subscription owner

2023-05-16 Thread Ajin Cherian
On Mon, May 15, 2023 at 10:47 PM Masahiko Sawada wrote: > > On Mon, May 15, 2023 at 5:44 PM Ajin Cherian wrote: > > > > On Fri, May 12, 2023 at 9:55 PM Ajin Cherian wrote: > > > > > > If nobody else is working on this, I can come up with a patch to fix this > > > > > > > Attaching a patch which

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-16 Thread Peter Smith
Hi Kuroda-san, I confirmed the patch changes from v13-0001 to v14-0001 have addressed the comments from my previous post, and the cfbot is passing OK, so I don't have any more review comments at this time. -- Kind Regards, Peter Smith. Fujitsu Australia

Re: smgrzeroextend clarification

2023-05-16 Thread Andres Freund
Hi, On 2023-05-16 20:40:01 +0200, Peter Eisentraut wrote: > On 10.05.23 20:10, Andres Freund wrote: > > > So if you want to understand what smgrzeroextend() does, you need to > > > mentally combine the documentation of three different functions. Could we > > > write documentation for each

Re: WL_SOCKET_ACCEPT fairness on Windows

2023-05-16 Thread Andres Freund
Hi, On 2023-05-17 08:41:24 +1200, Thomas Munro wrote: > Yeah. No one seems to think this is worth worrying about (please > speak up if you do). +1 - we have much bigger fish to fry IMO. Greetings, Andres Freund

Re: issue with meson builds on msys2

2023-05-16 Thread Andres Freund
Hi, On 2023-05-16 08:55:20 -0400, Andrew Dunstan wrote: > I don't know where this all leaves us. It's still more than odd that the > start works fine and the stop doesn't. >From what I understand it's just a question of starting another shell, with some redirection, after having previously

Re: WL_SOCKET_ACCEPT fairness on Windows

2023-05-16 Thread Jonathan S. Katz
On 5/16/23 4:41 PM, Thomas Munro wrote: On Wed, May 17, 2023 at 2:57 AM Jonathan S. Katz wrote: Given this has sat for a bit, I wanted to see if any of your thinking has changed on whether this should be fixed for v16 or v17. I have personally not formed an opinion yet, but per the current

Re: Memory leak from ExecutorState context?

2023-05-16 Thread Melanie Plageman
On Sun, May 14, 2023 at 12:10:00AM +0200, Tomas Vondra wrote: > On 5/12/23 23:36, Melanie Plageman wrote: > > Thanks for continuing to work on this. > > > > Are you planning to modify what is displayed for memory usage in > > EXPLAIN ANALYZE? > > > > We could do that, but we can do that

Re: WL_SOCKET_ACCEPT fairness on Windows

2023-05-16 Thread Thomas Munro
On Wed, May 17, 2023 at 2:57 AM Jonathan S. Katz wrote: > On 3/31/23 11:00 PM, Thomas Munro wrote: > >>> I mention this now because I'm not sure whether to consider this an > >>> 'open item' for 16, or merely an enhancement for 17. I guess the > >>> former, because someone might call that a new

Re: Memory leak from ExecutorState context?

2023-05-16 Thread Melanie Plageman
On Tue, May 16, 2023 at 04:00:51PM +0200, Jehan-Guillaume de Rorthais wrote: > From e5ecd466172b7bae2f1be294c1a5e70ce2b43ed8 Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Thu, 30 Apr 2020 07:16:28 -0700 > Subject: [PATCH v8 1/3] Describe hash join implementation > > This is just a

Re: Order changes in PG16 since ICU introduction

2023-05-16 Thread Jonathan S. Katz
On 5/5/23 8:25 PM, Jeff Davis wrote: On Fri, 2023-04-21 at 20:12 -0400, Robert Haas wrote: On Fri, Apr 21, 2023 at 5:56 PM Jeff Davis wrote: Most of the complaints seem to be complaints about v15 as well, and while those complaints may be a reason to not make ICU the default, they are also an

Re: Introduce "log_connection_stages" setting.

2023-05-16 Thread Sergey Dudoladov
Hello, I have attached the fourth version of the patch. Regards, Sergey. From 0303df03496ec9aafd6e69fa798177ad06a85bee Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 8 Nov 2022 18:56:26 +0100 Subject: [PATCH] Introduce 'log_connection_messages' This patch removes 'log_connections'

Re: smgrzeroextend clarification

2023-05-16 Thread Peter Eisentraut
On 10.05.23 20:10, Andres Freund wrote: So if you want to understand what smgrzeroextend() does, you need to mentally combine the documentation of three different functions. Could we write documentation for each function that stands on its own? And document the function arguments, like what

Re: Should CSV parsing be stricter about mid-field quotes?

2023-05-16 Thread Joel Jacobson
On Tue, May 16, 2023, at 13:43, Joel Jacobson wrote: >If we made midfield quoting a CSV error, those users who are currently mistaken >about their TSV/TEXT files being CSV while also having balanced quotes in their >data, would encounter an error rather than a silent failure, which I believe

Re: Order changes in PG16 since ICU introduction

2023-05-16 Thread Jeff Davis
On Tue, 2023-05-16 at 19:00 +0300, Alexander Lakhin wrote: > I'm not sure about the proposed change in icu_from_uchar(). It seems > that > len_result + 1 bytes should always be enough for the result string > terminated > with NUL. If that's not true (we want to protect from some ICU bug > here), >

Re: Order changes in PG16 since ICU introduction

2023-05-16 Thread Alexander Lakhin
Hi Jeff, 16.05.2023 00:03, Jeff Davis wrote: On Sat, 2023-05-13 at 13:00 +0300, Alexander Lakhin wrote: On the current master (after 455f948b0, and before f7faa9976, of course) I get an ASAN-detected failure with the following query: CREATE COLLATION col (provider = icu, locale =

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-05-16 Thread Nathan Bossart
On Tue, May 16, 2023 at 03:28:17PM +0900, Michael Paquier wrote: > Hmm. This is older than the oldest version we have to support for > pg_upgrade and co. Would it be worth switching clusterdb to use the > parenthesized grammar, adding on the way a test for this new grammar > flavor without a

Re: benchmark results comparing versions 15.2 and 16

2023-05-16 Thread Alexander Lakhin
15.05.2023 08:20, Michael Paquier wrote: I am not going to let that hang in the air with beta1 getting released next week, though, so attached are two patches to revert the change (these would be combined, just posted this way for clarity). I can confirm that the patches improve (restore)

Re: WL_SOCKET_ACCEPT fairness on Windows

2023-05-16 Thread Jonathan S. Katz
On 3/31/23 11:00 PM, Thomas Munro wrote: I mention this now because I'm not sure whether to consider this an 'open item' for 16, or merely an enhancement for 17. I guess the former, because someone might call that a new denial of service vector. On the other hand, if you fill up the listen

Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases

2023-05-16 Thread Masahiko Sawada
On Thu, May 11, 2023 at 5:12 PM Masahiko Sawada wrote: > > On Wed, May 10, 2023 at 8:58 PM Melih Mutlu wrote: > > > > Hi, > > > > Masahiko Sawada , 8 May 2023 Pzt, 10:24 tarihinde > > şunu yazdı: > >> > >> I've attached the patch. Feedback is very welcome. > > > > > > Thanks for the patch, nice

Re: pg_stat_io not tracking smgrwriteback() is confusing

2023-05-16 Thread Jonathan S. Katz
On 5/6/23 1:30 PM, Melanie Plageman wrote: I've done that in the attached v5. [RMT hat] RMT nudge on this thread, as we're approaching the Beta 1 cutoff. From the above discussion, it sounds like it's pretty close to being ready. Thanks, Jonathan OpenPGP_signature Description: OpenPGP

Re: Assert failure of the cross-check for nullingrels

2023-05-16 Thread Jonathan S. Katz
On 5/16/23 9:49 AM, Tom Lane wrote: "Jonathan S. Katz" writes: Is there a specific commit targeted for v16 that introduced this issue? Does it only affect v16 or does it affect backbranches? It's part of the outer-join-aware-Vars stuff, so it's my fault ... and v16 only. *nods* thanks. I

Re: pgbench: option delaying queries till connections establishment?

2023-05-16 Thread Dave Cramer
> > I've recently run into something I am having difficulty understanding. > > I am running pgbench with the following > pgbench -h localhost -c 100 -j 100 -t 2 -S -s 1000 pgbench -U pgbench > --protocol=simple > > Without pgbouncer I get around 5k TPS > with pgbouncer I get around 15k TPS > >

Re: Memory leak from ExecutorState context?

2023-05-16 Thread Jehan-Guillaume de Rorthais
Hi, On Tue, 16 May 2023 12:01:51 +0200 Tomas Vondra wrote: > On 5/16/23 00:15, Jehan-Guillaume de Rorthais wrote: > > On Sat, 13 May 2023 23:47:53 +0200 > > Tomas Vondra wrote: > ... > >> I'm not really sure about calling this "hybrid hash-join". What does it > >> even mean? The new comments

Re: cutting down the TODO list thread

2023-05-16 Thread Matthias van de Meent
On Tue, 16 May 2023 at 14:27, Robert Haas wrote: > > On Tue, May 16, 2023 at 8:18 AM Matthias van de Meent > wrote: > > Agreed; and that's why I'm not against removing the specific wording > > of the item. This may not have been clearly described in my previous > > mail, but I would instead like

Re: Assert failure of the cross-check for nullingrels

2023-05-16 Thread Tom Lane
"Jonathan S. Katz" writes: > Is there a specific commit targeted for v16 that introduced this issue? > Does it only affect v16 or does it affect backbranches? It's part of the outer-join-aware-Vars stuff, so it's my fault ... and v16 only. regards, tom lane

Re: Assert failure of the cross-check for nullingrels

2023-05-16 Thread Jonathan S. Katz
On 5/12/23 3:02 AM, Richard Guo wrote: On Fri, Mar 17, 2023 at 11:05 AM Richard Guo > wrote: Here is an updated patch with comments and test case.  I also change the code to store 'group_clause_relids' directly in RestrictInfo. BTW, I've added an open

Re: [DOC] Update ALTER SUBSCRIPTION documentation v3

2023-05-16 Thread Robert Sjöblom
Den tis 16 maj 2023 kl 01:44 skrev Peter Smith : > > On Mon, May 15, 2023 at 11:36 PM Robert Sjöblom > wrote: > > > > > > > > On 2023-05-05 15:17, Robert Sjöblom wrote: > > > > > > Hi, > > > > > > We have recently used the PostgreSQL documentation when setting up our > > > logical replication. We

Re: issue with meson builds on msys2

2023-05-16 Thread Andrew Dunstan
On 2023-05-15 Mo 19:43, Andres Freund wrote: Hi, On 2023-05-15 15:30:28 -0700, Andres Freund wrote: As soon as either the pg_ctl for the start, or the whole bash invocation, has stdin redirected, the problem vanishes. For a moment I thought this could be related to InheritStdHandles() - but

Re: pgbench: option delaying queries till connections establishment?

2023-05-16 Thread Dave Cramer
Dave Cramer www.postgres.rocks On Tue, 16 May 2023 at 07:27, Andres Freund wrote: > Hi, > > I am trying to run a few benchmarks measuring the effects of patch to > make GetSnapshotData() faster in the face of larger numbers of > established connections. > > Before the patch connection

Re: 'converts internal representation to "..."' comment is confusing

2023-05-16 Thread Robert Haas
On Sun, May 14, 2023 at 9:37 PM Tom Lane wrote: > Steve Chavez writes: > > I found "..." confusing in some comments, so this patch changes it to > > "cstring". Which seems to be the intention after all. > > Those comments are Berkeley-era, making them probably a decade older > than the "cstring"

Re: cutting down the TODO list thread

2023-05-16 Thread Robert Haas
On Tue, May 16, 2023 at 8:18 AM Matthias van de Meent wrote: > Agreed; and that's why I'm not against removing the specific wording > of the item. This may not have been clearly described in my previous > mail, but I would instead like to see a TODO list item which covers > the need to improve

Re: running logical replication as the subscription owner

2023-05-16 Thread Robert Haas
On Tue, May 16, 2023 at 2:39 AM Amit Kapila wrote: > Agreed with you and Sawada-San about having a test. BTW, shall we > slightly tweak the documentation [1]: "The subscription apply process > will, at a session level, run with the privileges of the subscription > owner. However, when performing

Re: cutting down the TODO list thread

2023-05-16 Thread Matthias van de Meent
On Mon, 15 May 2023 at 20:51, Robert Haas wrote: > > On Mon, May 15, 2023 at 2:05 PM Matthias van de Meent > wrote: > > > Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, > > > and CLUSTER > > > -> There are external tools that help with this kind of analysis > > > >

Re: cutting down the TODO list thread

2023-05-16 Thread Robert Haas
On Tue, May 16, 2023 at 4:50 AM Alvaro Herrera wrote: > Hmm, I agree with removing the entry from the TODO list, but why is this > something we Do Not Want? If somebody shows up and do some analysis > that in a certain workload it is beneficial to do this, then I don't > think we should turn

Re: Should CSV parsing be stricter about mid-field quotes?

2023-05-16 Thread Joel Jacobson
On Sun, May 14, 2023, at 16:58, Andrew Dunstan wrote: > And if people do follow the method you describe then their input with > unescaped quotes will be rejected 999 times out of 1000. It's only cases where > the field happens to have an even number of embedded quotes, like Joel's > somewhat

Re: Memory leak from ExecutorState context?

2023-05-16 Thread Tomas Vondra
On 5/16/23 00:15, Jehan-Guillaume de Rorthais wrote: > Hi, > > Thanks for your review! > > On Sat, 13 May 2023 23:47:53 +0200 > Tomas Vondra wrote: > >> Thanks for the patches. A couple mostly minor comments, to complement >> Melanie's review: >> >> 0001 >> >> I'm not really sure about calling

Re: de-catalog one error message

2023-05-16 Thread Alvaro Herrera
On 2023-May-11, Daniel Gustafsson wrote: > > On 10 May 2023, at 19:54, Alvaro Herrera wrote: > > Therefore, I propose to turn these messages into errmsg_internal(), so > > that we do not translate them. > > AFAICT from following the code that seems correct, and I agree with removing > them

Re: pgsql: Clean up role created in new subscription test.

2023-05-16 Thread Daniel Gustafsson
> On 15 May 2023, at 10:59, Daniel Gustafsson wrote: > Looking at this I also found a bug introduced in the TAP format patch, which > made failed single run tests report as 0ms due to the parameters being mixed > up > in the report function call. This is in 0002, which I'll apply to HEAD >

Re: cutting down the TODO list thread

2023-05-16 Thread Alvaro Herrera
On 2023-May-13, John Naylor wrote: > > 2. Propose to move to the "Not Wanted list": > Consider having single-page pruning update the visibility map > -> Comment from Heikki in the thread: > "I think I was worried about the possible performance impact of having to > clear the

Re: Using make_ctags leaves tags files in git

2023-05-16 Thread Daniel Gustafsson
> On 15 May 2023, at 12:33, Alvaro Herrera wrote: > > On 2023-May-14, Tom Lane wrote: > >> Steve Chavez writes: >>> In this case I just propose adding 'tags'. I believe it's reasonable to >>> ignore these as they're produced by make_ctags. >> >> Our policy on this is that the project's

Re: Conflict between regression tests namespace & transactions due to recent changes

2023-05-16 Thread Marina Polyakova
On 2023-05-16 02:19, Michael Paquier wrote: On Mon, May 15, 2023 at 11:23:18PM +0300, Marina Polyakova wrote: Maybe use a separate schema for all new objects in the transaction test?.. See diff_set_tx_schema.patch. Sure, you could do that to bypass the failure (without the "public"

Re: Autogenerate some wait events code and documentation

2023-05-16 Thread Michael Paquier
On Mon, May 15, 2023 at 06:45:23PM +0200, Drouvot, Bertrand wrote: > On 5/6/23 4:37 AM, Michael Paquier wrote: >> On Sat, May 06, 2023 at 11:23:17AM +0900, Michael Paquier wrote: I'll look at v7 when the v17 branch opens and propose the separate patch mentioned above at that time too.

Re: running logical replication as the subscription owner

2023-05-16 Thread Amit Kapila
On Mon, May 15, 2023 at 7:24 PM Jelte Fennema wrote: > > On Mon, 15 May 2023 at 14:47, Masahiko Sawada wrote: > > Thank you for the patch! I think we might want to have tests for it. > > Yes, code looks good. But indeed some tests would be great. It seems > we forgot to actually do: > Agreed

Re: running logical replication as the subscription owner

2023-05-16 Thread Amit Kapila
On Fri, May 12, 2023 at 5:25 PM Ajin Cherian wrote: > > On Fri, May 12, 2023 at 1:49 PM Amit Kapila wrote: > > > > I tried the following test: > > > Repeat On the publisher and subscriber: > /* Create role regress_alice with NOSUPERUSER on >publisher and subscriber and

Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

2023-05-16 Thread Michael Paquier
On Mon, May 15, 2023 at 12:36:51PM -0700, Nathan Bossart wrote: > There's still some time before we'll be able to commit any of these, but > here is an attempt at addressing all the feedback thus far. - The parenthesized syntax was added in - PostgreSQL 9.0; the unparenthesized - syntax is

Re: walsender performance regression due to logical decoding on standby changes

2023-05-16 Thread Drouvot, Bertrand
Hi, On 5/15/23 4:39 PM, Bharath Rupireddy wrote: On Mon, May 15, 2023 at 6:14 PM Masahiko Sawada wrote: On Mon, May 15, 2023 at 1:49 PM Thomas Munro wrote: Do we need to add an open item for this issue in https://wiki.postgresql.org/wiki/PostgreSQL_16_Open_Items? If yes, can anyone in

Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN

2023-05-16 Thread Michael Paquier
On Mon, May 15, 2023 at 10:07:04AM +0200, Drouvot, Bertrand wrote: > This is preliminary work to autogenerate some wait events > code and documentation done in [1]. > > The patch introduces 2 new "wait events" (WAIT_EVENT_EXTENSION > and WAIT_EVENT_BUFFER_PIN) and their associated functions >

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-16 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thanks for reviewing! PSA new version patchset. > 1. get_logical_slot_infos_per_db > > I noticed that the way this is coded, 'ntups' and 'num_slots' seems to > have exactly the same meaning. IMO you can simplify this by removing > 'ntups'. > > BEFORE > + int ntups; > + int

Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN

2023-05-16 Thread Drouvot, Bertrand
Hi, On 5/16/23 7:14 AM, Michael Paquier wrote: On Mon, May 15, 2023 at 06:01:02PM -0700, Andres Freund wrote: On 2023-05-16 09:38:54 +0900, Michael Paquier wrote: On Mon, May 15, 2023 at 05:17:16PM -0700, Andres Freund wrote: These are the two things refactored in the patch, explaining the