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] > https

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 ""; \ } > version.sgm

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 docbook-dtds-1.0-69.el8.

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, that's

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] https

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 po

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, that

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 v4-00

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 good.

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

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

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 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 \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. Tha

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

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 ch

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 glan

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

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, perhaps

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 doesn't

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 result.

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 (cost=N.N

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 RelationCreateS

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 s

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

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 Transaction/CO

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] https://commitfest.postgresql.org/46/4

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, creat

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 728f8

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

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 sever

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 backen

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 opportunis

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 tidsto

<    1   2