Re: make dist using git archive

2024-01-22 Thread Tristan Partin
On Mon Jan 22, 2024 at 1:31 AM CST, Peter Eisentraut wrote: From 4b128faca90238d0a0bb6949a8050c2501d1bd67 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 20 Jan 2024 21:54:36 +0100 Subject: [PATCH v0] make dist uses git archive --- GNUmakefile.in | 34

core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Andres Freund
Hi, I noticed that I was getting core dumps while executing the tests, without the tests failing. Backtraces are vriations of this: #0 0x00ca29cd in pg_atomic_read_u32_impl (ptr=0x7fe13497a004) at ../../../../../home/andres/src/postgresql/src/include/port/atomics/generic.h:48 #1

Re: Improving EXPLAIN's display of SubPlan nodes

2024-01-22 Thread Tom Lane
I wrote: > The main thing that's still missing compared to what is in the plan > data structure is information about which Param is which. I think > we have the subplan output Params relatively well covered through > the expedient of listing them in the generated plan_name, but it's > still not

Re: Permute underscore separated components of columns before fuzzy matching

2024-01-22 Thread Tom Lane
Arne Roland writes: > Thank you for bringing that to my attention. Is there a way to subscribe > to cf-bot failures? I don't know of any push notification support in cfbot, but you can bookmark the page with your own active patches, and check it periodically:

Re: core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Andres Freund
Hi, On 2024-01-22 15:19:36 -0600, Nathan Bossart wrote: > On Mon, Jan 22, 2024 at 02:44:57PM -0600, Nathan Bossart wrote: > > On Mon, Jan 22, 2024 at 12:41:17PM -0800, Andres Freund wrote: > >> I noticed that I was getting core dumps while executing the tests, without > >> the > >> tests

Re: Built-in CTYPE provider

2024-01-22 Thread Peter Eisentraut
On 18.01.24 23:03, Jeff Davis wrote: On Thu, 2024-01-18 at 13:53 +0100, Peter Eisentraut wrote: I think that would be a terrible direction to take, because it would regress the default sort order from "correct" to "useless". I don't agree that the current default is "correct". There are a lot

Re: Does redundant extension exist During faster COPY in PG16

2024-01-22 Thread Andres Freund
Hi, On 2024-01-22 19:54:00 +0800, 何柯文(渊云) wrote: > I'm learning faster COPY of PG16. I have some questions about extension lock > improvement. > From ./src/backend/storage/buffer/bufmgr.c:1901 (ExtendBufferedRelShared) > ``` > /* > * Lock relation against concurrent extensions, unless

Re: Network failure may prevent promotion

2024-01-22 Thread Fujii Masao
On Thu, Jan 18, 2024 at 10:42 PM Heikki Linnakangas wrote: > Given that commit 728f86fec6 that introduced this issue was not strictly > required, perhaps we should just revert it for v16. +1 for the revert. This issue should be fixed in the upcoming minor release since it might cause unexpected

Re: make dist using git archive

2024-01-22 Thread Peter Eisentraut
On 22.01.24 13:10, Junwang Zhao wrote: I played this with meson build on macOS, the packages are generated in source root but not build root, I'm sure if this is by design but I think polluting *working directory* is not good. Yes, it's not good, but I couldn't find a way to make it work.

Re: partitioning and identity column

2024-01-22 Thread Peter Eisentraut
On 22.01.24 13:23, Ashutosh Bapat wrote: if (newdef->identity) { Assert(!is_partioning); /* * Identity is never inherited. The new column can have an * identity definition, so we always just take that one. */

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

2024-01-22 Thread Andres Freund
Hi, On 2024-01-10 19:59:29 +0530, Bharath Rupireddy wrote: > + /* > + * Typically, we must not read a WAL buffer page that just got > + * initialized. Because we waited enough for the in-progress WAL > + * insertions to finish above. However,

Re: core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Nathan Bossart
On Mon, Jan 22, 2024 at 12:41:17PM -0800, Andres Freund wrote: > I noticed that I was getting core dumps while executing the tests, without the > tests failing. Backtraces are vriations of this: Looking, thanks for the heads-up. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Teach predtest about IS [NOT] proofs

2024-01-22 Thread Tom Lane
James Coleman writes: > 0001 does the initial pure refactor. 0003 makes a lot of modifications > to what we can prove about implication and refutation. Finally, 0003 > isn't intended to be committed, but attempts to validate more > holistically that none of the changes creates any invalid proofs

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Tom Lane
Pavel Stehule writes: > I would have forms like FoxPro, I would have a grid like FoxPro, but not in > psql, and I would not develop it :-) Yeah, that's something that was also bothering me, but I failed to put my finger on it. "Here's some JSON, edit it, and don't forget to keep the quoting

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Christoph Berg
Re: Pavel Stehule > Introduction of \gedit is interesting idea, but in this form it looks too > magic > > a) why the data are in JSON format, that is not native for psql (minimally > now) Because we need something machine-readable. CSV would be an alternative, but that is hardly human-readable.

Re: Evaluate arguments of correlated SubPlans in the referencing ExprState

2024-01-22 Thread Andres Freund
Hi, On 2024-01-22 10:30:22 +1100, Peter Smith wrote: > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Ready for Committer", but it is > currently failing some CFbot tests [1]. Please have a look and post an > updated version.. I think this failure is independent of this patch - by

Re: pg_stat_statements and "IN" conditions

2024-01-22 Thread Dmitry Dolgov
> On Mon, Jan 22, 2024 at 06:07:27PM +0100, Dmitry Dolgov wrote: > > Please notice that at the moment, it's not being tested at all because > > of a patch-apply failure -- that's what the little triangular symbol > > means. The rest of the display concerns the test results from the > > last

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-22 Thread Heikki Linnakangas
On 22/01/2024 18:08, Heikki Linnakangas wrote: I wrote the attached patch to enable injection points in the Cirrus CI config, to run the injection tests I wrote for a GIN bug today [1]. But that led to a crash in the asan-enabled build [2]. I didn't investigate it yet. Pushed a fix for the

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-22 Thread Jeff Davis
On Mon, 2024-01-22 at 18:41 +0530, Ashutosh Bapat wrote: > 0002 adds a prefix "regress_" to almost every object that is created > in foreign_data.sql. psql \dew outputs the owner, which in the case of a built-in FDW is the bootstrap superuser, which is not a stable name. I used the prefix to

Re: Refactoring backend fork+exec code

2024-01-22 Thread Andres Freund
Hi, On 2024-01-10 14:35:52 +0200, Heikki Linnakangas wrote: > Here's a patch that gets rid of AuxProcType. It's independent of the other > patches in this thread; if this is committed, I'll rebase the rest of the > patches over this and get rid of the new PMC_* enum. > > Three patches, actually.

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

2024-01-22 Thread Matthias van de Meent
On Fri, 19 Jan 2024 at 23:42, Peter Geoghegan wrote: > Thank you for your replies so far. > On Thu, Jan 18, 2024 at 11:39 AM Matthias van de Meent > wrote: > > I would agree with you if this was about new APIs and features, but > > here existing APIs are being repurposed without changing them.

Multiple startup messages over the same connection

2024-01-22 Thread Vladimir Churyukin
Hello, A question about protocol design - would it be possible to extend the protocol, so it can handle multiple startup / authentication messages over a single connection? Are there any serious obstacles? (possible issues with re-initialization of backends, I guess?) If that is possible, it

Re: core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Nathan Bossart
On Mon, Jan 22, 2024 at 02:44:57PM -0600, Nathan Bossart wrote: > On Mon, Jan 22, 2024 at 12:41:17PM -0800, Andres Freund wrote: >> I noticed that I was getting core dumps while executing the tests, without >> the >> tests failing. Backtraces are vriations of this: > > Looking, thanks for the

Re: Network failure may prevent promotion

2024-01-22 Thread Andres Freund
Hi, On 2024-01-19 12:28:05 +0900, Michael Paquier wrote: > On Thu, Jan 18, 2024 at 03:42:28PM +0200, Heikki Linnakangas wrote: > > Given that commit 728f86fec6 that introduced this issue was not strictly > > required, perhaps we should just revert it for v16. > > Is there a point in keeping

Re: core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Nathan Bossart
On Mon, Jan 22, 2024 at 01:24:54PM -0800, Andres Freund wrote: > On 2024-01-22 15:19:36 -0600, Nathan Bossart wrote: >> I think this is because the autoprewarm state was moved to a DSM segment, >> and DSM segments are detached before the on_shmem_exit callbacks are called >> during process exit.

Re: Built-in CTYPE provider

2024-01-22 Thread Jeff Davis
On Mon, 2024-01-22 at 19:49 +0100, Peter Eisentraut wrote: > > > I don't get this argument.  Of course, people care about sorting and > sort order.  Whether you consider this part of Unicode or adjacent to > it, people still want it. You said that my proposal sends a message that we somehow

Re: Add last_commit_lsn to pg_stat_database

2024-01-22 Thread James Coleman
On Sun, Jan 21, 2024 at 10:26 PM Peter Smith wrote: > > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review", but it seems like > there was some CFbot test failure last time it was run [1]. Please > have a look and post an updated version if necessary. > > == > [1] >

Re: Opportunistically pruning page before update

2024-01-22 Thread James Coleman
On Mon, Jan 22, 2024 at 8:21 PM James Coleman wrote: > > See rebased patch attached. I just realized I left a change in during the rebase that wasn't necessary. v4 attached. Regards, James Coleman v4-0002-Opportunistically-prune-to-avoid-building-a-new-p.patch Description: Binary data

Re: Removing const-false IS NULL quals and redundant IS NOT NULL quals

2024-01-22 Thread David Rowley
On Tue, 23 Jan 2024 at 00:11, David Rowley wrote: > I've attached v11 which updates the expected results in some newly > added regression tests. I went over this again. I did a little more work adjusting comments and pushed it. Thanks for all your assistance with this, Richard. David

Re: Make mesage at end-of-recovery less scary.

2024-01-22 Thread Kyotaro Horiguchi
At Mon, 22 Jan 2024 16:09:28 +1100, Peter Smith wrote in > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review" [1], but it seems > there were CFbot test failures last time it was run [2]. Please have a > look and post an updated version if necessary. > > == > [1]

Re: Report planning memory in EXPLAIN ANALYZE

2024-01-22 Thread Ashutosh Bapat
On Thu, Jan 18, 2024 at 5:28 PM Alvaro Herrera wrote: > > On 2024-Jan-18, Ashutosh Bapat wrote: > > > The EXPLAIN output produces something like below > >explain_filter > > - > >Seq Scan on int8_tbl i8

Re: Emitting JSON to file using COPY TO

2024-01-22 Thread jian he
On Fri, Jan 19, 2024 at 4:10 PM Masahiko Sawada wrote: > > If I'm not missing, copyto_json.007.diff is the latest patch but it > needs to be rebased to the current HEAD. Here are random comments: > please check the latest version. > if (opts_out->json_mode) > + { > + if (is_from) > +

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

2024-01-22 Thread David G. Johnston
On Sun, Jan 21, 2024 at 2:35 PM Pavel Luzanov wrote: > Another approach based on early suggestions. > > The Attributes column includes only the enabled logical attributes. > Regardless of whether the attribute is enabled by default or not. > > > The attribute names correspond to the keywords of

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

2024-01-22 Thread Tom Lane
Pavel Luzanov writes: > Another approach based on early suggestions. I think expecting the pg_roles view to change for this is problematic. You can't have that in the back branches, so with this patch psql will show something different against a pre-17 server than later versions. At best,

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

2024-01-22 Thread Tom Lane
I wrote: > I think expecting the pg_roles view to change for this is problematic. > You can't have that in the back branches, so with this patch psql > will show something different against a pre-17 server than later > versions. At best, that's going to be confusing. Actually, even more to the

Re: Make documentation builds reproducible

2024-01-22 Thread Peter Smith
On Tue, Jan 23, 2024 at 12:13 PM Tom Lane wrote: > > Peter Smith writes: > > I usually the HTML documentation locally using command: > > make STYLE=website html > > This has been working forever, but seems to have broken due to commit > > [1] having an undeclared variable. > > Interestingly,

Re: introduce dynamic shared memory registry

2024-01-22 Thread Nathan Bossart
On Mon, Jan 22, 2024 at 05:00:48PM +0530, Bharath Rupireddy wrote: > On Mon, Jan 22, 2024 at 3:43 AM Nathan Bossart > wrote: >> Oops. I've attached an attempt at fixing this. I took the opportunity to >> clean up the surrounding code a bit. > > The code looks cleaner and readable with the

Re: Support "Right Semi Join" plan shapes

2024-01-22 Thread vignesh C
On Mon, 22 Jan 2024 at 11:27, wenhui qiu wrote: > > Hi vignesh CI saw this path has been passed > (https://cirrus-ci.com/build/6109321080078336),can we push it? If you have found no comments from your review and testing, let's mark it as "ready for committer". Regards, Vignesh

Re: Add \syncpipeline command to pgbench

2024-01-22 Thread Michael Paquier
On Mon, Jan 22, 2024 at 05:53:13PM +0100, Alvaro Herrera wrote: > I hope this is OK. I debated a half a dozen alternatives ("with open > pipeline", "without closing pipeline", "with unclosed pipeline" (???), > "leaving pipeline open") and decided this was the least ugly. That looks OK to me.

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

2024-01-22 Thread Jeff Davis
On Mon, 2024-01-22 at 12:12 -0800, Andres Freund wrote: > I still think that anything that requires such checks shouldn't be > merged. It's completely bogus to check page contents for validity > when we > should have metadata telling us which range of the buffers is valid > and which > not. The

Re: In-placre persistance change of a relation

2024-01-22 Thread Kyotaro Horiguchi
At Mon, 22 Jan 2024 15:36:31 +1100, Peter Smith wrote in > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review" [1], but it seems > there was a CFbot test failure last time it was run [2]. Please have a > look and post an updated version if necessary. Thanks! I have added

Re: Synchronizing slots from primary to standby

2024-01-22 Thread Peter Smith
Here are some review comments for v65-0002 == 0. General - GUCs in messages I think it would be better for the GUC names to all be quoted. It's not a rule (yet), but OTOH it seems to be the consensus most people want. See [1]. This might impact the following messages: 0.1 + ereport(ERROR,

Re: core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Nathan Bossart
On Mon, Jan 22, 2024 at 03:38:15PM -0600, Nathan Bossart wrote: > On Mon, Jan 22, 2024 at 01:24:54PM -0800, Andres Freund wrote: >> On 2024-01-22 15:19:36 -0600, Nathan Bossart wrote: >>> I think this is because the autoprewarm state was moved to a DSM segment, >>> and DSM segments are detached

Re: Make documentation builds reproducible

2024-01-22 Thread Peter Smith
Hi, I usually the HTML documentation locally using command: make STYLE=website html ~ This has been working forever, but seems to have broken due to commit [1] having an undeclared variable. e.g. [postgres@CentOS7-x64 sgml]$ make STYLE=website html { \ echo ""; \ echo ""; \ } >

Re: Opportunistically pruning page before update

2024-01-22 Thread James Coleman
On Sun, Jan 21, 2024 at 9:58 PM Peter Smith wrote: > > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review" [1], but it seems > like there was some CFbot test failure last time it was run [2]. > Please have a look and post an updated version if necessary. > > == > [1]

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Pavel Stehule
po 22. 1. 2024 v 23:54 odesílatel Christoph Berg napsal: > Re: David G. Johnston > > Building off the other comments, I'd suggest trying to get rid of the > > intermediate JSOn format and also just focus on a single row at any given > > time. > > We need *some* machine-readable format. It

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Christoph Berg
Re: David G. Johnston > Building off the other comments, I'd suggest trying to get rid of the > intermediate JSOn format and also just focus on a single row at any given > time. We need *some* machine-readable format. It doesn't have to be JSON, but JSON is actually pretty nice to read - and if

Re: make dist using git archive

2024-01-22 Thread Junwang Zhao
On Tue, Jan 23, 2024 at 2:36 AM Peter Eisentraut wrote: > > On 22.01.24 13:10, Junwang Zhao wrote: > > I played this with meson build on macOS, the packages are generated > > in source root but not build root, I'm sure if this is by design but I think > > polluting *working directory* is not

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

2024-01-22 Thread David G. Johnston
On Mon, Jan 22, 2024 at 6:26 PM Tom Lane wrote: > I wrote: > > I think expecting the pg_roles view to change for this is problematic. > > You can't have that in the back branches, so with this patch psql > > will show something different against a pre-17 server than later > > versions. At best,

Re: Add support for data change delta tables

2024-01-22 Thread Vik Fearing
On 1/13/24 12:41, PavelTurk wrote: Hello all, Hi Pavel! Currently PostgreSQL doesn't support data change delta tables. For example, it doesn't support this type of query: SELECT * FROM NEW TABLE (     INSERT INTO phone_book     VALUES ( 'Peter Doe', '555-2323' ) ) AS t Correct. We do

Re: Make mesage at end-of-recovery less scary.

2024-01-22 Thread Kyotaro Horiguchi
At Wed, 17 Jan 2024 14:32:00 +0900, Michael Paquier wrote in > On Tue, Jan 16, 2024 at 02:46:02PM +0300, Aleksander Alekseev wrote: > >> For now, let me explain the basis for this patch. The fundamental > >> issue is that these warnings that always appear are, in practice, not > >> a problem in

Unnecessary smgropen in {heapam_relation,index}_copy_data?

2024-01-22 Thread Japin Li
Hi, hackers I find heapam_relation_copy_data() and index_copy_data() have the following code: dstrel = smgropen(*newrlocator, rel->rd_backend); ... RelationCreateStorage(*newrlocator, rel->rd_rel->relpersistence, true); The smgropen() is also called by

Re: core dumps in auto_prewarm, tests succeed

2024-01-22 Thread Alexander Lakhin
Hello Andres, 22.01.2024 23:41, Andres Freund wrote: Hi, I noticed that I was getting core dumps while executing the tests, without the tests failing. Backtraces are vriations of this: ... ISTM that we shouldn't basically silently overlook shutdowns due to crashes in the tests. How to not do

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

2024-01-22 Thread David G. Johnston
On Sun, Jan 21, 2024 at 2:35 PM Pavel Luzanov wrote: > List of roles > Role name | Attributes | Password? | Valid until | Connection > limit > ---+-+---++-- > admin | INHERIT

Re: Network failure may prevent promotion

2024-01-22 Thread Kyotaro Horiguchi
At Mon, 22 Jan 2024 13:29:10 -0800, Andres Freund wrote in > Hi, > > On 2024-01-19 12:28:05 +0900, Michael Paquier wrote: > > On Thu, Jan 18, 2024 at 03:42:28PM +0200, Heikki Linnakangas wrote: > > > Given that commit 728f86fec6 that introduced this issue was not strictly > > > required,

Re: Make documentation builds reproducible

2024-01-22 Thread Tom Lane
Peter Smith writes: > I usually the HTML documentation locally using command: > make STYLE=website html > This has been working forever, but seems to have broken due to commit > [1] having an undeclared variable. Interestingly, that still works fine for me, on RHEL8 with

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-22 Thread Michael Paquier
On Mon, Jan 22, 2024 at 09:02:48PM +0200, Heikki Linnakangas wrote: > On 22/01/2024 18:08, Heikki Linnakangas wrote: >> I wrote the attached patch to enable injection points in the Cirrus CI >> config, to run the injection tests I wrote for a GIN bug today [1]. But >> that led to a crash in the

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-22 Thread Michael Paquier
On Tue, Jan 23, 2024 at 12:08:17PM +0900, Michael Paquier wrote: > That was on my TODO list of things to tackle and propose, but perhaps > there is no point in waiting more so I've applied your patch. Slightly off topic and while I don't forget about it.. Please find attached a copy of the patch

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

2024-01-22 Thread Masahiko Sawada
On Mon, Jan 22, 2024 at 5:18 PM John Naylor wrote: > > On Mon, Jan 22, 2024 at 2:24 PM Masahiko Sawada wrote: > > > > For the next version patch, I'll work on this idea and try to clean up > > locking stuff both in tidstore and radix tree. Or if you're already > > working on some of them, please

Re: Add \syncpipeline command to pgbench

2024-01-22 Thread Michael Paquier
On Mon, Jan 22, 2024 at 01:59:00PM +0100, Alvaro Herrera wrote: > On 2024-Jan-22, Anthonin Bonnefoy wrote: >> 0002 adds the \syncpipeline command (original patch with an additional >> test case). > > I can look into this one later, unless Michael wants to. The patch seemed rather OK at quick

Re: Permute underscore separated components of columns before fuzzy matching

2024-01-22 Thread Arne Roland
Thank you! I wasn't aware of the filter per person. It was quite simple integrate a web scraper into my custom push system. Regarding the patch: I ran the 2.1.1 version of pg_bsd_indent now. I hope that suffices. I removed the matrix declaration to make it C90 complaint. I attached the

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

2024-01-22 Thread John Naylor
On Mon, Jan 22, 2024 at 2:24 PM Masahiko Sawada wrote: > > For the next version patch, I'll work on this idea and try to clean up > locking stuff both in tidstore and radix tree. Or if you're already > working on some of them, please let me know. I'll review it. Okay go ahead, sounds good. I

Re: Prefetch the next tuple's memory during seqscans

2024-01-22 Thread David Rowley
On Sat, 20 Jan 2024 at 16:35, vignesh C wrote: > I'm seeing that there has been no activity in this thread for more > than 6 months, I'm planning to close this in the current commitfest > unless someone is planning to take it forward. Thanks for the reminder about this. Since the

Re: Removing const-false IS NULL quals and redundant IS NOT NULL quals

2024-01-22 Thread David Rowley
On Mon, 22 Jan 2024 at 17:32, Peter Smith wrote: > Hi, This patch has a CF status of "Needs Review" [1], but it seems > there were CFbot test failures last time it was run [2]. I've attached v11 which updates the expected results in some newly added regression tests. No other changes. David

Re: Synchronizing slots from primary to standby

2024-01-22 Thread shveta malik
On Mon, Jan 22, 2024 at 12:28 PM Amit Kapila wrote: > > On Fri, Jan 19, 2024 at 3:55 PM shveta malik wrote: > > > > On Fri, Jan 19, 2024 at 10:35 AM Masahiko Sawada > > wrote: > > > > > > > > > Thank you for updating the patch. I have some comments: > > > > > > --- > > > +latestWalEnd

Re: Synchronizing slots from primary to standby

2024-01-22 Thread Amit Kapila
On Mon, Jan 22, 2024 at 1:11 PM Bertrand Drouvot wrote: > > Hi, > Thanks for sharing the feedback. > > > Then we also discussed whether extending libpqwalreceiver's connect > > API is a good idea and whether we need to further extend it in the > > future. As far as I can see, slotsync worker's

Re: initdb's -c option behaves wrong way?

2024-01-22 Thread Daniel Gustafsson
> On 19 Jan 2024, at 17:33, Tom Lane wrote: > > Daniel Gustafsson writes: >> I'll give some more time for opinions, then I'll go ahead with one of the >> patches with a backpatch to v16. > > OK, I take back my previous complaint that just using strncasecmp > would be enough --- I was

Re: XLog size reductions: smaller XLRec block header for PG17

2024-01-22 Thread Aleksander Alekseev
Hi, > I'm seeing that there has been no activity in this thread for nearly 4 > months, I'm planning to close this in the current commitfest unless > someone is planning to take it forward. I don't think that closing CF entries purely due to inactivity is a good practice (neither something we did

Re: FEATURE REQUEST: Role vCPU limit/priority

2024-01-22 Thread Aleksander Alekseev
Hi Yoni, > It would be useful to have the ability to define for a role default vCPU > affinity limits/thread priority settings so that more active sessions could > coexist similar to MySQL resource groups. To me this sounds like a valuable feature. Would you be interested in working on it?

Re: Removing const-false IS NULL quals and redundant IS NOT NULL quals

2024-01-22 Thread David Rowley
On Thu, 28 Dec 2023 at 00:38, Andy Fan wrote: > I also want to add notnullattnums for the UniqueKey stuff as well, by > comparing your implementation with mine, I found you didn't consider > the NOT NULL generated by filter. After apply your patch: > > create table a(a int); > explain (costs

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-22 Thread Amit Kapila
On Wed, Jul 26, 2023 at 7:22 PM Aleksander Alekseev wrote: > > > Here is the corrected patch. I added it to the nearest CF [1]. > > I played a bit more with the patch. There was an idea to make > ReorderBufferTupleBufData an opaque structure known only within > reorderbyffer.c but it turned out

Re: Synchronizing slots from primary to standby

2024-01-22 Thread shveta malik
On Fri, Jan 19, 2024 at 11:48 AM Peter Smith wrote: > > Here are some review comments for patch v63-0003. Thanks Peter. I have addressed all in v65. > > 4b. > It was a bit different when there were ERRORs but now they are LOGs > somehow it seems wrong for this function to say what the *caller*

Re: Make documentation builds reproducible

2024-01-22 Thread Peter Eisentraut
On 20.01.24 23:59, Tom Lane wrote: Peter Eisentraut writes: On 20.01.24 17:03, Tom Lane wrote: * I gather that the point here is to change some generated anchor tags. Would any of these tags be things people would be likely to have bookmarked? No, because the problem is that the anchor

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-22 Thread Aleksander Alekseev
Hi, > Hi, this patch was marked in CF as "Needs Review" [1], but there has > been no activity on this thread for 5+ months. > > Do you wish to keep this open, or can you post something to elicit > more interest in reviews for the latest patch set? Otherwise, if > nothing happens then the CF entry

Re: BUG: Former primary node might stuck when started as a standby

2024-01-22 Thread Aleksander Alekseev
Hi, > But node1 knows that it's a standby now and it's expected to get all the > WAL records from the primary, doesn't it? Yes, but node1 doesn't know if it always was a standby or not. What if node1 was always a standby, node2 was a primary, then node2 died and node3 is a new primary. If node1

Re: introduce dynamic shared memory registry

2024-01-22 Thread Bharath Rupireddy
On Mon, Jan 22, 2024 at 3:43 AM Nathan Bossart wrote: > > Oops. I've attached an attempt at fixing this. I took the opportunity to > clean up the surrounding code a bit. The code looks cleaner and readable with the patch. All the call sites are taking care of dsm_attach returning NULL value.

Re: Synchronizing slots from primary to standby

2024-01-22 Thread Amit Kapila
On Mon, Jan 22, 2024 at 8:42 PM Masahiko Sawada wrote: > > On Mon, Jan 22, 2024 at 9:26 PM Amit Kapila wrote: > > > > > > > > Yes. IIUC the slotsync worker uses libpqwalreceiver to establish a > > > non-replication connection and to execute SQL query. But neither of > > > them are relevant with

Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed

2024-01-22 Thread Michael Paquier
On Mon, Jan 22, 2024 at 09:07:45AM +, Bertrand Drouvot wrote: > On Mon, Jan 22, 2024 at 03:54:44PM +0900, Michael Paquier wrote: >> Also, wouldn't it be better to document in the test why >> txid_current_snapshot() is chosen? Contrary to txid_current(), it >> does not generate a

Re: Network failure may prevent promotion

2024-01-22 Thread Fujii Masao
On Tue, Jan 23, 2024 at 1:23 PM Kyotaro Horiguchi wrote: > > At Mon, 22 Jan 2024 13:29:10 -0800, Andres Freund wrote > in > > Hi, > > > > On 2024-01-19 12:28:05 +0900, Michael Paquier wrote: > > > On Thu, Jan 18, 2024 at 03:42:28PM +0200, Heikki Linnakangas wrote: > > > > Given that commit

Re: Incremental View Maintenance, take 2

2024-01-22 Thread Yugo NAGATA
On Mon, 22 Jan 2024 13:51:08 +1100 Peter Smith wrote: > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review" [1], but it seems > like there was some CFbot test failure last time it was run [2]. > Please have a look and post an updated version if necessary. Thank you for

Re: Multiple startup messages over the same connection

2024-01-22 Thread Heikki Linnakangas
On 22/01/2024 21:58, Vladimir Churyukin wrote: A question about protocol design - would it be possible to extend the protocol, so it can handle multiple startup / authentication messages over a single connection? Are there any serious obstacles? (possible issues with re-initialization of

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

2024-01-22 Thread Masahiko Sawada
On Tue, Jan 23, 2024 at 12:58 PM Masahiko Sawada wrote: > > On Mon, Jan 22, 2024 at 5:18 PM John Naylor wrote: > > > > On Mon, Jan 22, 2024 at 2:24 PM Masahiko Sawada > > wrote: > > > > > > For the next version patch, I'll work on this idea and try to clean up > > > locking stuff both in

Reordering DISTINCT keys to match input path's pathkeys

2024-01-22 Thread Richard Guo
Similar to what we did to GROUP BY keys in 0452b461bc, I think we can do the same to DISTINCT keys, i.e. reordering DISTINCT keys to match input path's pathkeys, which can help reduce cost by avoiding unnecessary re-sort, or allowing us to use incremental-sort to save efforts. For instance,

Re: Removing const-false IS NULL quals and redundant IS NOT NULL quals

2024-01-22 Thread Richard Guo
On Tue, Jan 23, 2024 at 1:11 PM David Rowley wrote: > I went over this again. I did a little more work adjusting comments > and pushed it. > > Thanks for all your assistance with this, Richard. Thanks for pushing! This is really great. Thanks Richard

Fix some errdetail's message format

2024-01-22 Thread Kyotaro Horiguchi
We recently made corrections to the capitalization of DETAIL messages. For example; - GUC_check_errdetail("invalid list syntax in parameter %s", + GUC_check_errdetail("Invalid list syntax in parameter %s", But still it is missing the period at the end. There are

Re: Opportunistically pruning page before update

2024-01-22 Thread Dilip Kumar
On Tue, Jan 23, 2024 at 7:18 AM James Coleman wrote: > > On Mon, Jan 22, 2024 at 8:21 PM James Coleman wrote: > > > > See rebased patch attached. > > I just realized I left a change in during the rebase that wasn't necessary. > > v4 attached. I have noticed that you are performing the

Re: Shared detoast Datum proposal

2024-01-22 Thread Andy Fan
Hi, Peter Smith writes: > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review" [1], but it seems > there were CFbot test failures last time it was run [2]. Please have a > look and post an updated version if necessary. > > == > [1]

RE: Synchronizing slots from primary to standby

2024-01-22 Thread Zhijie Hou (Fujitsu)
On Monday, January 22, 2024 11:36 AM shveta malik wrote: Hi, > On Fri, Jan 19, 2024 at 4:18 PM shveta malik wrote: > > > > PFA v64. > > V64 fails to apply to HEAD due to a recent commit. Rebased it. PFA v64_2. It > has > no new changes. I noticed few things while analyzing the patch. 1.

Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed

2024-01-22 Thread Bertrand Drouvot
Hi, On Mon, Jan 22, 2024 at 03:54:44PM +0900, Michael Paquier wrote: > On Fri, Jan 19, 2024 at 09:03:01AM +, Bertrand Drouvot wrote: > > On Fri, Jan 19, 2024 at 09:00:01AM +0300, Alexander Lakhin wrote: > +# Launch $sql and wait for a new snapshot that has a newer horizon before > +# doing

RE: speed up a logical replica setup

2024-01-22 Thread Hayato Kuroda (Fujitsu)
Dear Peter, > > > Yet other options could be > > pg_buildsubscriber, pg_makesubscriber as 'build' or 'make' in the name > > sounds like we are doing some work to create the subscriber which I > > think is the case here. > > I see your point here. pg_createsubscriber is not like createuser in >

Bug report and fix about building historic snapshot

2024-01-22 Thread cca5507
Hello, I find a bug in building historic snapshot and the steps to reproduce are as follows: Prepare: (pub)create table t1 (id int primary key); (pub)insert into t1 values (1); (pub)create publication pub for table t1; (sub)create table t1 (id int primary key); Reproduce:

Re: Add \syncpipeline command to pgbench

2024-01-22 Thread Anthonin Bonnefoy
That looks like a bug with how opened pipelines are not caught at the end of the script processing. startpipeline seems to have similar related issues. $ cat only_startpipeline.sql \startpipeline SELECT 1; With only 1 transaction, pgbench will consider this a success despite not sending anything

Re: speed up a logical replica setup

2024-01-22 Thread Amit Kapila
On Mon, Jan 22, 2024 at 2:38 PM Hayato Kuroda (Fujitsu) wrote: > > > > > Yet other options could be > > > pg_buildsubscriber, pg_makesubscriber as 'build' or 'make' in the name > > > sounds like we are doing some work to create the subscriber which I > > > think is the case here. > > > > I see

Re: Implement missing join selectivity estimation for range types

2024-01-22 Thread jian he
I cannot figure out why it aborts. as Tom mentioned in upthread about the test cases. similar to src/test/regress/sql/stats_ext.sql check_estimated_rows function. we can test it by something: create or replace function check_estimated_rows(text) returns table (ok bool) language plpgsql as $$

Re: heavily contended lwlocks with long wait queues scale badly

2024-01-22 Thread Michael Paquier
On Fri, Jan 19, 2024 at 01:49:59PM +0100, Jakub Wartak wrote: > Hi Michael, just to reassure you that it is a good thing. We have a > customer who reported much better performance on 16.x than on 13~15 in > very heavy duty LWLock/lockmanager scenarios (ofc, before that was > committed/released),

Re: UUID v7

2024-01-22 Thread Aleksander Alekseev
Hi, > But now (after big timeseries project with multiple time zones and DST > problems) I think differently. > Even though timestamp and timestamptz are practically the same, timestamptz > should be used to store the time in UTC. > Choosing timestamp is more likely to lead to problems and

psql: Allow editing query results with \gedit

2024-01-22 Thread Christoph Berg
Assuming a SELECT statement reading from a single table, it is quite an effort to transform that statement to an UPDATE statement on that table, perhaps to fix a typo that the user has spotted in the query result. First, the general syntax is not the same with the order of syntax elements

Re: Synchronizing slots from primary to standby

2024-01-22 Thread Masahiko Sawada
On Mon, Jan 22, 2024 at 9:26 PM Amit Kapila wrote: > > On Mon, Jan 22, 2024 at 5:28 PM Masahiko Sawada wrote: > > > > On Sat, Jan 20, 2024 at 7:44 PM Amit Kapila wrote: > > > > > > On Sat, Jan 20, 2024 at 10:52 AM Dilip Kumar > > > wrote: > > > > > > > > On Fri, Jan 19, 2024 at 5:24 PM Amit

Re: Add code indentation check to cirrus-ci (was Re: Add BF member koel-like indentation checks to SanityCheck CI)

2024-01-22 Thread Andrew Dunstan
On 2024-01-21 Su 22:19, Peter Smith wrote: 2024-01 Commitfest. Hi, This patch has a CF status of "Needs Review" [1], but it seems like there was some CFbot test failure last time it was run [2]. Please have a look and post an updated version if necessary. I don't think there's a consensus

Re: Support TZ format code in to_timestamp()

2024-01-22 Thread Aleksander Alekseev
Hi, > > Hi, this patch was marked in CF as "Needs Review" [1], but there has > > been no activity on this thread for 7+ months. > > If nothing more is planned for this thread then it will be closed > > ("Returned with feedback") at the end of this CF. > > I still think it would be a good idea,

  1   2   >