Re: benchmark results comparing versions 15.2 and 16

2023-05-05 Thread MARK CALLAGHAN
I have two more runs of the benchmark in progress so we will have 3 results for each of the test cases to confirm that the small regressions are repeatable. On Fri, May 5, 2023 at 1:34 PM Andres Freund wrote: > One thing that's somewhat odd is that there's very marked changes in l.i0's > p99 la

Re: [PATCH] Add native windows on arm64 support

2023-05-05 Thread Tom Lane
Michael Paquier writes: > Seeing how simple this has become, I would be really tempted to get > that applied, especially if there's a buildfarm machine able to follow > up.. On the one hand, we are in a stability period for v16, so it may > not be the best moment ever. On the other hand, waiting

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2023-05-05 Thread Tatsuo Ishii
>> The attached test patch is mostly the same as in the previous patch >> set, but it doesn't fail on row_number anymore as the main patch >> only rejects aggregate functions. The test patch also adds a test for > >> +SELECT sum(orbit) RESPECT NULLS OVER () FROM planets; -- succeeds > > I think t

Re: [PATCH] Add native windows on arm64 support

2023-05-05 Thread Michael Paquier
On Tue, May 02, 2023 at 08:51:09AM +0100, Niyas Sait wrote: > I've attached a new version (v8) to fix the above indentation issue. > > Could someone please help with the review ? Seeing how simple this has become, I would be really tempted to get that applied, especially if there's a buildfarm ma

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-05 Thread Michael Paquier
On Tue, May 02, 2023 at 01:19:49PM +0100, Dagfinn Ilmari Mannsåker wrote: > Dagfinn Ilmari Mannsåker writes: >> This is for completing the word CREATE itself after CREATE SCHEMA >> [[] AUTHORIZATION] . The things that can come after that >> are already handled generically earlier in the function:

Re: Add LZ4 compression in pg_dump

2023-05-05 Thread Michael Paquier
On Fri, May 05, 2023 at 02:13:28PM +, gkokola...@pm.me wrote: > Good point. I thought about it before submitting the patch. I > concluded that given the complexity and operations involved in > LZ4Stream_read_internal() and the rest of t he pg_dump/pg_restore > code, the memset() call will be ne

Re: MERGE lacks ruleutils.c decompiling support!?

2023-05-05 Thread Tom Lane
Michael Paquier writes: > +WHEN NOT MATCHED > + AND s.a > 100 > + THEN INSERT (id, data) OVERRIDING SYSTEM VALUE > + VALUES (s.a, DEFAULT) > About OVERRIDING, I can see that this is still missing coverage for > OVERRIDING USER VALUE. Yeah, I couldn't see that covering that too was worth an

Re: MERGE lacks ruleutils.c decompiling support!?

2023-05-05 Thread Michael Paquier
On Fri, May 05, 2023 at 05:06:34PM -0400, Tom Lane wrote: > I did a bit of review and more work on this: > > * Added the missing OVERRIDING support > > * Played around with the pretty-printing indentation > > * Improved test coverage, and moved the test to rules.sql where > I thought it fit more

Re: Autogenerate some wait events code and documentation

2023-05-05 Thread Michael Paquier
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. > > Thanks, again. By the way, while browsing through the patch, I have noticed two things: - The ordering of the items

Re: Autogenerate some wait events code and documentation

2023-05-05 Thread Michael Paquier
On Thu, May 04, 2023 at 08:39:49AM +0200, Drouvot, Bertrand wrote: > On 5/1/23 1:59 AM, Michael Paquier wrote: > I'm not sure I like it. First, it does break the "Note" ordering as compare > to the current documentation. That's not a big deal though. > > Secondly, what If we need to add some note(

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 7:53 PM Drouvot, Bertrand wrote: > > > On 5/5/23 2:28 PM, Amit Kapila wrote: > > On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand > > wrote: > > > > It seems due to some reason the current wal file is not switched due > > to some reason. > > Oh wait, here is a NON failing o

Re: Order changes in PG16 since ICU introduction

2023-05-05 Thread Jeff Davis
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 argument that we should con

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-05-05 Thread Cary Huang
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, failed Spec compliant: not tested Documentation:not tested Hello This is one of those features that is beneficial to a handful

Bancolombia Open Source Program Office - Proposal of contribution on lock inactive users

2023-05-05 Thread Francisco Luis Arbelaez Lopez
Dear PostgreSQL Community, Hope you all are doing very well. My name is Francisco Arbelaez and I would like to introduce myself in behalf of Bancolombia, from Open Source Office. >From the Bancolombia organization, we have the responsibility to migrate >private licensed technology to Open Source

Re: MERGE lacks ruleutils.c decompiling support!?

2023-05-05 Thread Tom Lane
Alvaro Herrera writes: > Here's a first attempt. I mostly just copied code from the insert and > update support routines. There's a couple of things missing still, but > I'm not sure I'll get to it tonight. I only tested to the extent of > what's in the new regression test. I did a bit of revi

Re: benchmark results comparing versions 15.2 and 16

2023-05-05 Thread Andres Freund
Hi, On 2023-05-05 10:45:12 -0700, MARK CALLAGHAN wrote: > This is mostly a hobby project for me - my other hobby is removing > invasive weeds. Hah :) > Summary of the results: > * from r1 - insert-heavy (l.i0, l.i1) and create indexes (l.x) steps are > ~2% slower in PG 16 > * from r2 - create i

Re: PGDOCS - Replica Identity quotes

2023-05-05 Thread David Zhang
On 2023-03-16 4:46 p.m., Peter Smith wrote: A rebase was needed due to the recent REPLICA IDENTITY push [1]. PSA v2. - A published table must have a replica identity configured in + A published table must have a replica identity configured in +1 order to be able to replicate UP

Re: MERGE lacks ruleutils.c decompiling support!?

2023-05-05 Thread Alvaro Herrera
On 2023-May-05, Tom Lane wrote: > (I'd guess that decompiling the WHEN clause would take a nontrivial > amount of new code, so maybe fixing it on such short notice is > impractical. But ugh.) Here's a first attempt. I mostly just copied code from the insert and update support routines. There's

benchmark results comparing versions 15.2 and 16

2023-05-05 Thread MARK CALLAGHAN
Let me know if results like this shouldn't be posted here. This is mostly a hobby project for me - my other hobby is removing invasive weeds. I am happy to answer questions and run more tests, but turnaround for answers won't be instant. Getting results from Linux perf for these tests is on my TOD

Re: psql: Add role's membership options to the \du+ command

2023-05-05 Thread David G. Johnston
On Wed, May 3, 2023 at 9:30 AM Jonathan S. Katz wrote: > [Personal hat] > > Looking at Pavel's latest patch, I do find the output easy to > understand, though do we need to explicitly list "empty" if there are no > membership permissions? > > Yes. I dislike having the equivalent of null embedded

First draft of back-branch release notes is done

2023-05-05 Thread Tom Lane
... at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=56e869a0987c93f594e73c1c3e49274de5c502d3 As usual, please send corrections/comments by Sunday. regards, tom lane

Re: MERGE lacks ruleutils.c decompiling support!?

2023-05-05 Thread Alvaro Herrera
On 2023-May-05, Tom Lane wrote: > I made this function: > > CREATE OR REPLACE FUNCTION test_fun() > RETURNS void > LANGUAGE SQL > BEGIN ATOMIC > MERGE INTO target > USING source s on s.id = target.id > WHEN MATCHED THEN > UPDATE SET data = s.data > WHEN NOT MATCHED THEN > INSERT VALUES (s.id,

Re: Tables getting stuck at 's' state during logical replication

2023-05-05 Thread Padmavathi G
Some background on the setup on which I am trying to carry out the upgrade: We have a pod in a kubernetes cluster which contains the postgres 11 image. We are following the logical replication process for upgrade Steps followed for logical replication: 1. Created a new pod in the same kubernetes

Re: Add PQsendSyncMessage() to libpq

2023-05-05 Thread Anton Kirilov
Hello, On Thu, 4 May 2023, 11:36 Alvaro Herrera, mailto:alvhe...@alvh.no-ip.org>> wrote: > On 2023-May-04, Anton Kirilov wrote: > If you want to make sure it's fully flushed, your only option is to have > the call block. Surely PQflush() returning 0 would signify that the output buffer has been

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Drouvot, Bertrand
On 5/5/23 2:28 PM, Amit Kapila wrote: On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand wrote: It seems due to some reason the current wal file is not switched due to some reason. Oh wait, here is a NON failing one: https://cirrus-ci.com/task/5086849685782528 (I modified the .cirrus.yml so

Re: Add LZ4 compression in pg_dump

2023-05-05 Thread gkokolatos
--- Original Message --- On Friday, May 5th, 2023 at 3:23 PM, Andrew Dunstan wrote: > On 2023-05-05 Fr 06:02, gkokola...@pm.me wrote: > >> --- Original Message --- >> On Friday, May 5th, 2023 at 8:00 AM, Alexander Lakhin >> [](mailto:exclus...@gmail.com) >> wrote: >> >>> 23.03.202

MERGE lacks ruleutils.c decompiling support!?

2023-05-05 Thread Tom Lane
I made this function: CREATE OR REPLACE FUNCTION test_fun() RETURNS void LANGUAGE SQL BEGIN ATOMIC MERGE INTO target USING source s on s.id = target.id WHEN MATCHED THEN UPDATE SET data = s.data WHEN NOT MATCHED THEN INSERT VALUES (s.id, s.data); end; It appears to work fine, but: regression

Re: Add LZ4 compression in pg_dump

2023-05-05 Thread Andrew Dunstan
On 2023-05-05 Fr 06:02, gkokola...@pm.me wrote: --- Original Message --- On Friday, May 5th, 2023 at 8:00 AM, Alexander Lakhin wrote: 23.03.2023 20:10, Tomas Vondra wrote: So pushed all three parts, after updating the commit messages a bit. This leaves the empty-data issue (

[DOC] Update ALTER SUBSCRIPTION documentation

2023-05-05 Thread Robert Sjöblom
Hi, We have recently used the PostgreSQL documentation when setting up our logical replication. We noticed there was a step missing in the documentation on how to drop a logical replication subscription with a replication slot attached. We clarify the documentation to include prerequisites

Re: Should CreateExprContext() be using ALLOCSET_DEFAULT_SIZES?

2023-05-05 Thread Daniel Gustafsson
> On 17 Feb 2023, at 05:01, Andres Freund wrote: > ISTM that we really shouldn't use ALLOCSET_DEFAULT_SIZES for expression > contexts, as they most commonly see only a few small, or no, allocations. Looking into this I think you are correct. > ISTM that we could save a reasonable amount of memo

Re: Fix typos and inconsistencies for v16

2023-05-05 Thread Michael Paquier
On Tue, May 02, 2023 at 12:26:31PM +0900, Michael Paquier wrote: > On Fri, Apr 21, 2023 at 12:00:00PM +0300, Alexander Lakhin wrote: >> 4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since >> 5da14938f; maybe this change should be backpatched > > Yes, we'd better backpatch that.

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand wrote: > > On 5/5/23 12:58 PM, Amit Kapila wrote: > > On Fri, May 5, 2023 at 4:02 PM Drouvot, Bertrand > > wrote: > > > How did you concluded that 00010003 is the file the > > test is expecting to be removed? > > > because I added a

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Drouvot, Bertrand
On 5/5/23 12:58 PM, Amit Kapila wrote: On Fri, May 5, 2023 at 4:02 PM Drouvot, Bertrand wrote: How did you concluded that 00010003 is the file the test is expecting to be removed? because I added a note in the test that way: " @@ -535,6 +539,7 @@ $node_standby->safe_psql

Re: issue with meson builds on msys2

2023-05-05 Thread Andrew Dunstan
On 2023-05-04 Th 19:54, Andres Freund wrote: Hi, On 2023-05-03 09:20:28 -0400, Andrew Dunstan wrote: On 2023-04-27 Th 18:18, Andres Freund wrote: On 2023-04-26 09:59:05 -0400, Andrew Dunstan wrote: Still running into this, and I am rather stumped. This is a blocker for buildfarm support for

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 4:02 PM Drouvot, Bertrand wrote: > > On 5/5/23 11:29 AM, Amit Kapila wrote: > > On Fri, May 5, 2023 at 1:16 PM Drouvot, Bertrand > > wrote: > >> > >> > >> After multiple attempts, I got one failing one. > >> > >> Issue is that we expect this file to be removed: > >> > >> [0

Re: Tables getting stuck at 's' state during logical replication

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 3:04 PM Padmavathi G wrote: > > Hello, > I am trying out logical replication for upgrading postgres instance from > version 11 to 15.x. In the process, I noticed that some tables get stuck in > the 's' state during logical replication and they do not move to the 'r' > sta

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Drouvot, Bertrand
On 5/5/23 11:29 AM, Amit Kapila wrote: On Fri, May 5, 2023 at 1:16 PM Drouvot, Bertrand wrote: After multiple attempts, I got one failing one. Issue is that we expect this file to be removed: [07:24:27.261](0.899s) #WAL file is /Users/admin/pgsql/build/testrun/recovery/035_standby_logic

Re: Support logical replication of DDLs

2023-05-05 Thread Peter Smith
I revisited the 0005 patch to verify all changes made to address my previous review comments [1][2][3][4] were OK. Not all changes were made quite as expected, and there were a few other things I noticed in passing. == 1. General I previously [1] wrote a comment: Use consistent uppercase fo

Re: Add LZ4 compression in pg_dump

2023-05-05 Thread gkokolatos
--- Original Message --- On Friday, May 5th, 2023 at 8:00 AM, Alexander Lakhin wrote: > > > 23.03.2023 20:10, Tomas Vondra wrote: > > > So pushed all three parts, after updating the commit messages a bit. > > > > This leaves the empty-data issue (which we have a fix for) and th

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 2:59 PM Amit Kapila wrote: > > On Fri, May 5, 2023 at 1:16 PM Drouvot, Bertrand > wrote: > > > > > > After multiple attempts, I got one failing one. > > > > Issue is that we expect this file to be removed: > > > > [07:24:27.261](0.899s) #WAL file is > > /Users/admin/pgsql/

Feature: Add reloption support for table access method

2023-05-05 Thread 吴昊
Hi pg-hackers, When I wrote an extension to implement a new storage by table access method. I found some issues that the existing code has strong assumptions for heap tables now. Here are 3 issues that I currently have: 1. Index access method has a callback to handle reloptions, but table acc

Tables getting stuck at 's' state during logical replication

2023-05-05 Thread Padmavathi G
Hello, I am trying out logical replication for upgrading postgres instance from version 11 to 15.x. In the process, I noticed that some tables get stuck in the 's' state during logical replication and they do not move to the 'r' state. I tried to drop the subscription and create a new subscriber, b

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 1:16 PM Drouvot, Bertrand wrote: > > > After multiple attempts, I got one failing one. > > Issue is that we expect this file to be removed: > > [07:24:27.261](0.899s) #WAL file is > /Users/admin/pgsql/build/testrun/recovery/035_standby_logical_decoding/data/t_035_standby_lo

Re: A bug with ExecCheckPermissions

2023-05-05 Thread Alvaro Herrera
On 2023-May-04, Tom Lane wrote: > It looks like this patch caused a change in the order of output from > the sepgsql tests [1]. If you expected it to re-order permissions > checking then this is probably fine, and we should just update the > expected output. Yeah, looks correct. Fix pushed. --

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Drouvot, Bertrand
On 5/5/23 9:04 AM, Amit Kapila wrote: On Fri, May 5, 2023 at 11:08 AM Drouvot, Bertrand wrote: On 5/4/23 6:43 AM, Amit Kapila wrote: On Thu, May 4, 2023 at 8:37 AM vignesh C wrote: Thanks for posting the updated patch, I had run this test in a loop of 100 times to verify that there was

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Drouvot, Bertrand
Hi, On 5/5/23 9:11 AM, vignesh C wrote: On Fri, 5 May 2023 at 12:34, Amit Kapila wrote: On Fri, May 5, 2023 at 11:08 AM Drouvot, Bertrand wrote: On 5/4/23 6:43 AM, Amit Kapila wrote: On Thu, May 4, 2023 at 8:37 AM vignesh C wrote: Thanks for posting the updated patch, I had run this te

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread vignesh C
On Fri, 5 May 2023 at 12:34, Amit Kapila wrote: > > On Fri, May 5, 2023 at 11:08 AM Drouvot, Bertrand > wrote: > > > > On 5/4/23 6:43 AM, Amit Kapila wrote: > > > On Thu, May 4, 2023 at 8:37 AM vignesh C wrote: > > >> > > >> Thanks for posting the updated patch, I had run this test in a loop of

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-05 Thread Amit Kapila
On Fri, May 5, 2023 at 11:08 AM Drouvot, Bertrand wrote: > > On 5/4/23 6:43 AM, Amit Kapila wrote: > > On Thu, May 4, 2023 at 8:37 AM vignesh C wrote: > >> > >> Thanks for posting the updated patch, I had run this test in a loop of > >> 100 times to verify that there was no failure because of rac