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 $$ decl

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 plan

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: (pub)beg

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), so

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

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 the

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 >

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 you

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 p

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 misremembe

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 heapgettup/hea

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 nam

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? Typ

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 s

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 off)

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 th

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 Fro

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

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 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* w

Re: Synchronizing slots from primary to standby

2024-01-22 Thread Masahiko Sawada
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 Kapila wrote: > > > > > > On Wed, Jan 17, 2024 at 4:00 PM shveta malik > > > wrote: > > > > > > > > > > I had some off-list discussions with S

Re: partitioning and identity column

2024-01-22 Thread Peter Eisentraut
On 17.01.24 06:36, Ashutosh Bapat wrote: On Wed, Jan 17, 2024 at 12:30 AM Peter Eisentraut wrote: On 09.01.24 15:10, Ashutosh Bapat wrote: Here's complete patch-set. Looks good! Committed. Thanks a lot Peter. I found another piece of code that might need updating, or at least the com

Re: make dist using git archive

2024-01-22 Thread Junwang Zhao
Hi, On Mon, Jan 22, 2024 at 3:32 PM Peter Eisentraut wrote: > > One of the goals is to make the creation of the distribution tarball > more directly traceable to the git repository. That is why we removed > the "make distprep" step. > > Here I want to take another step in that direction, by chan

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-22 Thread Bharath Rupireddy
On Mon, Jan 22, 2024 at 4:17 PM Aleksander Alekseev wrote: > > 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 f

Re: partitioning and identity column

2024-01-22 Thread Ashutosh Bapat
On Mon, Jan 22, 2024 at 5:32 PM Peter Eisentraut wrote: > > I found another piece of code that might need updating, or at least the > comment. > > In MergeAttributes(), in the part that merges the specified column > definitions into the inherited ones, it says > > /* > * Identity is nev

Re: Synchronizing slots from primary to standby

2024-01-22 Thread Amit Kapila
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 Kapila > > > wrote: > > > > > > > > On Wed, Jan 17, 2024 at 4:00 PM shveta

Does redundant extension exist During faster COPY in PG16

2024-01-22 Thread 何柯文(渊云)
Hi, 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 requested not to. * * We use the same extension lock for all fork

Re: Improving EXPLAIN's display of SubPlan nodes

2024-01-22 Thread Aleksander Alekseev
Hi, > EXPLAIN has always been really poor at displaying SubPlan nodes > in expressions: you don't get much more than "(SubPlan N)". > This is mostly because every time I thought about it, I despaired > of trying to represent all the information in a SubPlan accurately. > However, a recent discussi

Re: tablecmds.c/MergeAttributes() cleanup

2024-01-22 Thread Peter Eisentraut
On 06.12.23 09:23, Peter Eisentraut wrote: The (now) second patch is also still of interest to me, but I have since noticed that I think [0] should be fixed first, but to make that fix simpler, I would like the first patch from here. [0]: https://www.postgresql.org/message-id/flat/24656cec-d6

Re: Add \syncpipeline command to pgbench

2024-01-22 Thread Alvaro Herrera
On 2024-Jan-22, Anthonin Bonnefoy wrote: > 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. Ah, yeah. Your fix looks necessary on a quick look. I'll review and see about backpatching this.

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-22 Thread Ashutosh Bapat
Hi Jeff, On Tue, Jan 16, 2024 at 7:25 AM Jeff Davis wrote: > > On Fri, 2024-01-12 at 17:17 -0800, Jeff Davis wrote: > > I think 0004 needs a bit more work, so I'm leaving it off for now, > > but > > I'll bring it back in the next patch set. > > Here's the next patch set. 0001 - 0003 are mostly th

Re: Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()

2024-01-22 Thread Bertrand Drouvot
Hi, On Mon, Jan 22, 2024 at 04:14:46PM +1100, Peter Smith wrote: > 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. Thanks for the w

Re: [DOC] Add detail regarding resource consumption wrt max_connections

2024-01-22 Thread reid . thompson
On Fri, 2024-01-19 at 17:37 -0500, reid.thomp...@crunchydata.com wrote: > On Sat, 2024-01-13 at 10:31 -0700, Roberto Mello wrote: > > > > I can add a suggestion for the user to consider increasing > > shared_buffers in accordance with higher max_connections, but it > > would be better if there was

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-22 Thread Aleksander Alekseev
Hi, > > 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 that replication/logical/decode.c > > accesses it directly so I abandoned that idea for now. > > > > > Alternatively we co

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

2024-01-22 Thread Melih Mutlu
Hi Bharath, Thanks for working on this. It seems like a nice improvement to have. Here are some comments on 0001 patch. 1- xlog.c + /* + * Fast paths for the following reasons: 1) WAL buffers aren't in use when + * server is in recovery. 2) WAL is inserted into WAL buffers on current + * server

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-22 Thread Aleksander Alekseev
Hi, > > But why didn't you pursue your idea of getting rid of the wrapper > > structure ReorderBufferTupleBuf which after this patch will have just > > one member? I think there could be hassles in backpatching bug-fixes > > in some cases but in the longer run it would make the code look clean. >

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 misun

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

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 Ka

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 t

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

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

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(&BlockSig, 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,

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 g

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 be

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 it

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 tuples_skippe

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

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 sen

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 (rte-

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 at

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 ot

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 necess

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: 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(&BlockSig, 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_ASSE

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 entrie

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

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

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

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

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

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: http://commitfest.cputube.org/arne-

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

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: 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. */ def->identit

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 cras

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 exclu

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.

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 could

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

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 requested

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

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 0x

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

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 succes

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.

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 hea

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

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

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 ap

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

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 bef

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 va

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

  1   2   >