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

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: 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

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: 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: 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

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

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: 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: 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: 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: 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: 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: 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

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: 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: 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: 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: 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: 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: 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

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: 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: 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: [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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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.

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: 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: 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: 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

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: 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: 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: 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

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: 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: [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: 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: 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: 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: 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: 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: 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: 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: 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: the s_lock_stuck on perform_spin_delay

2024-01-22 Thread Andy Fan
Robert Haas writes: > On Mon, Jan 22, 2024 at 12:13 PM Andy Fan wrote: >> > On Mon, Jan 22, 2024 at 11:58 AM Andy Fan wrote: >> >> I get your point! Acquiring an already held spinlock in quickdie is >> >> unlikely to happen, but since our existing infrastructure can handle it, >> >> then

Re: the s_lock_stuck on perform_spin_delay

2024-01-22 Thread Robert Haas
On Mon, Jan 22, 2024 at 12:13 PM Andy Fan wrote: > > On Mon, Jan 22, 2024 at 11:58 AM Andy Fan wrote: > >> I get your point! Acquiring an already held spinlock in quickdie is > >> unlikely to happen, but since our existing infrastructure can handle it, > >> then there is no reason to bypass it.

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

2024-01-22 Thread Robert Haas
On Mon, Jan 22, 2024 at 5:38 AM Aleksander Alekseev wrote: > I don't think that closing CF entries purely due to inactivity is a > good practice (neither something we did before) as long as there is > code, it applies, etc. There are a lot of patches and few people > working on them. Inactivity

Commitfest 2024-01 third week update

2024-01-22 Thread vignesh C
Hi, Here's a quick status report after the third week: Status summary: status| w1 | w2 | w3 ---+---++-- Needs review: |238 | 213| 181 Waiting on Author:

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Pavel Stehule
po 22. 1. 2024 v 17:34 odesílatel David G. Johnston < david.g.johns...@gmail.com> napsal: > On Mon, Jan 22, 2024 at 8:06 AM Christoph Berg wrote: > >> Assuming a SELECT statement reading from a single table, it is quite an >> effort to transform that statement to an UPDATE statement on that

Re: Permute underscore separated components of columns before fuzzy matching

2024-01-22 Thread Arne Roland
Thank you for bringing that to my attention. Is there a way to subscribe to cf-bot failures? Apparently I confused myself with my naming. I attached a patch that fixes the bug (at least at my cassert test-world run). Regards Arne On 2024-01-22 06:38, Peter Smith wrote: 2024-01 Commitfest.

Re: the s_lock_stuck on perform_spin_delay

2024-01-22 Thread Andy Fan
Robert Haas writes: > On Mon, Jan 22, 2024 at 11:58 AM Andy Fan wrote: >> I get your point! Acquiring an already held spinlock in quickdie is >> unlikely to happen, but since our existing infrastructure can handle it, >> then there is no reason to bypass it. > > No, the existing

Re: Improving EXPLAIN's display of SubPlan nodes

2024-01-22 Thread Chantal Keller
Hi Aleksander and Tom I do confirm that I requested to get this information, in order to recover the formula to filter on. Thanks to both of you Chantal Le 22/01/2024 à 18:07, Tom Lane a écrit : Aleksander Alekseev writes: Although something like: ``` + Filter: (ANY (base_tbl.a =

Re: pg_stat_statements and "IN" conditions

2024-01-22 Thread Dmitry Dolgov
> On Mon, Jan 22, 2024 at 11:35:22AM -0500, Tom Lane wrote: > Dmitry Dolgov <9erthali...@gmail.com> writes: > >> On Mon, Jan 22, 2024 at 05:33:26PM +1100, Peter Smith wrote: > >> Hi, This patch has a CF status of "Needs Review" [1], but it seems > >> there was a CFbot test failure last time it was

Re: Improving EXPLAIN's display of SubPlan nodes

2024-01-22 Thread Tom Lane
Aleksander Alekseev writes: > Although something like: > ``` > + Filter: (ANY (base_tbl.a = $1) FROM SubPlan 1 (returns $1)) > + SubPlan 1 (returns $1) > ``` > ... arguably doesn't give much more information to the user comparing > to what we have now: > ``` > - Filter: (SubPlan 1) > -

Re: the s_lock_stuck on perform_spin_delay

2024-01-22 Thread Robert Haas
On Mon, Jan 22, 2024 at 11:58 AM Andy Fan wrote: > I get your point! Acquiring an already held spinlock in quickdie is > unlikely to happen, but since our existing infrastructure can handle it, > then there is no reason to bypass it. No, the existing infrastructure cannot handle that at all. --

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

2024-01-22 Thread vignesh C
On Mon, 22 Jan 2024 at 16:08, Aleksander Alekseev wrote: > > 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

Re: the s_lock_stuck on perform_spin_delay

2024-01-22 Thread Andy Fan
Robert Haas writes: > On Mon, Jan 22, 2024 at 2:22 AM Andy Fan wrote: >> I used sigismember(, SIGQUIT) to detect if a process is doing a >> quickdie, however this is bad not only because it doesn't work on >> Windows, but also it has too poor performance even it impacts on >>

Re: Add \syncpipeline command to pgbench

2024-01-22 Thread Alvaro Herrera
On 2024-Jan-22, Anthonin Bonnefoy wrote: > 0001 introduces a new error when the end of a pgbench script is > reached while there's still an ongoing pipeline. Pushed, backpatched to 14. I reworded the error message to be client %d aborted: end of script reached with pipeline open I hope this

Re: pg_stat_statements and "IN" conditions

2024-01-22 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: >> On Mon, Jan 22, 2024 at 05:33:26PM +1100, Peter Smith wrote: >> 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

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread David G. Johnston
On Mon, Jan 22, 2024 at 8:06 AM Christoph Berg wrote: > 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. > > Building off the

Re: Support TZ format code in to_timestamp()

2024-01-22 Thread Tom Lane
Daniel Gustafsson writes: > On 22 Jan 2024, at 03:10, Tom Lane wrote: > + while (len > 0) > + { > + const datetkn *tp = datebsearch(lowtoken, zoneabbrevtbl->abbrevs, > + zoneabbrevtbl->numabbrevs); > My immediate reaction was that we should stop

Re: remaining sql/json patches

2024-01-22 Thread Alvaro Herrera
On 2024-Jan-18, Alvaro Herrera wrote: > > commands/explain.c (Hmm, I think this is a preexisting bug actually) > > > > 3893 18 : case T_TableFuncScan: > > 3894 18 : Assert(rte->rtekind == RTE_TABLEFUNC); > > 3895 18 : if

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Tom Lane
Pavel Stehule writes: > po 22. 1. 2024 v 16:06 odesílatel Christoph Berg napsal: >> This patch automates the tedious parts by opening the query result in a >> editor in JSON format, where the user can edit the data. On closing the >> editor, the JSON data is read back, and the differences are

Re: pg_stat_statements and "IN" conditions

2024-01-22 Thread Dmitry Dolgov
> On Mon, Jan 22, 2024 at 05:33:26PM +1100, Peter Smith wrote: > 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. > > == > [1]

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

2024-01-22 Thread Heikki Linnakangas
On 22/01/2024 06:38, Michael Paquier wrote: 0001~0004 have been now applied, and I'm marking the CF entry as committed. Woo-hoo! 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

Re: Add tuples_skipped to pg_stat_progress_copy

2024-01-22 Thread torikoshia
On 2024-01-17 14:47, Masahiko Sawada wrote: On Wed, Jan 17, 2024 at 2:22 PM torikoshia wrote: Hi, 132de9968840c introduced SAVE_ERROR_TO option to COPY and enabled to skip malformed data, but there is no way to watch the number of skipped rows during COPY. Attached patch adds

Re: Support TZ format code in to_timestamp()

2024-01-22 Thread Daniel Gustafsson
> On 22 Jan 2024, at 03:10, Tom Lane wrote: > I still think it would be a good idea, but I can't deny the lack > of other interest in it. Unless someone steps up to review, > let's close it. Since I had this on my (ever-growing) TODO I re-prioritized today and took a look at it since I think

Re: remaining sql/json patches

2024-01-22 Thread jian he
On Mon, Jan 22, 2024 at 10:28 PM Amit Langote wrote: > > > based on v35. > > Now I only applied from 0001 to 0007. > > For {DEFAULT expression ON EMPTY} | {DEFAULT expression ON ERROR} > > restrict DEFAULT expression be either Const node or FuncExpr node. > > so these 3 SQL/JSON functions can

Re: psql: Allow editing query results with \gedit

2024-01-22 Thread Pavel Stehule
Hi po 22. 1. 2024 v 16:06 odesílatel Christoph Berg napsal: > 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

Re: the s_lock_stuck on perform_spin_delay

2024-01-22 Thread Robert Haas
On Mon, Jan 22, 2024 at 2:22 AM Andy Fan wrote: > I used sigismember(, SIGQUIT) to detect if a process is doing a > quickdie, however this is bad not only because it doesn't work on > Windows, but also it has too poor performance even it impacts on > USE_ASSERT_CHECKING build only. In v8, I

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,

Re: psql JSON output format

2024-01-22 Thread Christoph Berg
Re: Laurenz Albe > > But I do think it has positive > > value. If we produce output that could be ingested back into PG later > > with the right tool, that leaves the door open for someone to build > > the tool later even if we don't have it today. If we produce output > > that loses information,

  1   2   >