Re: Generating code for query jumbling through gen_node_support.pl

2023-07-10 Thread Andrey Lepikhov
On 11/7/2023 12:35, Michael Paquier wrote: On Tue, Jul 11, 2023 at 12:29:29PM +0700, Andrey Lepikhov wrote: I vote for only one method based on a query tree structure. Noted BTW, did you think about different algorithms of queryId generation? Not really, except if you are referring to the

Re: Initial Schema Sync for Logical Replication

2023-07-10 Thread Masahiko Sawada
On Mon, Jul 10, 2023 at 8:06 PM Kumar, Sachin wrote: > > > > > From: Amit Kapila > > On Wed, Jul 5, 2023 at 7:45 AM Masahiko Sawada > > wrote: > > > > > > On Mon, Jun 19, 2023 at 5:29 PM Peter Smith > > wrote: > > > > > > > > Hi, > > > > > > > > Below are my review comments for the PoC patch 00

Re: Add index scan progress to pg_stat_progress_vacuum

2023-07-10 Thread Masahiko Sawada
On Thu, Jul 6, 2023 at 2:28 PM Masahiko Sawada wrote: > > On Thu, Jul 6, 2023 at 11:15 AM Michael Paquier wrote: > > > > On Thu, Jul 06, 2023 at 11:07:14AM +0900, Masahiko Sawada wrote: > > > Thank you for updating the patch. It looks good to me too. I've > > > updated the commit message. > > > >

Re: Exclusion constraints on partitioned tables

2023-07-10 Thread Paul A Jungwirth
On Mon, Jul 10, 2023 at 8:06 AM Paul A Jungwirth wrote: > > On Mon, Jul 10, 2023 at 7:05 AM Peter Eisentraut wrote: > > I'm not sure what value we would get from testing this with btree_gist, > > but if we wanted to do that, then adding a new test file to the > > btree_gist sql/ directory would s

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-10 Thread Masahiko Sawada
On Tue, Jul 11, 2023 at 1:05 PM Amit Kapila wrote: > > On Tue, Jul 11, 2023 at 4:54 AM Peter Smith wrote: > > > > On Mon, Jul 10, 2023 at 2:21 PM Amit Kapila wrote: > > > > > > On Mon, Jul 10, 2023 at 7:55 AM Peter Smith wrote: > > > > > > > > On Sat, Jul 8, 2023 at 1:49 PM Amit Kapila > > >

Re: Generating code for query jumbling through gen_node_support.pl

2023-07-10 Thread Michael Paquier
On Tue, Jul 11, 2023 at 12:29:29PM +0700, Andrey Lepikhov wrote: > I vote for only one method based on a query tree structure. Noted > BTW, did you think about different algorithms of queryId generation? Not really, except if you are referring to the possibility of being able to handle different

unrecognized node type while displaying a Path due to dangling pointer

2023-07-10 Thread Jeevan Chalke
Hello, While debugging one issue, we have added the below line in postgresGetForeignPlan() to see the foreignrel details. @@ -1238,6 +1238,8 @@ postgresGetForeignPlan(PlannerInfo *root, boolhas_limit = false; ListCell *lc; + elog(INFO, "foreignrel: %s", nodeToString(foreignre

Re: Generating code for query jumbling through gen_node_support.pl

2023-07-10 Thread Andrey Lepikhov
On 11/7/2023 05:35, Michael Paquier wrote: On Mon, Jan 30, 2023 at 11:48:45AM +0100, Peter Eisentraut wrote: On 27.01.23 03:59, Michael Paquier wrote: At the end, that would be unnoticeable for the average user, I guess, but here are the numbers I get on my laptop :) Personally, I think we do

Re: Show various offset arrays for heap WAL records

2023-07-10 Thread Peter Geoghegan
On Mon, Jul 10, 2023 at 12:44 AM Heikki Linnakangas wrote: > This is still listed in the July commitfest; is there some work remaining? I don't think so; not in the scope of the original patch series from Melanie, at least. > You moved the comment from rmgrdesc_utils.c into rmgrdesc_utils.h, but

RE: [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL

2023-07-10 Thread Hayato Kuroda (Fujitsu)
Dear Amit, Önder Thanks for giving discussions. IIUC all have agreed that the patch focus on extending to Hash index. PSA the patch for that. The basic workflow was not so changed, some comments were updated. Regarding the test code, I think it should be combined into 032_subscribe_use_index.pl

Re: Use COPY for populating all pgbench tables

2023-07-10 Thread Michael Paquier
On Wed, Jun 14, 2023 at 10:58:06AM -0500, Tristan Partin wrote: > Again, I forget to actually attach. Holy guacamole. Looks rather OK seen from here, applied 0001 while browsing the series. I have a few comments about 0002. static void -initGenerateDataClientSide(PGconn *con) +initBranch(PGconn

Re: Autogenerate some wait events code and documentation

2023-07-10 Thread Drouvot, Bertrand
On 7/11/23 12:52 AM, Michael Paquier wrote: On Mon, Jul 10, 2023 at 09:11:36AM +0200, Alvaro Herrera wrote: I don't like this bit, because it means the .txt file is now ungreppable as source of the enum name. Things become mysterious and people have to track down the event name by reading th

Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-10 Thread Amit Kapila
On Mon, Jul 10, 2023 at 7:26 PM Sergei Kornilov wrote: > > >> Is this restriction only for the subscriber? > >> > >> If we have not changed the replica identity and there is no primary key, > >> then we forbid update and delete on the publication side (a fairly common > >> usage error at the beg

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-10 Thread Amit Kapila
On Tue, Jul 11, 2023 at 4:54 AM Peter Smith wrote: > > On Mon, Jul 10, 2023 at 2:21 PM Amit Kapila wrote: > > > > On Mon, Jul 10, 2023 at 7:55 AM Peter Smith wrote: > > > > > > On Sat, Jul 8, 2023 at 1:49 PM Amit Kapila > > > wrote: > > > > > > > > On Fri, Jul 7, 2023 at 1:36 PM Masahiko Sawad

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-10 Thread Amit Kapila
On Mon, Jul 10, 2023 at 8:01 PM Melih Mutlu wrote: > > Hayato Kuroda (Fujitsu) , 6 Tem 2023 Per, > 12:47 tarihinde şunu yazdı: > > > > Dear Melih, > > > > > Thanks for the 0003 patch. But it did not work for me. Can you create > > > a subscription successfully with patch 0003 applied? > > > I get

Re: Cleaning up array_in()

2023-07-10 Thread jian he
On Sun, Jul 9, 2023 at 3:38 AM Heikki Linnakangas wrote: > > On 08/07/2023 19:08, Tom Lane wrote: > > I wrote: > >> So I end up with the attached. I went ahead and dropped > >> ArrayGetOffset0() as part of 0001, and I split 0002 into two patches > >> where the new 0002 avoids re-indenting any exi

Re: Make pgbench exit on SIGINT more reliably

2023-07-10 Thread Michael Paquier
On Tue, Jun 27, 2023 at 09:42:05AM -0500, Tristan Partin wrote: > I would say there probably isn't much benefit if you think the polling > for CancelRequested is fine. Looking at the other patch, I think it > might be simple to add an exit code for SIGINT. But I think it might be > best to do it af

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-10 Thread Peter Smith
On Tue, Jul 11, 2023 at 12:31 AM Melih Mutlu wrote: > > Hi, > > Hayato Kuroda (Fujitsu) , 6 Tem 2023 Per, > 12:47 tarihinde şunu yazdı: > > > > Dear Melih, > > > > > Thanks for the 0003 patch. But it did not work for me. Can you create > > > a subscription successfully with patch 0003 applied? > >

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-10 Thread Peter Smith
Here are some review comments for patch v16-3 == 1. Commit Message. The patch description is missing. == 2. General. +LogicalRepSyncTableStart(XLogRecPtr *origin_startpos, int worker_slot) and +start_table_sync(XLogRecPtr *origin_startpos, + char **myslotname, + int worker_slot)

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Masahiko Sawada
On Tue, Jul 11, 2023 at 1:24 AM Andres Freund wrote: > > Hi, > > On 2023-07-03 11:53:56 +0200, Jakub Wartak wrote: > > Out of curiosity I've tried and it is reproducible as you have stated : XFS > > @ 4.18.0-425.10.1.el8_7.x86_64: > >... > > According to iostat and blktrace -d /dev/sda -o - | blkp

Re: [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL

2023-07-10 Thread Amit Kapila
On Mon, Jul 10, 2023 at 7:43 PM Önder Kalacı wrote: > >> I also think so. If this is true, how can we think of supporting >> indexes other than hash like GiST, and SP-GiST as mentioned by you in >> your latest email? As per my understanding if we don't have PK or >> replica identity then after the

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Masahiko Sawada
On Tue, Jul 11, 2023 at 12:34 AM Andres Freund wrote: > > Hi, > > On 2023-07-03 11:55:13 +0900, Masahiko Sawada wrote: > > While testing PG16, I observed that in PG16 there is a big performance > > degradation in concurrent COPY into a single relation with 2 - 16 > > clients in my environment. I'v

pg16b2: REINDEX segv on null pointer in RemoveFromWaitQueue

2023-07-10 Thread Justin Pryzby
An instance compiled locally, without assertions, failed like this: < 2023-07-09 22:04:46.470 UTC >LOG: process 30002 detected deadlock while waiting for ShareLock on transaction 813219577 after 333.228 ms < 2023-07-09 22:04:46.470 UTC >DETAIL: Process holding the lock: 2103. Wait queue: 300

Re: Add more sanity checks around callers of changeDependencyFor()

2023-07-10 Thread Michael Paquier
On Mon, Jul 10, 2023 at 11:04:48AM -0400, Tom Lane wrote: > ISTR that we discussed forbidding such changes way back when the > extension mechanism was invented, and decided against it on the > grounds that (a) it'd be nanny-ism, (b) we'd have to add checks in an > awful lot of places and it'd be ea

Re: Add hint message for check_log_destination()

2023-07-10 Thread Japin Li
On Mon, 10 Jul 2023 at 14:23, Masahiko Sawada wrote: > On Mon, Jul 10, 2023 at 2:07 PM Kyotaro Horiguchi > wrote: >> >> At Mon, 10 Jul 2023 09:04:42 +0800, Japin Li wrote in >> > >> > On Sat, 08 Jul 2023 at 12:48, Michael Paquier wrote: >> > > On Fri, Jul 07, 2023 at 07:23:47PM +0800, Japin L

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-10 Thread Tristan Partin
Here is an up to date patch given some churn on the master branch. -- Tristan Partin Neon (https://neon.tech) From b68cec481768c7c635ec48329b4764eced264572 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Fri, 30 Jun 2023 09:31:04 -0500 Subject: [PATCH v3 1/3] Skip checking for uselocale on W

Re: WAL Insertion Lock Improvements

2023-07-10 Thread Michael Paquier
On Mon, Jun 05, 2023 at 08:00:00AM +0530, Bharath Rupireddy wrote: > On Wed, May 31, 2023 at 5:05 PM Michael Paquier wrote: >> @Andres: Were there any extra tests you wanted to be run for more >> input? > > @Andres Freund please let us know your thoughts. Err, ping. It seems like this thread is

Re: Add bump memory context type and use it for tuplesorts

2023-07-10 Thread David Rowley
On Tue, 27 Jun 2023 at 21:19, David Rowley wrote: > I've attached the bump allocator patch and also the script I used to > gather the performance results in the first 2 tabs in the attached > spreadsheet. I've attached a v2 patch which changes the BumpContext a little to remove some of the fields

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-10 Thread Jacob Champion
On Fri, Jul 7, 2023 at 6:01 PM Thomas Munro wrote: > > On Fri, Jul 7, 2023 at 4:57 AM Jacob Champion wrote: > > On Wed, Jul 5, 2023 at 3:07 PM Thomas Munro wrote: > > > BTW I will happily do the epoll->kqueue port work if necessary. > > > > And I will happily take you up on that; thanks! > > Som

Re: Reducing connection overhead in pg_upgrade compat check phase

2023-07-10 Thread Daniel Gustafsson
> On 11 Jul 2023, at 01:09, Nathan Bossart wrote: > On Mon, Jul 10, 2023 at 04:43:23PM +0200, Daniel Gustafsson wrote: >>> +static int n_data_types_usage_checks = 7; >>> >>> Can we determine this programmatically so that folks don't need to remember >>> to update it? >> >> Fair point, I've adde

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-10 Thread Peter Smith
On Mon, Jul 10, 2023 at 2:21 PM Amit Kapila wrote: > > On Mon, Jul 10, 2023 at 7:55 AM Peter Smith wrote: > > > > On Sat, Jul 8, 2023 at 1:49 PM Amit Kapila wrote: > > > > > > On Fri, Jul 7, 2023 at 1:36 PM Masahiko Sawada > > > wrote: > > > > > > > > I prefer the first suggestion. I've attach

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-10 Thread Jacob Champion
On Fri, Jul 7, 2023 at 2:16 PM Andrey Chudnovsky wrote: > Please confirm my understanding of the flow is correct: > 1. Client calls PQconnectStart. > - The client doesn't know yet what is the issuer and the scope. Right. (Strictly speaking it doesn't even know that OAuth will be used for the co

Re: sslinfo extension - add notbefore and notafter timestamps

2023-07-10 Thread Cary Huang
> Thanks for the new version! It doesn't fail the ssl tests, but the Kerberos > test now fails. You can see the test reports from the CFBot here: Yes, kerberos tests failed due to the addition of notbefore and notafter values. The values array within "pg_stat_get_activity" function related to

Re: Reducing connection overhead in pg_upgrade compat check phase

2023-07-10 Thread Nathan Bossart
On Mon, Jul 10, 2023 at 04:43:23PM +0200, Daniel Gustafsson wrote: >> On 8 Jul 2023, at 23:43, Nathan Bossart wrote: >> Since "script" will be NULL and "db_used" will be false in the first >> iteration of the loop, couldn't we move this stuff to before the loop? > > We could. It's done this way

Re: [PoC] Implementation of distinct in Window Aggregates

2023-07-10 Thread Andreas Karlsson
On 3/12/23 09:17, Ankit Kumar Pandey wrote: Attaching updated patch with a fix for an issue in window function. I have also fixed naming convention of patch as last patch had incompatible name. Hi, This patch does not apply to master. Could you rebase it and submit it as one patch which app

Re: Autogenerate some wait events code and documentation

2023-07-10 Thread Michael Paquier
On Mon, Jul 10, 2023 at 09:11:36AM +0200, Alvaro Herrera wrote: > I don't like this bit, because it means the .txt file is now ungreppable > as source of the enum name. Things become mysterious and people have to > track down the event name by reading the the Perl generating script. > It's annoyin

Re: Refactoring backend fork+exec code

2023-07-10 Thread Andres Freund
Hi, On 2023-06-18 14:22:33 +0300, Heikki Linnakangas wrote: > I started to look at the code in postmaster.c related to launching child > processes. I tried to reduce the difference between EXEC_BACKEND and > !EXEC_BACKEND code paths, and put the code that needs to differ behind a > better abstract

Re: Generating code for query jumbling through gen_node_support.pl

2023-07-10 Thread Michael Paquier
On Mon, Jan 30, 2023 at 11:48:45AM +0100, Peter Eisentraut wrote: > On 27.01.23 03:59, Michael Paquier wrote: >> At the end, that would be unnoticeable for the average user, I guess, >> but here are the numbers I get on my laptop :) > > Personally, I think we do not want the two jumble methods in

Re: check_strxfrm_bug()

2023-07-10 Thread Thomas Munro
On Tue, Jul 11, 2023 at 2:28 AM Peter Eisentraut wrote: > This looks sensible to me. > > If we ever need mbstowcs_l() etc. outside of pg_locale.c, then the > proper way would be to make a mbstowcs_l.c file in src/port/. > > But I like your approach for now because it moves us more firmly into > th

Re: pg_upgrade instructions involving "rsync --size-only" might lead to standby corruption?

2023-07-10 Thread Nikolay Samokhvalov
On Mon, Jul 10, 2023 at 2:02 PM Michael Banck wrote: > Thanks for that! > Thanks for the fast review. > > > I agree with Andrey – without it, we don't have any good way to upgrade > > large clusters in short time. Default rsync mode (without "--size-only") > > takes a lot of time too, if the l

Re: Allowing parallel-safe initplans

2023-07-10 Thread Tom Lane
I wrote: > Richard Guo writes: >> On Mon, Apr 17, 2023 at 11:04 PM Tom Lane wrote: >>> I wondered about that too, but how come neither of us saw non-cosmetic >>> failures (ie, actual query output changes not just EXPLAIN changes) >>> when we tried this? >> Sorry I forgot to mention that I did se

Re: Refactoring backend fork+exec code

2023-07-10 Thread Tristan Partin
> From 1d89eec53c7fefa7a4a8c011c9f19e3df64dc436 Mon Sep 17 00:00:00 2001 > From: Heikki Linnakangas > Date: Mon, 12 Jun 2023 16:33:20 +0300 > Subject: [PATCH 4/9] Use FD_CLOEXEC on ListenSockets > @@ -831,7 +834,8 @@ StreamConnection(pgsocket server_fd, Port *port) > void > StreamClose(pgsocket

Re: pg_upgrade instructions involving "rsync --size-only" might lead to standby corruption?

2023-07-10 Thread Michael Banck
Hi, On Mon, Jul 10, 2023 at 01:36:39PM -0700, Nikolay Samokhvalov wrote: > On Fri, Jul 7, 2023 at 6:31 AM Stephen Frost wrote: > > * Nikolay Samokhvalov (n...@postgres.ai) wrote: > > > But this can happen with anyone who follows the procedure from the docs > > as > > > is and doesn't do any addit

Re: Preventing non-superusers from altering session authorization

2023-07-10 Thread Nathan Bossart
On Mon, Jul 10, 2023 at 04:46:07PM -0400, Joseph Koshakow wrote: > Thanks, I think the patch set looks good to go! Great. I'm going to wait a few more days in case anyone has additional feedback, but otherwise I intend to commit this shortly. -- Nathan Bossart Amazon Web Services: https://aws.a

Re: Preventing non-superusers from altering session authorization

2023-07-10 Thread Joseph Koshakow
On Mon, Jul 10, 2023 at 4:32 PM Nathan Bossart wrote: > Okay. Here's a new patch set in which I believe I've addressed all > feedback. I didn't keep the GetAuthenticatedUserIsSuperuser() helper > function around, as I didn't see a strong need for it. Thanks, I think the patch set looks good to

Re: pg_upgrade instructions involving "rsync --size-only" might lead to standby corruption?

2023-07-10 Thread Nikolay Samokhvalov
On Fri, Jul 7, 2023 at 6:31 AM Stephen Frost wrote: > * Nikolay Samokhvalov (n...@postgres.ai) wrote: > > But this can happen with anyone who follows the procedure from the docs > as > > is and doesn't do any additional steps, because in step 9 "Prepare for > > standby server upgrades": > > > > 1

Re: Preventing non-superusers from altering session authorization

2023-07-10 Thread Nathan Bossart
On Sun, Jul 09, 2023 at 08:54:30PM -0400, Joseph Koshakow wrote: > I just realized that you moved this comment from > SetSessionAuthorization. I think we should leave the part about setting > the GUC variable is_superuser on top of SetSessionAuthorization since > that's where we actually set the GU

Re: add non-option reordering to in-tree getopt_long

2023-07-10 Thread Nathan Bossart
Here's a new version of the patch with the latest feedback addressed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From e662a1b6b73c92ff7862444e092406ed82b0c2c7 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 7 Jul 2023 20:00:47 -0700 Subject: [PATCH v6 1/1] Teach in-t

Re: PATCH: Using BRIN indexes for sorted output

2023-07-10 Thread Tomas Vondra
On 7/10/23 18:18, Matthias van de Meent wrote: > On Mon, 10 Jul 2023 at 17:09, Tomas Vondra > wrote: >> On 7/10/23 14:38, Matthias van de Meent wrote: >>> Kind of. For single-dimensional opclasses (minmax, minmax_multi) we >>> only need to extract the normal min/max values for ASC/DESC sorts, >

Re: ResourceOwner refactoring

2023-07-10 Thread Andres Freund
Hi, On 2023-07-10 12:14:46 -0700, Andres Freund wrote: > > /* > > - * Initially allocated size of a ResourceArray. Must be power of two since > > - * we'll use (arraysize - 1) as mask for hashing. > > + * Size of the fixed-size array to hold most-recently remembered resources. > > */ > > -#def

Re: ResourceOwner refactoring

2023-07-10 Thread Andres Freund
Hi, On 2023-05-25 20:14:23 +0300, Heikki Linnakangas wrote: > @@ -2491,9 +2495,6 @@ BufferSync(int flags) > int mask = BM_DIRTY; > WritebackContext wb_context; > > - /* Make sure we can handle the pin inside SyncOneBuffer */ > - ResourceOwnerEnlargeBuffers(C

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2023-07-10 Thread Sergei Kornilov
Hello My +1 to have such a function in core or in some contrib at least (pg_surgery? amcheck?). In the past, more than once I needed to find a damaged tuple knowing only chunk id and toastrelid. This feature would help a lot. regards, Sergei

stats test intermittent failure

2023-07-10 Thread Melanie Plageman
Hi, Jeff pointed out that one of the pg_stat_io tests has failed a few times over the past months (here on morepork [1] and more recently here on francolin [2]). Failing test diff for those who prefer not to scroll: +++ /home/bf/bf-build/francolin/HEAD/pgsql.build/testrun/recovery/027_stream_re

Re: add non-option reordering to in-tree getopt_long

2023-07-10 Thread Nathan Bossart
On Mon, Jul 10, 2023 at 04:57:11PM +0900, Kyotaro Horiguchi wrote: > + if (!force_nonopt && place[0] == '-' && place[1]) > + { > + if (place[1] != '-' || place[2]) > + break; > + > +

Re: Should we remove db_user_namespace?

2023-07-10 Thread Nathan Bossart
On Mon, Jul 10, 2023 at 03:43:07PM +0900, Michael Paquier wrote: > Thanks. Reading through the patch, this version should be able to > handle the dump reloads. Thanks for reviewing. I'm currently planning to commit this sometime next week. -- Nathan Bossart Amazon Web Services: https://aws.ama

Re: DecodeInterval fixes

2023-07-10 Thread Jacob Champion
On Mon, Jul 10, 2023 at 10:19 AM Reid Thompson wrote: > I made a another pass through the separated patches, it looks good to > me. LGTM too. (Thanks Tom for the clarification on ECPG.) Marked RfC. --Jacob

Re: pg_usleep for multisecond delays

2023-07-10 Thread Nathan Bossart
On Mon, Jul 10, 2023 at 10:12:36AM +0200, Daniel Gustafsson wrote: > Have you had any chance to revisit this such that there is a new patch to > review, or should it be returned/moved for now? Not yet. I moved it to the next commitfest. -- Nathan Bossart Amazon Web Services: https://aws.amazon.

Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs

2023-07-10 Thread Alena Rybakina
Well, I don't have a detailed plan either. In principle it shouldn't be that hard, I think - examine_variable is loading the statistics, so it could apply the same null_frac correction, just like nulltestsel would do a bit later. The main question is how to pass the information to examine_variabl

Re: DecodeInterval fixes

2023-07-10 Thread Reid Thompson
On Sun, 2023-07-09 at 13:24 -0400, Joseph Koshakow wrote: > > I've broken up this patch into three logical commits and attached > them. > None of the actual code has changed. > > Thanks, > Joe Koshakow I made a another pass through the separated patches, it looks good to me. Thanks, Reid

Re: UUID v7

2023-07-10 Thread Peter Eisentraut
On 07.07.23 14:06, Andrey M. Borodin wrote: Also, I think we should discuss UUID v8. UUID version 8 provides an RFC-compatible format for experimental or vendor-specific use cases. Revision 1 of IETF draft contained interesting code for v8: almost similar to v7, but with fields for "node ID" an

Re: BUG #18016: REINDEX TABLE failure

2023-07-10 Thread Gurjeet Singh
On Sun, Jul 9, 2023 at 7:21 AM Richard Veselý wrote: > > ... there's no shortage of people that suffer from sluggish > pg_dump/pg_restore cycle and I imagine there are any number of people that > would be interested in improving bulk ingestion which is often a bottleneck > for analytical worklo

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Andres Freund
Hi, On 2023-07-03 11:53:56 +0200, Jakub Wartak wrote: > Out of curiosity I've tried and it is reproducible as you have stated : XFS > @ 4.18.0-425.10.1.el8_7.x86_64: >... > According to iostat and blktrace -d /dev/sda -o - | blkparse -i - output , > the XFS issues sync writes while ext4 does not,

Re: PATCH: Using BRIN indexes for sorted output

2023-07-10 Thread Matthias van de Meent
On Mon, 10 Jul 2023 at 17:09, Tomas Vondra wrote: > On 7/10/23 14:38, Matthias van de Meent wrote: >> Kind of. For single-dimensional opclasses (minmax, minmax_multi) we >> only need to extract the normal min/max values for ASC/DESC sorts, >> which are readily available in the summary. But for mul

Re: gcc -Wclobbered in PostgresMain

2023-07-10 Thread Tom Lane
Sergey Shinderuk writes: > On 08.07.2023 18:11, Tom Lane wrote: >> Having done that, it wouldn't really be necessary to mark these >> as volatile. I kept that marking anyway for consistency with >> send_ready_for_query, but perhaps we shouldn't? > I don't know. Maybe marking them volatile is mor

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Andres Freund
Hi, On 2023-07-03 11:59:38 +0900, Masahiko Sawada wrote: > On Mon, Jul 3, 2023 at 11:55 AM Masahiko Sawada wrote: > > > > After further investigation, the performance degradation comes from > > calling posix_fallocate() (called via FileFallocate()) and pwritev() > > (called via FileZero) alternat

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Andres Freund
Hi, On 2023-07-03 11:55:13 +0900, Masahiko Sawada wrote: > While testing PG16, I observed that in PG16 there is a big performance > degradation in concurrent COPY into a single relation with 2 - 16 > clients in my environment. I've attached a test script that measures > the execution time of COPYi

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Andres Freund
Hi, On 2023-07-10 15:25:41 +0200, Alvaro Herrera wrote: > On 2023-Jul-03, Masahiko Sawada wrote: > > > While testing PG16, I observed that in PG16 there is a big performance > > degradation in concurrent COPY into a single relation with 2 - 16 > > clients in my environment. I've attached a test s

Re: Exclusion constraints on partitioned tables

2023-07-10 Thread Paul A Jungwirth
On Mon, Jul 10, 2023 at 7:05 AM Peter Eisentraut wrote: > I'm not sure what value we would get from testing this with btree_gist, > but if we wanted to do that, then adding a new test file to the > btree_gist sql/ directory would seem reasonable to me. > > (I would make the test a little bit bigge

Re: Add more sanity checks around callers of changeDependencyFor()

2023-07-10 Thread Tom Lane
Alvaro Herrera writes: > On 2023-Jul-10, Tom Lane wrote: >> The user has altered properties of an extension member >> object locally within the database, but has not changed the extension's >> installation script to match. > If I were developing an extension and decided, down the line, to have >

Re: Add more sanity checks around callers of changeDependencyFor()

2023-07-10 Thread Alvaro Herrera
On 2023-Jul-10, Tom Lane wrote: > Michael Paquier writes: > > On Thu, Jul 06, 2023 at 10:09:20AM -0700, Andres Freund wrote: > >> I also don't think pg_dump will dump the changed schema, which means a > >> dump/restore leads to a different schema - IMO something to avoid. > > > Yes, you're right

Re: remaining sql/json patches

2023-07-10 Thread Alvaro Herrera
I forgot to add: * 0001 looks an obvious improvement. You could just push it now, to avoid carrying it forward anymore. I would just put the constructName ahead of value expr in the argument list, though. * 0002: I have no idea what this is (though I probably should). I would also push it righ

Re: Add more sanity checks around callers of changeDependencyFor()

2023-07-10 Thread Tom Lane
Michael Paquier writes: > On Thu, Jul 06, 2023 at 10:09:20AM -0700, Andres Freund wrote: >> I also don't think pg_dump will dump the changed schema, which means a >> dump/restore leads to a different schema - IMO something to avoid. > Yes, you're right here. The function dumped is restored in th

Re: remaining sql/json patches

2023-07-10 Thread Alvaro Herrera
On 2023-Jul-10, Amit Langote wrote: > > I see that you add json_returning_clause_opt, but we already have > > json_output_clause_opt. Shouldn't these two be one and the same? > > I think the new name is more sensible than the old one, since the > > governing keyword is RETURNING; I suppose naming

Re: Reducing connection overhead in pg_upgrade compat check phase

2023-07-10 Thread Daniel Gustafsson
> On 8 Jul 2023, at 23:43, Nathan Bossart wrote: Thanks for reviewing! > Since "script" will be NULL and "db_used" will be false in the first > iteration of the loop, couldn't we move this stuff to before the loop? We could. It's done this way to match how all the other checks are performing t

Re: Changing types of block and chunk sizes in memory contexts

2023-07-10 Thread Melih Mutlu
Hi, Thanks for your comments. Tom Lane , 28 Haz 2023 Çar, 13:59 tarihinde şunu yazdı: > > David Rowley writes: > > Perhaps it's ok to leave the context creation functions with Size > > typed parameters and then just Assert the passed-in sizes are not > > larger than 1GB within the context creati

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-10 Thread Melih Mutlu
Hi, Hayato Kuroda (Fujitsu) , 6 Tem 2023 Per, 12:47 tarihinde şunu yazdı: > > Dear Melih, > > > Thanks for the 0003 patch. But it did not work for me. Can you create > > a subscription successfully with patch 0003 applied? > > I get the following error: " ERROR: table copy could not start > > tra

Re: check_strxfrm_bug()

2023-07-10 Thread Peter Eisentraut
On 10.07.23 04:51, Thomas Munro wrote: On Sun, Jul 9, 2023 at 6:35 PM Thomas Munro wrote: On Sun, Jul 9, 2023 at 6:20 PM Peter Eisentraut wrote: So I don't think this code is correct. AFAICT, there is nothing right now that can possibly define HAVE_MBSTOWCS_L on Windows/MSVC. Was that the i

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-10 Thread Melih Mutlu
Hi, Amit Kapila , 6 Tem 2023 Per, 06:56 tarihinde şunu yazdı: > > On Wed, Jul 5, 2023 at 1:48 AM Melih Mutlu wrote: > > > > Hayato Kuroda (Fujitsu) , 4 Tem 2023 Sal, > > 08:42 tarihinde şunu yazdı: > > > > > But in the later patch the tablesync worker tries to reuse the slot > > > > > during the

Re: [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL

2023-07-10 Thread Önder Kalacı
Hi, I also think so. If this is true, how can we think of supporting > indexes other than hash like GiST, and SP-GiST as mentioned by you in > your latest email? As per my understanding if we don't have PK or > replica identity then after the index scan, we do tuples_equal which > will fail for GI

Re: Exclusion constraints on partitioned tables

2023-07-10 Thread Peter Eisentraut
On 09.07.23 03:21, Paul A Jungwirth wrote: It seems to me that many of the test cases added in indexing.sql are redundant with create_table.sql/alter_table.sql (or vice versa). Is there a reason for this? Yes, there is some overlap. I think that's just because there was overlap before, and I d

Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-10 Thread Sergei Kornilov
>> Is this restriction only for the subscriber? >> >> If we have not changed the replica identity and there is no primary key, >> then we forbid update and delete on the publication side (a fairly common >> usage error at the beginning of using publications). >> If we have replica identity FULL (

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-10 Thread Alvaro Herrera
Hello, On 2023-Jul-03, Masahiko Sawada wrote: > While testing PG16, I observed that in PG16 there is a big performance > degradation in concurrent COPY into a single relation with 2 - 16 > clients in my environment. I've attached a test script that measures > the execution time of COPYing 5GB dat

Re: Things I don't like about \du's "Attributes" column

2023-07-10 Thread Pavel Luzanov
On 23.06.2023 03:50, Tom Lane wrote: * On a purely presentation level, how did we possibly arrive at the idea that the connection-limit and valid-until properties deserve their own lines in the Attributes column while the other properties are comma-separated? That makes no sense whatsoever, nor

Re: [PATCH] Infinite loop while acquiring new TOAST Oid

2023-07-10 Thread Aleksander Alekseev
Hi Nikita, > I've prepared a patch with a 64-bit TOAST Value ID. It is a kind of prototype > and needs some further work, but it is already working and ready to play with. Unfortunately the patch rotted a bit. Could you please submit an updated/rebased patch so that it could be reviewed in the sc

Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-10 Thread Amit Kapila
On Mon, Jul 10, 2023 at 4:33 PM Sergei Kornilov wrote: > > Is this restriction only for the subscriber? > > If we have not changed the replica identity and there is no primary key, then > we forbid update and delete on the publication side (a fairly common usage > error at the beginning of using

Re: [PATCH] Slight improvement of worker_spi.c example

2023-07-10 Thread Daniel Gustafsson
> On 10 Jul 2023, at 14:40, Aleksander Alekseev > wrote: >> Have you had a chance to look at these suggestions, and Juliens reply >> downthread, in order to produce a new version of the patch? > > Thanks for the reminder. No I haven't. Please feel free marking this > CF entry as RwF if this wil

Re: [PATCH] Slight improvement of worker_spi.c example

2023-07-10 Thread Aleksander Alekseev
Hi, > Have you had a chance to look at these suggestions, and Juliens reply > downthread, in order to produce a new version of the patch? Thanks for the reminder. No I haven't. Please feel free marking this CF entry as RwF if this will be helpful. We may reopen it if and when necessary. -- Best

Re: PATCH: Using BRIN indexes for sorted output

2023-07-10 Thread Matthias van de Meent
On Mon, 10 Jul 2023 at 13:43, Tomas Vondra wrote: > On 7/10/23 12:22, Matthias van de Meent wrote: >> On Fri, 7 Jul 2023 at 20:26, Tomas Vondra >> wrote: >>> However, it's not quite clear to me is what you mean by the weight- and >>> compare-operators? That is, what are >>> >>> - brin_minmax_mi

Re: ResourceOwner refactoring

2023-07-10 Thread Peter Eisentraut
A few suggestions on the API: > +static ResourceOwnerFuncs tupdesc_resowner_funcs = These aren't all "functions", so maybe another word like "info" or "description" would be more appropriate? > + .release_phase = RESOURCE_RELEASE_AFTER_LOCKS, > + .release_priority = RELEASE_PRIO_TUPDESC_

Re: HOT readme missing documentation on summarizing index handling

2023-07-10 Thread Aleksander Alekseev
Hi, > > Thanks, pushed after correcting a couple typos. > > Thanks! I noticed that ec99d6e9c87a introduced a slight typo: s/if there is not room/if there is no room -- Best regards, Aleksander Alekseev

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

2023-07-10 Thread Daniel Gustafsson
> On 11 May 2023, at 13:24, Yurii Rashkovskii wrote: > > On Thu, May 11, 2023 at 10:36 AM Alvaro Herrera > wrote: > On 2023-May-11, Yurii Rashkovskii wrote: > > > ``` > > 127.0.0.1=5432 ::1=54321 > > ``` > > > > Basically, a space-delimited set of address/port p

Re: POC, WIP: OR-clause support for indexes

2023-07-10 Thread Ranier Vilela
Em seg., 10 de jul. de 2023 às 09:03, Ranier Vilela escreveu: > Hi Alena, > > Em seg., 10 de jul. de 2023 às 05:38, Alena Rybakina < > lena.riback...@yandex.ru> escreveu: > >> I agreed with the changes. Thank you for your work. >> >> I updated patch and added you to the authors. >> >> I specified

Re: POC, WIP: OR-clause support for indexes

2023-07-10 Thread Ranier Vilela
Hi Alena, Em seg., 10 de jul. de 2023 às 05:38, Alena Rybakina < lena.riback...@yandex.ru> escreveu: > I agreed with the changes. Thank you for your work. > > I updated patch and added you to the authors. > > I specified Ranier Vilela as a reviewer. > Is a good habit when post a new version of th

Re: PATCH: Using BRIN indexes for sorted output

2023-07-10 Thread Tomas Vondra
On 7/10/23 12:22, Matthias van de Meent wrote: > On Fri, 7 Jul 2023 at 20:26, Tomas Vondra > wrote: >> >> Hi, >> >> I finally had time to look at this patch again. There's a bit of bitrot, >> so here's a rebased version (no other changes). > > Thanks! > >> On 2/27/23 16:40, Matthias van de M

Re: Standardize type of variable when extending Buffers

2023-07-10 Thread Ranier Vilela
Em seg., 10 de jul. de 2023 às 03:27, Kyotaro Horiguchi < horikyota@gmail.com> escreveu: > At Fri, 7 Jul 2023 11:29:16 -0700, Gurjeet Singh wrote > in > > On Fri, Jul 7, 2023 at 6:12 AM Ranier Vilela > wrote: > > > > > > Hi, > > > > > > This has already been discussed in [1]. > > > But I tho

RE: Initial Schema Sync for Logical Replication

2023-07-10 Thread Kumar, Sachin
> From: Amit Kapila > On Wed, Jul 5, 2023 at 7:45 AM Masahiko Sawada > wrote: > > > > On Mon, Jun 19, 2023 at 5:29 PM Peter Smith > wrote: > > > > > > Hi, > > > > > > Below are my review comments for the PoC patch 0001. > > > > > > In addition, the patch needed rebasing, and, after I rebased

Re:doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-10 Thread Sergei Kornilov
Hello Is this restriction only for the subscriber? If we have not changed the replica identity and there is no primary key, then we forbid update and delete on the publication side (a fairly common usage error at the beginning of using publications). If we have replica identity FULL (the table

Re: optimize several list functions with SIMD intrinsics

2023-07-10 Thread Heikki Linnakangas
On 21/04/2023 23:33, Nathan Bossart wrote: On Fri, Apr 21, 2023 at 01:50:34PM +0700, John Naylor wrote: On Wed, Mar 8, 2023 at 7:25 AM Nathan Bossart wrote: was mostly a fun weekend project, and I don't presently have any concrete examples of workloads where this might help. It seems like th

Re: PATCH: Using BRIN indexes for sorted output

2023-07-10 Thread Matthias van de Meent
On Fri, 7 Jul 2023 at 20:26, Tomas Vondra wrote: > > Hi, > > I finally had time to look at this patch again. There's a bit of bitrot, > so here's a rebased version (no other changes). Thanks! > On 2/27/23 16:40, Matthias van de Meent wrote: > > Some initial comments on 0004: > > > >> +/* > >> +

Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-10 Thread Amit Kapila
On Mon, Jul 10, 2023 at 2:33 PM Hayato Kuroda (Fujitsu) wrote: > If the published table specifies + REPLICA IDENTITY FULL + but the table includes an attribute whose datatype is not an operator + class of Btree, Isn't the same true for the hash operator class family as well? Can

  1   2   >