Re: Synchronizing slots from primary to standby

2024-02-15 Thread Amit Kapila
On Fri, Feb 16, 2024 at 11:43 AM Amit Kapila wrote: > > Thanks for noticing this. I have pushed all your debug patches. Let's > hope if there is a BF failure next time, we can gather enough > information to know the reason of the same. > There is a new BF failure [1] after adding these LOGs and

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2024-02-15 Thread Bharath Rupireddy
On Wed, Feb 14, 2024 at 6:59 AM Jeff Davis wrote: > > Attached 2 patches. > > Per Andres's suggestion, 0001 adds an: > Assert(startptr + count <= LogwrtResult.Write) > > Though if we want to allow the caller (e.g. in an extension) to > determine the valid range, perhaps using

Re: Fix a typo in pg_rotate_logfile

2024-02-15 Thread Bharath Rupireddy
On Thu, Feb 15, 2024 at 2:18 AM Daniel Gustafsson wrote: > > >>> Searching on Github and Debian Codesearch I cannot find any reference to > >>> anyone > >>> using any function from adminpack. With pgAdminIII being EOL it might be > >>> to > >>> remove it now rather than be on the hook to

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Bertrand Drouvot
Hi, On Fri, Feb 16, 2024 at 12:32:45AM +, Zhijie Hou (Fujitsu) wrote: > Agreed. Here is new patch set as suggested. I used debug2 in the 040 as it > could provide more information about communication between primary and > standby. > This also doesn't increase noticeable testing time on my

RE: speed up a logical replica setup

2024-02-15 Thread Hayato Kuroda (Fujitsu)
Dear Euler, Thanks for updating the patch! Before reviewing deeply, here are replies for your comments. > > > Points raised by me [1] are not solved yet. > > > > * What if the target version is PG16-? pg_ctl and pg_resetwal won't work. $ pg_ctl start -D /tmp/blah waiting for server to start

Re: 035_standby_logical_decoding unbounded hang

2024-02-15 Thread Bertrand Drouvot
Hi, On Thu, Feb 15, 2024 at 12:48:16PM -0800, Noah Misch wrote: > On Wed, Feb 14, 2024 at 03:31:16PM +, Bertrand Drouvot wrote: > > What about creating a sub, say wait_for_restart_lsn_calculation() in > > Cluster.pm > > and then make use of it in create_logical_slot_on_standby() and above?

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Amit Kapila
On Fri, Feb 16, 2024 at 11:12 AM Zhijie Hou (Fujitsu) wrote: > > On Friday, February 16, 2024 8:33 AM Zhijie Hou (Fujitsu) > wrote: > > > > > > Yeah, we can consider outputting some information via this function > > > like how many slots are synced and persisted but not sure what would > > > be

RE: Synchronizing slots from primary to standby

2024-02-15 Thread Zhijie Hou (Fujitsu)
On Friday, February 16, 2024 8:33 AM Zhijie Hou (Fujitsu) wrote: > On Thursday, February 15, 2024 8:29 PM Amit Kapila > wrote: > > > > > On Thu, Feb 15, 2024 at 5:46 PM Bertrand Drouvot > > wrote: > > > > > > On Thu, Feb 15, 2024 at 05:00:18PM +0530, Amit Kapila wrote: > > > > On Thu, Feb 15,

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

2024-02-15 Thread Andrei Lepikhov
On 16/2/2024 07:00, jian he wrote: On Wed, Feb 14, 2024 at 11:21 AM Andrei Lepikhov wrote: My OS: Ubuntu 22.04.3 LTS I already set the max_parallel_workers_per_gather to 10. So for all cases, it should use parallelism first? a better question would be: how to make the number of OR less than 29

RE: pg_upgrade and logical replication

2024-02-15 Thread Hayato Kuroda (Fujitsu)
Dear Vignesh, Thanks for reviewing! PSA new version. > > Thanks for the updated patch, few suggestions: > 1) Can we use a new publication for this subscription too so that the > publication and subscription naming will become consistent throughout > the test case: > +# Table will be in 'd'

Re: pg_upgrade and logical replication

2024-02-15 Thread vignesh C
On Fri, 16 Feb 2024 at 08:22, Hayato Kuroda (Fujitsu) wrote: > > Dear Amit, > > > This sounds like a reasonable way to address the reported problem. > > OK, thanks! > > > Justin, do let me know if you think otherwise? > > > > Comment: > > === > > * > > -# Setup an enabled subscription to

PGC_SIGHUP shared_buffers?

2024-02-15 Thread Robert Haas
Hi, I remember Magnus making a comment many years ago to the effect that every setting that is PGC_POSTMASTER is a bug, but some of those bugs are very difficult to fix. Perhaps the use of the word bug is arguable, but I think the sentiment is apt, especially with regard to shared_buffers.

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-02-15 Thread John Naylor
On Fri, Feb 16, 2024 at 10:05 AM Masahiko Sawada wrote: > > v61-0007: Runtime-embeddable tids -- Optional for v17, but should > > reduce memory regressions, so should be considered. Up to 3 tids can > > be stored in the last level child pointer. It's not polished, but I'll > > only proceed with

RE: pg_upgrade and logical replication

2024-02-15 Thread Hayato Kuroda (Fujitsu)
Dear Justin, Thanks for replying! > What optimizations? I can't see them, and since the patch is described > as rearranging test cases (and therefore already difficult to read), I > guess they should be a separate patch, or the optimizations described. The basic idea was to reduce number of

Re: speed up a logical replica setup

2024-02-15 Thread Euler Taveira
On Thu, Feb 15, 2024, at 8:23 AM, Hayato Kuroda (Fujitsu) wrote: > > Points raised by me [1] are not solved yet. > > > > * What if the target version is PG16-? pg_ctl and pg_resetwal won't work. $ pg_ctl start -D /tmp/blah waiting for server to start 2024-02-15 23:50:03.448 -03 [364610]

Re: Memory consumed by paths during partitionwise join planning

2024-02-15 Thread Andrei Lepikhov
On 15/2/2024 19:06, Ashutosh Bapat wrote: On Thu, Feb 15, 2024 at 9:41 AM Andrei Lepikhov But I'm not sure about freeing unreferenced paths. I would have to see alternatives in the pathlist. I didn't understand this. Can you please elaborate? A path in any pathlist is referenced. An

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-02-15 Thread Masahiko Sawada
On Thu, Feb 15, 2024 at 8:26 PM John Naylor wrote: > > On Thu, Feb 15, 2024 at 10:21 AM Masahiko Sawada > wrote: > > > > On Sat, Feb 10, 2024 at 9:29 PM John Naylor wrote: > > > I've also run the same scripts in my environment just in case and got > > similar results: > > Thanks for testing,

RE: pg_upgrade and logical replication

2024-02-15 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > This sounds like a reasonable way to address the reported problem. OK, thanks! > Justin, do let me know if you think otherwise? > > Comment: > === > * > -# Setup an enabled subscription to verify that the running status and > failover > -# option are retained after the

Re: make add_paths_to_append_rel aware of startup cost

2024-02-15 Thread David Rowley
On Fri, 16 Feb 2024 at 01:09, David Rowley wrote: > > On Thu, 15 Feb 2024 at 21:42, Andy Fan wrote: > > I found the both plans have the same cost, I can't get the accurate > > cause of this after some hours research, but it is pretty similar with > > 7516056c584e3, so I uses a similar strategy

Re: Do away with zero-padding assumption before WALRead()

2024-02-15 Thread Kyotaro Horiguchi
At Tue, 13 Feb 2024 11:47:06 +0530, Bharath Rupireddy wrote in > Hi, > > I noticed an assumption [1] at WALRead() call sites expecting the > flushed WAL page to be zero-padded after the flush LSN. I think this > can't always be true as the WAL can get flushed after determining the > flush LSN

Re: Fix incorrect PG_GETARG in pgcrypto

2024-02-15 Thread shihao zhong
On Tue, Feb 13, 2024 at 7:08 PM Michael Paquier wrote: > > On Tue, Feb 13, 2024 at 05:36:36PM +0900, Michael Paquier wrote: > > You've indeed grabbed some historical inconsistencies here. Please > > note that your patch has reversed diffs (for example, the SQL > > definition of

Re: make add_paths_to_append_rel aware of startup cost

2024-02-15 Thread Andy Fan
David Rowley writes: > I'd be more happy using this one as percentage-wise, the cost > difference is much larger. +1 for the percentage-wise. > > I checked that the t2.thounsand = 0 query still tests the cheap > startup paths in add_paths_to_append_rel(). I get the same conclusion here. > >

Re: When extended query protocol ends?

2024-02-15 Thread Tatsuo Ishii
Hi Dave, Oh, I see. > Hi Tatsuo, > > Actually no need, I figured it out. > > I don't have a solution yet though. > > Dave Cramer > www.postgres.rocks > > > On Thu, 15 Feb 2024 at 19:43, Tatsuo Ishii wrote: > >> > Can you ask the OP what they are doing in the startup. I'm trying to >> >

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-02-15 Thread John Naylor
v61 had a brown-paper-bag bug in the embedded tids patch that didn't present in the tidstore test, but caused vacuum to fail, fixed in v62. v62-ART.tar.gz Description: application/gzip

Re: When extended query protocol ends?

2024-02-15 Thread Dave Cramer
Hi Tatsuo, Actually no need, I figured it out. I don't have a solution yet though. Dave Cramer www.postgres.rocks On Thu, 15 Feb 2024 at 19:43, Tatsuo Ishii wrote: > > Can you ask the OP what they are doing in the startup. I'm trying to > > replicate their situation. > > Looks like possibly

Re: When extended query protocol ends?

2024-02-15 Thread Tatsuo Ishii
> Can you ask the OP what they are doing in the startup. I'm trying to > replicate their situation. > Looks like possibly 'setReadOnly' and 'select version()' Sure I will. By the way 'select version()' may be issued by Pgpool-II itself. In this case it should be 'SELECT version()', not 'select

RE: Synchronizing slots from primary to standby

2024-02-15 Thread Zhijie Hou (Fujitsu)
On Thursday, February 15, 2024 8:29 PM Amit Kapila wrote: > > On Thu, Feb 15, 2024 at 5:46 PM Bertrand Drouvot > wrote: > > > > On Thu, Feb 15, 2024 at 05:00:18PM +0530, Amit Kapila wrote: > > > On Thu, Feb 15, 2024 at 4:29 PM Zhijie Hou (Fujitsu) > > > wrote: > > > > Attach the v2 patch

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

2024-02-15 Thread jian he
On Wed, Feb 14, 2024 at 11:21 AM Andrei Lepikhov wrote: > > So, this example is more about the subtle balance between > parallel/sequential execution, which can vary from one platform to another. > Hi, here I attached two files, expression_num_or_1_100.sql, expression_num_or_1_1.sql it has

Re: glibc qsort() vulnerability

2024-02-15 Thread Nathan Bossart
Here is what I have staged for commit. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 8e5a66fb3a0787f15a900a89742862c89da38a1d Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 15 Feb 2024 10:53:11 -0600 Subject: [PATCH v8 1/3] Remove direct calls to pg_qsort().

Re: Transaction timeout

2024-02-15 Thread Andres Freund
Hi, On 2024-02-13 23:42:35 +0200, Alexander Korotkov wrote: > diff --git a/src/backend/access/transam/xact.c > b/src/backend/access/transam/xact.c > index 464858117e0..a124ba59330 100644 > --- a/src/backend/access/transam/xact.c > +++ b/src/backend/access/transam/xact.c > @@ -2139,6 +2139,10 @@

Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan

2024-02-15 Thread Peter Geoghegan
On Mon, Jan 22, 2024 at 4:13 PM Matthias van de Meent wrote: > Attached 2 patches: v11.patch-a and v11.patch-b. Both are incremental > on top of your earlier set, and both don't allocate additional memory > in the merge operation in non-assertion builds. > > patch-a is a trivial and clean

RE: Psql meta-command conninfo+

2024-02-15 Thread Maiquel Grassi
Hi! (v16) In this version, I made a small adjustment to the indentation of the \conninfo code and described the columns as returned by \conninfo+ as suggested by Jim Jones. Regards, Maiquel Grassi. v16-0001-psql-meta-command-conninfo-plus.patch Description:

Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions

2024-02-15 Thread Andres Freund
Hi, On 2024-02-11 13:19:00 -0500, David Benjamin wrote: > I've attached a patch for the master branch to fix up the custom BIOs used > by PostgreSQL, in light of the issues with the OpenSSL update recently. > While c82207a548db47623a2bfa2447babdaa630302b9 (switching from BIO_get_data > to

Re: 035_standby_logical_decoding unbounded hang

2024-02-15 Thread Noah Misch
On Wed, Feb 14, 2024 at 03:31:16PM +, Bertrand Drouvot wrote: > On Sat, Feb 10, 2024 at 05:02:27PM -0800, Noah Misch wrote: > > The 035_standby_logical_decoding.pl hang is > > a race condition arising from an event sequence like this: > > > > - Test script sends CREATE SUBSCRIPTION to

Re: index prefetching

2024-02-15 Thread Peter Geoghegan
On Thu, Feb 15, 2024 at 3:13 PM Andres Freund wrote: > > This is why I don't think that the tuples with lower page offset > > numbers are in any way significant here. The significant part is > > whether or not you'll actually need to visit more than one leaf page > > in the first place (plus the

Re: logical decoding and replication of sequences, take 2

2024-02-15 Thread Tomas Vondra
On 2/15/24 05:16, Robert Haas wrote: > On Wed, Feb 14, 2024 at 10:21 PM Tomas Vondra > wrote: >> The way I think about non-transactional sequence changes is as if they >> were tiny transactions that happen "fully" (including commit) at the LSN >> where the LSN change is logged. > > 100% this. >

Re: index prefetching

2024-02-15 Thread Andres Freund
Hi, On 2024-02-15 12:53:10 -0500, Peter Geoghegan wrote: > On Thu, Feb 15, 2024 at 12:26 PM Tomas Vondra > wrote: > > I may be missing something, but it seems fairly self-evident to me an > > entry at the beginning of an index page won't get prefetched (assuming > > the page-at-a-time thing). >

RE: Psql meta-command conninfo+

2024-02-15 Thread Maiquel Grassi
>v14 applies cleanly and the SSL info is now shown as previously >suggested. Here is a more comprehensive test: > > >$ /usr/local/postgres-dev/bin/psql -x "\ >host=server.uni-muenster.de >hostaddr=172.19.42.1 >user=jim dbname=postgres >sslrootcert=server-certificates/server.crt >

Re: RFC: Logging plan of the running query

2024-02-15 Thread Andres Freund
Hi, On 2024-02-15 14:42:11 +0530, Robert Haas wrote: > I think the issue is very general. We have lots of subsystems that > both (a) use global variables and (b) contain CHECK_FOR_INTERRUPTS(). > If we process an interrupt while that code is in the middle of > manipulating its global variables

Re: Document efficient self-joins / UPDATE LIMIT techniques.

2024-02-15 Thread Corey Huinker
> > > As for whether it's commonplace, when I was a consultant I had a number > > of customers that I had who bemoaned how large updates caused big > > replica lag, basically punishing access to records they did care about > > in order to properly archive or backfill records they don't care about.

Re: partitioning and identity column

2024-02-15 Thread Alexander Lakhin
Hello Ashutosh, 24.01.2024 09:34, Ashutosh Bapat wrote: There's another thing I found. The file isn't using check_stack_depth() in the function which traverse inheritance hierarchies. This isn't just a problem of the identity related function but most of the functions in that file. Do you

Re: index prefetching

2024-02-15 Thread Peter Geoghegan
On Thu, Feb 15, 2024 at 12:26 PM Tomas Vondra wrote: > I may be missing something, but it seems fairly self-evident to me an > entry at the beginning of an index page won't get prefetched (assuming > the page-at-a-time thing). Sure, if the first item on the page is also the first item that we

Re: Add trim_trailing_whitespace to editorconfig file

2024-02-15 Thread Jelte Fennema-Nio
On Thu, 15 Feb 2024 at 16:57, Peter Eisentraut wrote: > Is there a command-line tool to verify the syntax of .editorconfig and > check compliance of existing files? > > I'm worried that expanding .editorconfig with detailed per-file rules > will lead to a lot of mistakes and blind editing, if we

Re: index prefetching

2024-02-15 Thread Tomas Vondra
On 2/15/24 17:42, Peter Geoghegan wrote: > On Thu, Feb 15, 2024 at 9:36 AM Tomas Vondra > wrote: >> On 2/15/24 00:06, Peter Geoghegan wrote: >>> I suppose that it might be much more important than I imagine it is >>> right now, but it'd be nice to have something a bit more concrete to >>> go

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Bertrand Drouvot
Hi, On Thu, Feb 15, 2024 at 05:58:47PM +0530, Amit Kapila wrote: > On Thu, Feb 15, 2024 at 5:46 PM Bertrand Drouvot > wrote: > > Also I was thinking: what about adding an output to > > pg_sync_replication_slots()? > > The output could be the number of sync slots that have been created and are >

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Bertrand Drouvot
Hi, On Thu, Feb 15, 2024 at 06:13:38PM +0530, Amit Kapila wrote: > On Thu, Feb 15, 2024 at 12:07 PM Zhijie Hou (Fujitsu) > wrote: > > > > Since the slotsync function is committed, I rebased remaining patches. > > And here is the V88 patch set. > > Thanks! > > Please find the improvements in

Re: planner chooses incremental but not the best one

2024-02-15 Thread Tomas Vondra
On 2/15/24 13:45, Andrei Lepikhov wrote: > On 15/2/2024 18:10, Tomas Vondra wrote: >> >> >> On 2/15/24 07:50, Andrei Lepikhov wrote: >>> On 18/12/2023 19:53, Tomas Vondra wrote: On 12/18/23 11:40, Richard Guo wrote: The challenge is where to get usable information about correlation

Re: index prefetching

2024-02-15 Thread Peter Geoghegan
On Thu, Feb 15, 2024 at 9:36 AM Tomas Vondra wrote: > On 2/15/24 00:06, Peter Geoghegan wrote: > > I suppose that it might be much more important than I imagine it is > > right now, but it'd be nice to have something a bit more concrete to > > go on. > > > > This probably depends on which corner

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-02-15 Thread Nathan Bossart
On Wed, Feb 14, 2024 at 01:02:26PM -0600, Nathan Bossart wrote: > BTW I have been testing reverting commit 151c22d (i.e., un-reverting > MAINTAIN) every month or two, and last I checked, it still applies pretty > cleanly. The only changes I've needed to make are to the catversion and to > a

Re: Add trim_trailing_whitespace to editorconfig file

2024-02-15 Thread Peter Eisentraut
On 15.02.24 10:26, Jelte Fennema-Nio wrote: On Wed, 14 Feb 2024 at 23:19, Daniel Gustafsson wrote: +1 from me. But when do we want it to be false? That is, why not declare it true for all file types? Regression test .out files commonly have spaces at the end of the line. (Not to mention the

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-15 Thread Peter Eisentraut
On 15.02.24 13:42, Koshi Shibagaki (Fujitsu) wrote: However, crypt() and gen_salt() do not use OpenSSL as mentioned in [2]. Therefore, if we run crypt() and gen_salt() on a machine with FIPS mode enabled, they are not affected by FIPS mode. This means we can use encryption algorithms disallowed

Re: Allow passing extra options to initdb for tests

2024-02-15 Thread Tom Lane
Daniel Gustafsson writes: > On 15 Feb 2024, at 11:38, Peter Eisentraut wrote: >> We don't have a man page for pg_regress, so there is no place to >> comprehensively document all the options and their interactions. > This comes up every now and again, just yesterday there was a question on >

Re: Reducing output size of nodeToString

2024-02-15 Thread Matthias van de Meent
On Thu, 15 Feb 2024 at 13:59, Peter Eisentraut wrote: > > Thanks, this patch set is a good way to incrementally work through these > changes. > > I have looked at > v4-0001-pg_node_tree-Omit-serialization-of-fields-with-de.patch today. > Here are my thoughts: > > I believe we had discussed

Re: index prefetching

2024-02-15 Thread Tomas Vondra
On 2/15/24 00:06, Peter Geoghegan wrote: > On Wed, Feb 14, 2024 at 4:46 PM Melanie Plageman > wrote: > >> ... > > 2. Are you sure that the leaf-page-at-a-time thing is such a huge > hindrance to effective prefetching? > > I suppose that it might be much more important than I imagine it is >

Re: When extended query protocol ends?

2024-02-15 Thread Dave Cramer
On Wed, 14 Feb 2024 at 17:55, Tatsuo Ishii wrote: > >>> From [1] I think the JDBC driver sends something like below if > >>> autosave=always option is specified. > >>> > >>> "BEGIN READ ONLY" Parse/Bind/Eexecute (in the extended query protocol) > >>> "SAVEPOINT PGJDBC_AUTOSAVE" (in the simple

Re: Reducing output size of nodeToString

2024-02-15 Thread Peter Eisentraut
Thanks, this patch set is a good way to incrementally work through these changes. I have looked at v4-0001-pg_node_tree-Omit-serialization-of-fields-with-de.patch today. Here are my thoughts: I believe we had discussed offline to not omit enum fields with value 0 (WRITE_ENUM_FIELD). This

Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions

2024-02-15 Thread Daniel Gustafsson
> On 15 Feb 2024, at 04:58, David Benjamin wrote: > > By the way, I'm unable to add the patch to the next commitfest due to the > cool off period for new accounts. How long is that period? I don't suppose > there's a way to avoid it? There is a way to expedite the cooling-off period (it's a

Re: planner chooses incremental but not the best one

2024-02-15 Thread Andrei Lepikhov
On 15/2/2024 18:10, Tomas Vondra wrote: On 2/15/24 07:50, Andrei Lepikhov wrote: On 18/12/2023 19:53, Tomas Vondra wrote: On 12/18/23 11:40, Richard Guo wrote: The challenge is where to get usable information about correlation between columns. I only have a couple very rought ideas of what

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Amit Kapila
On Thu, Feb 15, 2024 at 12:07 PM Zhijie Hou (Fujitsu) wrote: > > Since the slotsync function is committed, I rebased remaining patches. > And here is the V88 patch set. > Please find the improvements in some of the comments in v88_0001* attached. Kindly include these in next version, if you are

Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-15 Thread Koshi Shibagaki (Fujitsu)
Hi This is Shibagaki. When FIPS mode is enabled, some encryption algorithms cannot be used. Since PostgreSQL15, pgcrypto requires OpenSSL[1], digest() and other functions also follow this policy. However, crypt() and gen_salt() do not use OpenSSL as mentioned in [2]. Therefore, if we run crypt()

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Amit Kapila
On Thu, Feb 15, 2024 at 5:46 PM Bertrand Drouvot wrote: > > On Thu, Feb 15, 2024 at 05:00:18PM +0530, Amit Kapila wrote: > > On Thu, Feb 15, 2024 at 4:29 PM Zhijie Hou (Fujitsu) > > wrote: > > > Attach the v2 patch here. > > > > > > Apart from the new log message. I think we can add one more

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Bertrand Drouvot
Hi, On Thu, Feb 15, 2024 at 05:00:18PM +0530, Amit Kapila wrote: > On Thu, Feb 15, 2024 at 4:29 PM Zhijie Hou (Fujitsu) > wrote: > > Attach the v2 patch here. > > > > Apart from the new log message. I think we can add one more debug message in > > reserve_wal_for_local_slot, this could be useful

Re: Add system identifier to backup manifest

2024-02-15 Thread Robert Haas
On Thu, Feb 15, 2024 at 3:05 PM Amul Sul wrote: > Kindly have a look at the attached version. IMHO, 0001 looks fine, except probably the comment could be phrased a bit more nicely. That can be left for whoever commits this to wordsmith. Michael, what are your plans? 0002 seems like a reasonable

Re: make add_paths_to_append_rel aware of startup cost

2024-02-15 Thread David Rowley
On Thu, 15 Feb 2024 at 21:42, Andy Fan wrote: > I found the both plans have the same cost, I can't get the accurate > cause of this after some hours research, but it is pretty similar with > 7516056c584e3, so I uses a similar strategy to stable it. is it > acceptable? It's pretty hard to say. I

Re: Memory consumed by paths during partitionwise join planning

2024-02-15 Thread Ashutosh Bapat
On Thu, Feb 15, 2024 at 9:41 AM Andrei Lepikhov wrote: > > On 6/2/2024 19:51, Ashutosh Bapat wrote: > > On Fri, Dec 15, 2023 at 5:22 AM Ashutosh Bapat > > The patches are raw. make check has some crashes that I need to fix. I > > am waiting to hear whether this is useful and whether the design is

Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions

2024-02-15 Thread David Benjamin
By the way, I'm unable to add the patch to the next commitfest due to the cool off period for new accounts. How long is that period? I don't suppose there's a way to avoid it? On Mon, Feb 12, 2024 at 11:31 AM David Benjamin wrote: > On Mon, Feb 12, 2024 at 9:38 AM Daniel Gustafsson wrote: > >>

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Amit Kapila
On Thu, Feb 15, 2024 at 4:29 PM Zhijie Hou (Fujitsu) wrote: > > On Thursday, February 15, 2024 5:20 PM Amit Kapila > wrote: > > On Thu, Feb 15, 2024 at 9:05 AM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > On Thursday, February 15, 2024 10:49 AM Amit Kapila > > wrote: > > > > > > > > On

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-02-15 Thread John Naylor
On Thu, Feb 15, 2024 at 10:21 AM Masahiko Sawada wrote: > > On Sat, Feb 10, 2024 at 9:29 PM John Naylor wrote: > I've also run the same scripts in my environment just in case and got > similar results: Thanks for testing, looks good as well. > > There are still some micro-benchmarks we could

Re: Fix race condition in InvalidatePossiblyObsoleteSlot()

2024-02-15 Thread Bertrand Drouvot
Hi, On Thu, Feb 15, 2024 at 02:09:45PM +0900, Michael Paquier wrote: > On Thu, Jan 18, 2024 at 02:20:28PM +, Bertrand Drouvot wrote: > > On Thu, Jan 18, 2024 at 04:59:39PM +0530, Bharath Rupireddy wrote: > >> I'm not sure if it > >> can happen at all, but I think we can rely on previous

Re: planner chooses incremental but not the best one

2024-02-15 Thread Tomas Vondra
On 2/15/24 07:50, Andrei Lepikhov wrote: > On 18/12/2023 19:53, Tomas Vondra wrote: >> On 12/18/23 11:40, Richard Guo wrote: >> The challenge is where to get usable information about correlation >> between columns. I only have a couple very rought ideas of what might >> try. For example, if we

RE: Synchronizing slots from primary to standby

2024-02-15 Thread Zhijie Hou (Fujitsu)
On Thursday, February 15, 2024 5:20 PM Amit Kapila wrote: > On Thu, Feb 15, 2024 at 9:05 AM Zhijie Hou (Fujitsu) > wrote: > > > > On Thursday, February 15, 2024 10:49 AM Amit Kapila > wrote: > > > > > > On Wed, Feb 14, 2024 at 7:26 PM Bertrand Drouvot > > > > > > Right, we can do that or

Re: Allow passing extra options to initdb for tests

2024-02-15 Thread Daniel Gustafsson
> On 15 Feb 2024, at 11:38, Peter Eisentraut wrote: > We don't have a man page for pg_regress, so there is no place to > comprehensively document all the options and their interactions. This comes up every now and again, just yesterday there was a question on -general [0] about alternate

Re: Allow passing extra options to initdb for tests

2024-02-15 Thread Peter Eisentraut
On 14.02.24 06:22, Ian Lawrence Barwick wrote: I had a longer look at this and can't find any issues with the code or documentation changes. Thanks, committed. I did wonder whether it would be worth mentioning that any initdb options set in "PG_TEST_INITDB_EXTRA_OPTS" will override those

Re: Do away with zero-padding assumption before WALRead()

2024-02-15 Thread Nazir Bilal Yavuz
Hi, On Tue, 13 Feb 2024 at 09:17, Bharath Rupireddy wrote: > > Hi, > > I noticed an assumption [1] at WALRead() call sites expecting the > flushed WAL page to be zero-padded after the flush LSN. I think this > can't always be true as the WAL can get flushed after determining the > flush LSN

Re: Returning non-terminated string in ECPG Informix-compatible function

2024-02-15 Thread Oleg Tselebrovskiy
Thanks for review! I added a regression test that is based on code from previous email New patch is attached Oleg Tselebrovskiy, Postgres Prodiff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index dccf39582da..80d40aa3e09 100644 ---

Re: A new strategy for pull-up correlated ANY_SUBLINK

2024-02-15 Thread Andy Fan
Hi Alexander, > Hi! > >> If the changes of Alena are ok, can you merge the changes and post an >> updated version so that CFBot can apply the patch and verify the >> changes. As currently CFBot is trying to apply only Alena's changes >> and failing with the following at [1]: > > I think this is

Re: pg_upgrade and logical replication

2024-02-15 Thread Justin Pryzby
On Wed, Feb 14, 2024 at 03:37:03AM +, Hayato Kuroda (Fujitsu) wrote: > Attached patch modified the test accordingly. Also, it contains some > optimizations. > This can pass the test on my env: What optimizations? I can't see them, and since the patch is described as rearranging test cases

Re: 039_end_of_wal: error in "xl_tot_len zero" test

2024-02-15 Thread Anton Voloshin
Hello, Thomas, On 19/01/2024 01:35, Thomas Munro wrote: I don't yet have an opinion on the best way to do it though. Would it be enough to add emit_message($node, 0) after advance_out_of_record_splitting_zone()? Yes, indeed that seems to be enough. At least I could not produce any more

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Bertrand Drouvot
Hi, On Thu, Feb 15, 2024 at 02:49:54PM +0530, Amit Kapila wrote: > On Thu, Feb 15, 2024 at 9:05 AM Zhijie Hou (Fujitsu) > wrote: > > > > On Thursday, February 15, 2024 10:49 AM Amit Kapila > > wrote: > > > > > > On Wed, Feb 14, 2024 at 7:26 PM Bertrand Drouvot > > > > > > Right, we can do that

Re: Add system identifier to backup manifest

2024-02-15 Thread Amul Sul
On Thu, Feb 15, 2024 at 7:18 AM Michael Paquier wrote: > On Wed, Feb 14, 2024 at 12:29:07PM +0530, Amul Sul wrote: > > Ok, I did that way in the attached version, I have passed the control > file's > > full path as a second argument to verify_system_identifier() what we > gets in > >

Re: Add trim_trailing_whitespace to editorconfig file

2024-02-15 Thread Jelte Fennema-Nio
On Wed, 14 Feb 2024 at 23:19, Daniel Gustafsson wrote: > > +1 from me. But when do we want it to be false? That is, why not > > declare it true for all file types? > > Regression test .out files commonly have spaces at the end of the line. (Not > to mention the ECPG .c files but they probably

Re: Synchronizing slots from primary to standby

2024-02-15 Thread Amit Kapila
On Thu, Feb 15, 2024 at 9:05 AM Zhijie Hou (Fujitsu) wrote: > > On Thursday, February 15, 2024 10:49 AM Amit Kapila > wrote: > > > > On Wed, Feb 14, 2024 at 7:26 PM Bertrand Drouvot > > > > Right, we can do that or probably this test would have made more sense with > > a > > worker patch where

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-02-15 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Thu, 15 Feb 2024 17:09:20 +0800, jian he wrote: > My environment is slow (around 10x) but consistent. > I see around 2-3 percent increase consistently. > (with patch 7369.068 ms, without patch 7574.802 ms)

Re: RFC: Logging plan of the running query

2024-02-15 Thread Robert Haas
Hi, I've just been catching up on this thread. + if (MyProc->heldLocks) + { + ereport(LOG_SERVER_ONLY, + errmsg("ignored request for logging query plan due to lock conflicts"), + errdetail("You can try again in a moment.")); + return; + } I don't like this for several reasons. First, I think

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-02-15 Thread jian he
On Thu, Feb 15, 2024 at 2:34 PM Sutou Kouhei wrote: > > > Thanks for the info. Let's use InputFunctionCallSafeWithInfo(). > See that attached patch: > v2-0001-Reuse-fcinfo-used-in-COPY-FROM.patch > > I also attach a patch for COPY TO: > v1-0001-Reuse-fcinfo-used-in-COPY-TO.patch > > I measured

Re: [PATCH] Expose port->authn_id to extensions and triggers

2024-02-15 Thread Andy Fan
Hi, Michael Paquier writes: > [[PGP Signed Part:Undecided]] > On Tue, Aug 23, 2022 at 10:04:30AM -0700, Jacob Champion wrote: > > My main worry here is EXEC_BACKEND, where we would just use our own > implementation of fork(), and it is a bad idea at the end to leave > that untouched while we

Re: make add_paths_to_append_rel aware of startup cost

2024-02-15 Thread Andy Fan
Andy Fan writes: > Thomas Munro writes: > >> On Thu, Oct 5, 2023 at 9:07 PM David Rowley wrote: >>> Thanks. Pushed. >> >> FYI somehow this plan from a8a968a8212e flipped in this run: >> >> === dumping >>