Re: proposal: psql: show current user in prompt

2024-01-26 Thread Pavel Stehule
út 12. 9. 2023 v 9:46 odesílatel Peter Eisentraut napsal: > On 11.09.23 13:59, Jelte Fennema wrote: > > @Tom and @Robert, since you originally suggested extending the > > protocol for this, I think some input from you on the protocol design > > would be quite helpful. BTW, this protocol extension

Re: Apply the "LIMIT 1" optimization to partial DISTINCT

2024-01-26 Thread David Rowley
On Fri, 26 Jan 2024 at 20:42, Richard Guo wrote: > > In 5543677ec9 we introduced an optimization that uses Limit instead of > Unique to implement DISTINCT when all the DISTINCT pathkeys have been > marked as redundant. I happened to notice that this optimization was > not applied to partial DISTI

Re: proposal: psql: show current user in prompt

2024-01-26 Thread Pavel Stehule
po 8. 1. 2024 v 6:08 odesílatel vignesh C napsal: > On Tue, 12 Sept 2023 at 14:39, Peter Eisentraut > wrote: > > > > On 11.09.23 13:59, Jelte Fennema wrote: > > > @Tom and @Robert, since you originally suggested extending the > > > protocol for this, I think some input from you on the protocol d

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

2024-01-26 Thread Junwang Zhao
On Thu, Jan 25, 2024 at 4:52 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Thu, 25 Jan 2024 13:36:03 +0900, > Masahiko Sawada wrote: > > > I've experimented with a similar optimization for csv > > and t

Re: Current Connection Information

2024-01-26 Thread Aleksander Alekseev
Hi Maiquel, I assume you wanted to reply to the mailing list and add me to cc: (aka "Reply to All") but sent the e-mail off-list by mistake, so quoting it here: > Hi Aleksander, > > Why do you think DataGrip users would be unhappy? > > I liked your suggestion of creating something like \whoami fo

Re: Synchronizing slots from primary to standby

2024-01-26 Thread Bertrand Drouvot
Hi, On Thu, Jan 25, 2024 at 01:11:50PM +, Zhijie Hou (Fujitsu) wrote: > Here is the V69 patch set which includes the following changes. > > V69-0001, V69-0002 > 1) Addressed Bertrand's comments[1]. Thanks! V69-0001 LGTM. As far V69-0002 I just have one more last remark: +

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

2024-01-26 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 26 Jan 2024 16:18:14 +0800, Junwang Zhao wrote: > In the current implementation, there is no way that one can check > incompatibility > options in ProcessCopyOptions, we can postpone the check in CopyF

Re: Improve eviction algorithm in ReorderBuffer

2024-01-26 Thread Masahiko Sawada
On Wed, Dec 20, 2023 at 12:11 PM Amit Kapila wrote: > > On Wed, Dec 20, 2023 at 6:49 AM Masahiko Sawada wrote: > > > > On Tue, Dec 19, 2023 at 8:02 PM Amit Kapila wrote: > > > > > > On Tue, Dec 19, 2023 at 8:31 AM Masahiko Sawada > > > wrote: > > > > > > > > On Sun, Dec 17, 2023 at 11:40 AM Am

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

2024-01-26 Thread Junwang Zhao
On Fri, Jan 26, 2024 at 4:32 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 26 Jan 2024 16:18:14 +0800, > Junwang Zhao wrote: > > > In the current implementation, there is no way that one can check > > incompatibil

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

2024-01-26 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 26 Jan 2024 08:35:19 +0900, Michael Paquier wrote: >> OK. How about the following for the fetch function >> signature? >> >> extern CopyToRoutine *GetBuiltinCopyToRoutine(const char *format); > > Or

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

2024-01-26 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 26 Jan 2024 16:41:50 +0800, Junwang Zhao wrote: > CopyToProcessOption()/CopyFromProcessOption() can only handle > single option, and store the options in the opaque field, but it can not > check the r

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

2024-01-26 Thread Junwang Zhao
On Fri, Jan 26, 2024 at 4:55 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 26 Jan 2024 16:41:50 +0800, > Junwang Zhao wrote: > > > CopyToProcessOption()/CopyFromProcessOption() can only handle > > single option, a

Re: Small fix on COPY ON_ERROR document

2024-01-26 Thread Yugo NAGATA
On Thu, 25 Jan 2024 23:33:22 -0700 "David G. Johnston" wrote: > On Thu, Jan 25, 2024 at 10:40 PM Yugo NAGATA wrote: > > > On Fri, 26 Jan 2024 13:59:09 +0900 > > Masahiko Sawada wrote: > > > > > On Fri, Jan 26, 2024 at 11:28 AM Yugo NAGATA > > wrote: > > > > > > > > Hi, > > > > > > > > I found

Re: Small fix on COPY ON_ERROR document

2024-01-26 Thread Yugo NAGATA
On Fri, 26 Jan 2024 00:00:57 -0700 "David G. Johnston" wrote: > On Thursday, January 25, 2024, Yugo NAGATA wrote: > > > > > Maybe, we can separate the sentese to two, for example: > > > > COPY stops operation at the first error. (The exception is if the error > > is due to data type incompa

Add new COPY option REJECT_LIMIT

2024-01-26 Thread torikoshia
Hi, 9e2d870 enabled the COPY command to skip soft error, and I think we can add another option which specifies the maximum tolerable number of soft errors. I remember this was discussed in [1], and feel it would be useful when loading 'dirty' data but there is a limit to how dirty it can be.

Finding every use of a built-in function

2024-01-26 Thread Kurlaev Jaroslav
Hi hackers, I'm not sure if it's the best list for my question but I have a following problem. I have an existing DB with lots of data and I need to modify the behavior of one specific built-in function. I can of course create my own function and redefine the behavior but now I need to find ev

Re: proposal: psql: show current user in prompt

2024-01-26 Thread Jelte Fennema-Nio
On Thu, 25 Jan 2024 at 21:43, Pavel Stehule wrote: > 2. using GUC for all reported GUC looks not too readable. Maybe it should be > used just for customized reporting, not for default I thought about this too, because indeed the default list is quite long. But I decided against it because it see

Re: Printing backtrace of postgres processes

2024-01-26 Thread Alvaro Herrera
On 2022-Jan-27, vignesh C wrote: > diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml > index 0ee6974f1c..855ccc8902 100644 > --- a/doc/src/sgml/func.sgml > +++ b/doc/src/sgml/func.sgml > +You can get the file name and line number from the logged details by > using > +gdb/addr2

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-01-26 Thread Jelte Fennema-Nio
On Fri, 26 Jan 2024 at 02:59, vignesh C wrote: > Please post an updated version for the same. Done. From 5a94d610a4fe138365e2e88c5cec72eba53ed036 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Thu, 14 Dec 2023 13:39:04 +0100 Subject: [PATCH v25 2/3] Add non-blocking version of PQcancel

Re: Reordering DISTINCT keys to match input path's pathkeys

2024-01-26 Thread Richard Guo
On Tue, Jan 23, 2024 at 5:03 PM David Rowley wrote: > I've not caught up on the specifics of 0452b461b, but I just wanted to > highlight that there was some work done in [1] in this area. It seems > Ankit didn't ever add that to a CF, so that might explain why it's > been lost. > > Anyway, just

Re: Finding every use of a built-in function

2024-01-26 Thread Pavel Stehule
Hi pá 26. 1. 2024 v 11:39 odesílatel Kurlaev Jaroslav napsal: > Hi hackers, > > I'm not sure if it's the best list for my question but I have a following > problem. > > I have an existing DB with lots of data and I need to modify the behavior > of one specific > built-in function. I can of cours

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-01-26 Thread Alvaro Herrera
Pushed 0001. I wonder, would it make sense to put all these new functions in a separate file fe-cancel.c? -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "World domination is proceeding according to plan"(Andrew Morton)

Re: Use of backup_label not noted in log

2024-01-26 Thread David Steele
On 1/25/24 20:52, Michael Paquier wrote: On Thu, Jan 25, 2024 at 08:56:52AM -0400, David Steele wrote: I would still advocate for a back patch here. It is frustrating to get logs from users that just say: LOG: invalid checkpoint record PANIC: could not locate a valid checkpoint record It

Re: [PATCH] Add native windows on arm64 support

2024-01-26 Thread Andrew Dunstan
On 2024-01-25 Th 20:32, Michael Paquier wrote: On Thu, Jan 25, 2024 at 04:52:30PM -0500, Dave Cramer wrote: On Thu, 25 Jan 2024 at 16:32, Andrew Dunstan wrote: On 2024-01-25 Th 16:17, Dave Cramer wrote: Yeah, I think the default Developer Command Prompt for VS2022 is set up for x86 builds. A

Re: More new SQL/JSON item methods

2024-01-26 Thread Jeevan Chalke
On Fri, Jan 26, 2024 at 2:57 AM Andrew Dunstan wrote: > > On 2024-01-25 Th 15:58, Tom Lane wrote: > > I wrote: > >> There's something else going on, because I'm still getting the > >> assertion failure on my Mac with this fix in place. Annoyingly, > >> it goes away if I compile with -O0, so it's

Re: POC: Extension for adding distributed tracing - pg_tracing

2024-01-26 Thread Nikita Malakhov
Hi! It's a good idea to split a big patch into several smaller ones. But you've already implemented these features - you could provide them as sequential small patches (i.e. v13-0002-guc-context-propagation.patch and so on) Great job! I'm both hands for committing your patch set. On Fri, Jan 26,

Re: A new strategy for pull-up correlated ANY_SUBLINK

2024-01-26 Thread vignesh C
On Fri, 13 Oct 2023 at 14:09, Alena Rybakina wrote: > > On 13.10.2023 10:04, Andy Fan wrote: >> >> It seems to me that the expressions "=" and "IN" are equivalent here due to >> the fact that the aggregated subquery returns only one value, and the result >> with the "IN" operation can be conside

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-01-26 Thread vignesh C
On Mon, 4 Dec 2023 at 13:22, Dmitry Koval wrote: > > Hello! > > Added commit v21-0004-SPLIT-PARTITION-optimization.patch. CFBot shows that the patch does not apply anymore as in [1]: === Applying patches on top of PostgreSQL commit ID 8ba6fdf905d0f5aef70ced4504c6ad297bfe08ea === === applying patc

Re: Exposing the lock manager's WaitForLockers() to SQL

2024-01-26 Thread vignesh C
On Thu, 11 Jan 2024 at 15:22, Will Mortensen wrote: > > Here is a new series adding a single pg_wait_for_lockers() function > that takes a boolean argument to control the interpretation of the > lock mode. It omits LOCK's handling of descendant tables so it > requires permissions directly on desce

Re: Add recovery to pg_control and remove backup_label

2024-01-26 Thread vignesh C
On Mon, 20 Nov 2023 at 06:46, Michael Paquier wrote: > > (I am not exactly sure how, but we've lost pgsql-hackers on the way > when you sent v5. Now added back in CC with the two latest patches > you've proposed attached.) > > Here is a short summary of what has been missed by the lists: > - I've

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-01-26 Thread vignesh C
On Wed, 10 Jan 2024 at 19:49, jian he wrote: > > On Wed, Jan 10, 2024 at 8:00 AM jian he wrote: > > > > ` > > from the doc, add sortsupport function will only influence index build time? > > > > +/* > > + * GiST sortsupport comparator for ranges. > > + * > > + * Operates solely on the lower bound

Re: [PATCH] Add support function for containment operators

2024-01-26 Thread vignesh C
On Sun, 21 Jan 2024 at 00:31, Tom Lane wrote: > > jian he writes: > > Now I see your point. If the transformed plan is right, the whole > > added code should be fine. > > but keeping the textrange_supp related test should be a good idea. > > since we don't have SUBTYPE_OPCLASS related sql tests.

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2024-01-26 Thread vignesh C
On Sat, 20 Jan 2024 at 08:39, Michael Paquier wrote: > > On Sat, Jan 20, 2024 at 07:59:22AM +0530, vignesh C wrote: > > I'm seeing that there has been no activity in this thread for more > > than 8 months, I'm planning to close this in the current commitfest > > unless someone is planning to take

Re: [PATCH] Compression dictionaries for JSONB

2024-01-26 Thread vignesh C
On Wed, 17 Jan 2024 at 19:52, Aleksander Alekseev wrote: > > Hi Shubham, > > > > > 8272749e added a few more arguments to CastCreate(). Here is the > > > > rebased patch. > > > > > > After merging afbfc029 [1] the patch needed a rebase. PFA v10. > > > > > > The patch is still in a PoC state and t

Re: Confine vacuum skip logic to lazy_scan_skip

2024-01-26 Thread vignesh C
On Fri, 12 Jan 2024 at 05:12, Melanie Plageman wrote: > > v3 attached > > On Thu, Jan 4, 2024 at 3:23 PM Andres Freund wrote: > > > > Hi, > > > > On 2024-01-02 12:36:18 -0500, Melanie Plageman wrote: > > > Subject: [PATCH v2 1/6] lazy_scan_skip remove unnecessary local var > > > rel_pages > > >

Re: tablecmds.c/MergeAttributes() cleanup

2024-01-26 Thread Peter Eisentraut
On 24.01.24 07:27, Ashutosh Bapat wrote: While working on identity support and now while looking at the compression problem you referred to, I found MergeAttribute() to be hard to read. It's hard to follow high level logic in that function since the function is not modular. I took a stab at modul

Re: Add new error_action COPY ON_ERROR "log"

2024-01-26 Thread jian he
On Fri, Jan 26, 2024 at 12:42 AM torikoshia wrote: > > Hi, > > As described in 9e2d870119, COPY ON_EEOR is expected to have more > "error_action". > (Note that option name was changed by b725b7eec) > > I'd like to have a new option "log", which skips soft errors and logs > information that should

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

2024-01-26 Thread Bharath Rupireddy
On Fri, Jan 26, 2024 at 8:31 AM Jeff Davis wrote: > > > PSA v20 patch set. > > 0001 is very close. I have the following suggestions: > > * Don't just return zero. If the caller is doing something we don't > expect, we want to fix the caller. I understand you'd like this to be > more like a trans

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

2024-01-26 Thread Masahiko Sawada
On Wed, Jan 24, 2024 at 3:42 PM John Naylor wrote: > > On Tue, Jan 23, 2024 at 10:58 AM Masahiko Sawada > wrote: > > > > The new patches probably need to be polished but the VacDeadItemInfo > > idea looks good to me. > > That idea looks good to me, too. Since you already likely know what > you'd

Re: [PATCH] Add native windows on arm64 support

2024-01-26 Thread Dave Cramer
On Fri, 26 Jan 2024 at 07:36, Andrew Dunstan wrote: > > On 2024-01-25 Th 20:32, Michael Paquier wrote: > > On Thu, Jan 25, 2024 at 04:52:30PM -0500, Dave Cramer wrote: > >> On Thu, 25 Jan 2024 at 16:32, Andrew Dunstan > wrote: > >>> On 2024-01-25 Th 16:17, Dave Cramer wrote: > >>> Yeah, I think

Re: POC: GROUP BY optimization

2024-01-26 Thread vignesh C
On Thu, 25 Jan 2024 at 01:15, Alexander Korotkov wrote: > > On Wed, Jan 24, 2024 at 7:38 PM Nathan Bossart > wrote: > > A recent buildfarm failure [0] seems to indicate a name collision with the > > "abc" index in the aggregates.sql test and the "abc" table in > > namespace.sql. > > > > [0] > >

Re: logical decoding and replication of sequences, take 2

2024-01-26 Thread Robert Haas
On Wed, Jan 24, 2024 at 12:46 PM Tomas Vondra wrote: > I did try to explain how this works (and why) in a couple places: > > 1) the commit message > 2) reorderbuffer header comment > 3) ReorderBufferSequenceIsTransactional comment (and nearby) > > It's possible this does not meet your expectations

RE: Current Connection Information

2024-01-26 Thread Maiquel Grassi
Hi Aleksander, >>I assume you wanted to reply to the mailing list and add me to cc: >>(aka "Reply to All") but sent the e-mail off-list by mistake, so >>quoting it here: Yes, tks for that. >>IMO it's worth trying submitting the patch, if your time permits it of course. I've been spending a litt

Re: pg_upgrade failing for 200+ million Large Objects

2024-01-26 Thread vignesh C
On Tue, 2 Jan 2024 at 23:03, Kumar, Sachin wrote: > > > On 11/12/2023, 01:43, "Tom Lane" > > wrote: > > > I had initially supposed that in a parallel restore we could > > have child workers also commit after every N TOC items, but was > > soon disabused of that idea. Af

Re: PoC: prefetching index leaf pages (for inserts)

2024-01-26 Thread vignesh C
On Mon, 6 Nov 2023 at 22:36, Tomas Vondra wrote: > > Seems cfbot was not entirely happy about the patch, for two reasons: > > 1) enable_insert_prefetching definition was inconsistent (different > boot/default values, missing in .conf and so on) > > 2) stupid bug in execReplication, inserting index

Re: Lockless queue of waiters in LWLock

2024-01-26 Thread vignesh C
On Sat, 20 Jan 2024 at 07:28, vignesh C wrote: > > On Sat, 26 Nov 2022 at 00:24, Pavel Borisov wrote: > > > > Hi, hackers! > > In the measurements above in the thread, I've been using LIFO wake > > queue in a primary lockless patch (and it was attached as the previous > > versions of a patch) and

Re: Transaction timeout

2024-01-26 Thread Japin Li
On Fri, 26 Jan 2024 at 14:44, Andrey M. Borodin wrote: >> On 22 Jan 2024, at 11:23, 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: Remove unused fields in ReorderBufferTupleBuf

2024-01-26 Thread reid . thompson
On Fri, 2024-01-26 at 13:51 +0900, Masahiko Sawada wrote: > On Fri, Jan 26, 2024 at 1:24 PM wrote: > > > > On Thu, 2024-01-25 at 16:11 -0500, reid.thomp...@crunchydata.com wrote: > > > > > > I walked through v6 and didn't note any issues. > > Thank you for reviewing the patch! > Happy to. > >

Re: MERGE ... WHEN NOT MATCHED BY SOURCE

2024-01-26 Thread vignesh C
On Sat, 1 Jul 2023 at 18:04, Dean Rasheed wrote: > > On Tue, 21 Mar 2023 at 12:26, Alvaro Herrera wrote: > > > > On 2023-Mar-21, Dean Rasheed wrote: > > > > > Looking at it with fresh eyes though, I realise that I could have just > > > written > > > > > > action->qual = make_and_qual((Node *

Re: Supporting MERGE on updatable views

2024-01-26 Thread vignesh C
On Mon, 30 Oct 2023 at 15:04, Dean Rasheed wrote: > > On Sun, 29 Oct 2023 at 17:17, Dean Rasheed wrote: > > > > On Sat, 28 Oct 2023 at 09:35, jian he wrote: > > > > > > Do we need to add > > > > We don't want to include MERGE in that sentence, because MERGE i

Re: A failure in t/038_save_logical_slots_shutdown.pl

2024-01-26 Thread Bharath Rupireddy
On Thu, Jan 25, 2024 at 5:07 PM Amit Kapila wrote: > > On Thu, Jan 25, 2024 at 4:27 PM Bharath Rupireddy > wrote: > > > > Thanks. I'll wait a while and then add it to CF to not lose it in the wild. > > > > Feel free to add it to CF. However, I do plan to look at it in the > next few days. Thanks

Re: Small fix on COPY ON_ERROR document

2024-01-26 Thread David G. Johnston
On Fri, Jan 26, 2024 at 2:30 AM Yugo NAGATA wrote: > On Fri, 26 Jan 2024 00:00:57 -0700 > "David G. Johnston" wrote: > > > I will need to make this tweak and probably a couple others to my own > > suggestions in 12 hours or so. > > > > And here is my v2. Notably I choose to introduce the verbia

Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-01-26 Thread David G. Johnston
Hi, The option choice of "ignore" in the COPY ON_ERROR clause seems overly generic. There would seem to be two relevant ways to ignore bad column input data - drop the entire row or just set the column value to null. I can see us wanting to provide the set to null option and in any case having t

Re: POC: GROUP BY optimization

2024-01-26 Thread Robert Haas
On Tue, Dec 26, 2023 at 10:23 PM Tom Lane wrote: > I think it's a fool's errand to even try to separate different sort > column orderings by cost. We simply do not have sufficiently accurate > cost information. The previous patch in this thread got reverted because > of that (well, also some imp

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2024-01-26 Thread vignesh C
On Wed, 4 Oct 2023 at 04:02, Ashutosh Bapat wrote: > > On Fri, Sep 29, 2023 at 8:36 AM Amit Langote wrote: > > IOW, something > > like the following would have sufficed: > > > > @@ -1735,6 +1735,10 @@ build_child_join_sjinfo(PlannerInfo *root, > > SpecialJoinInfo *parent_sjinfo, > > /* > > * f

Re: Add new COPY option REJECT_LIMIT

2024-01-26 Thread David G. Johnston
On Fri, Jan 26, 2024 at 2:49 AM torikoshia wrote: > Hi, > > 9e2d870 enabled the COPY command to skip soft error, and I think we can > add another option which specifies the maximum tolerable number of soft > errors. > > I remember this was discussed in [1], and feel it would be useful when > load

Re: POC: GROUP BY optimization

2024-01-26 Thread Tom Lane
Robert Haas writes: > On Tue, Dec 26, 2023 at 10:23 PM Tom Lane wrote: >> I think it's a fool's errand to even try to separate different sort >> column orderings by cost. We simply do not have sufficiently accurate >> cost information. The previous patch in this thread got reverted because >> o

Re: POC: GROUP BY optimization

2024-01-26 Thread Robert Haas
On Fri, Jan 26, 2024 at 10:38 AM Tom Lane wrote: > Sadly, that's not a small task: > > * We'd need to put effort into assigning more realistic procost > values --- preferably across the board, not just comparison functions. > As long as all the comparison functions have procost 1.0, you're > just

Re: Add new error_action COPY ON_ERROR "log"

2024-01-26 Thread David G. Johnston
On Thu, Jan 25, 2024 at 9:42 AM torikoshia wrote: > Hi, > > As described in 9e2d870119, COPY ON_EEOR is expected to have more > "error_action". > (Note that option name was changed by b725b7eec) > > I'd like to have a new option "log", which skips soft errors and logs > information that should ha

Re: MERGE ... WHEN NOT MATCHED BY SOURCE

2024-01-26 Thread Dean Rasheed
On Mon, 22 Jan 2024 at 02:10, Peter Smith wrote: > > Hi, this patch was marked in CF as "Needs Review" [1], but there has > been no activity on this thread for 6+ months. > > Is anything else planned? Can you post something to elicit more > interest in the latest patch? Otherwise, if nothing happe

Re: MERGE ... WHEN NOT MATCHED BY SOURCE

2024-01-26 Thread Dean Rasheed
n Fri, 26 Jan 2024 at 14:59, vignesh C wrote: > > CFBot shows that the patch does not apply anymore as in [1]: > Rebased version attached. Regards, Dean diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml new file mode 100644 index f8f83d4..6ef0c2b --- a/doc/src/sgml/mvcc.sgml +++ b/doc

Re: MERGE ... WHEN NOT MATCHED BY SOURCE

2024-01-26 Thread Alvaro Herrera
On 2024-Jan-26, Dean Rasheed wrote: > I think it has had a decent amount of review and all the review > comments have been addressed. I'm not quite sure from Alvaro's last > comment whether he was implying that he thought it was ready for > commit. Well, firstly this is clearly a feature we want

Re: cleanup patches for incremental backup

2024-01-26 Thread Robert Haas
On Thu, Jan 25, 2024 at 11:08 AM Nathan Bossart wrote: > On Thu, Jan 25, 2024 at 10:06:41AM -0500, Robert Haas wrote: > > On Wed, Jan 24, 2024 at 2:39 PM Nathan Bossart > > wrote: > >> That seems like a reasonable starting point. Even if it doesn't help > >> determine the root cause, it should

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-01-26 Thread Alvaro Herrera
On 2024-Jan-26, Alvaro Herrera wrote: > On 2024-Jan-26, vignesh C wrote: > > > Please post an updated version for the same. > > Here's a rebase. I only fixed the conflicts, didn't review. Hmm, but I got the attached regression.diffs with it. I didn't investigate further, but it looks like the

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-26 Thread Robert Haas
On Thu, Jan 25, 2024 at 12:25 PM Robert Haas wrote: > I think you're probably correct. I just didn't realize what was meant. I tweaked your v12 based on this discussion and committed the result. Thanks to you for the patches, and to Peter for participating in the discussion which, IMHO, was very

Re: pg_upgrade failing for 200+ million Large Objects

2024-01-26 Thread Tom Lane
vignesh C writes: > CFBot shows that the patch does not apply anymore as in [1]: > === Applying patches on top of PostgreSQL commit ID > 46a0cd4cefb4d9b462d8cc4df5e7ecdd190bea92 === > === applying patch ./v9-005-parallel_pg_restore.patch > patching file src/bin/pg_upgrade/pg_upgrade.c > Hunk #3 FA

Re: Supporting MERGE on updatable views

2024-01-26 Thread Alvaro Herrera
Thanks for working on this. The patch looks well finished. I didn't try to run it, though. I gave it a read and found nothing to complain about, just these two pretty minor comments: On 2024-Jan-26, Dean Rasheed wrote: > diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execM

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-01-26 Thread Jelte Fennema-Nio
On Fri, 26 Jan 2024 at 13:11, Alvaro Herrera wrote: > I wonder, would it make sense to put all these new functions in a > separate file fe-cancel.c? Okay I tried doing that. I think the end result is indeed quite nice, having all the cancellation related functions together in a file. But it did

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-26 Thread Melanie Plageman
On Fri, Jan 26, 2024 at 11:44 AM Robert Haas wrote: > > On Thu, Jan 25, 2024 at 12:25 PM Robert Haas wrote: > > I think you're probably correct. I just didn't realize what was meant. > > I tweaked your v12 based on this discussion and committed the result. > > Thanks to you for the patches, and t

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-01-26 Thread Alvaro Herrera
On 2024-Jan-26, Jelte Fennema-Nio wrote: > Okay I tried doing that. I think the end result is indeed quite nice, > having all the cancellation related functions together in a file. But > it did require making a bunch of static functions in fe-connect > extern, and adding them to libpq-int.h. On on

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-26 Thread Alvaro Herrera
I've continued to review this and decided that I don't like the mess this patch proposes in order to support pg_commit_ts's deletion of all files. (Yes, I know that I was the one that proposed this idea. It's still a bad one). I'd like to change that code by removing the limit that we can only ha

Re: cleanup patches for incremental backup

2024-01-26 Thread Nathan Bossart
On Fri, Jan 26, 2024 at 11:04:37AM -0500, Robert Haas wrote: > Here is v2 with that addition. Looks reasonable. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-26 Thread Peter Geoghegan
On Fri, Jan 26, 2024 at 11:44 AM Robert Haas wrote: > Thanks to you for the patches, and to Peter for participating in the > discussion which, IMHO, was very helpful in clarifying things. Glad I could help. -- Peter Geoghegan

Re: Hide exposed impl detail of wchar.c

2024-01-26 Thread Nathan Bossart
On Thu, Jan 04, 2024 at 04:43:29PM -0600, Nathan Bossart wrote: > On Mon, Nov 20, 2023 at 10:39:43PM -0600, Nathan Bossart wrote: >> Alright. The next minor release isn't until February, so I'll let this one >> sit a little while longer in case anyone objects to back-patching something >> like thi

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-26 Thread Andrey Borodin
> On 26 Jan 2024, at 22:38, Alvaro Herrera wrote: > > This is OK because in the > default compilation each file only has 32 segments, so that requires > only 32 lwlocks held at once while the file is being deleted. Do we account somehow that different subsystems do not accumulate MAX_SIMUL_L

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-01-26 Thread Bernd Helmle
Am Freitag, dem 26.01.2024 um 18:31 +0530 schrieb vignesh C: > CFBot shows that the patch does not apply anymore as in [1]: > === Applying patches on top of PostgreSQL commit ID I've started working on it and planning to submit a polished patch for the upcoming CF.

Re: Hide exposed impl detail of wchar.c

2024-01-26 Thread Tom Lane
Nathan Bossart writes: > I see that I was planning on back-patching this to v16, but since > is_valid_ascii() was introduced in v15, I'm wondering if it'd be better to > back-patch it there so that is_valid_ascii() lives in the same file for all > versions where it exists. Thoughts? Yeah, if we'

Re: Printing backtrace of postgres processes

2024-01-26 Thread Bharath Rupireddy
On Fri, Jan 26, 2024 at 4:11 PM Alvaro Herrera wrote: > Thanks for reviewing. > > +You can get the file name and line number from the logged details by > > using > > +gdb/addr2line in linux platforms (users must ensure gdb/addr2line is > > +already installed). > > This doesn't read

Re: cleanup patches for incremental backup

2024-01-26 Thread Robert Haas
On Fri, Jan 26, 2024 at 12:39 PM Nathan Bossart wrote: > On Fri, Jan 26, 2024 at 11:04:37AM -0500, Robert Haas wrote: > > Here is v2 with that addition. > > Looks reasonable. Thanks for the report & review. I have committed that version. -- Robert Haas EDB: http://www.enterprisedb.com

psql: add \create_function command

2024-01-26 Thread Steve Chavez
Hello hackers, Currently a function definition must include its body inline. Because of this, when storing function definitions in files, linters and syntax highlighters for non-SQL languages (python, perl, tcl, etc) won't work. An example can be seen on: https://github.com/postgres/postgres/blob

Re: psql: add \create_function command

2024-01-26 Thread Pavel Stehule
Hi pá 26. 1. 2024 v 19:41 odesílatel Steve Chavez napsal: > Hello hackers, > > Currently a function definition must include its body inline. Because of > this, when storing function definitions in files, linters and syntax > highlighters for non-SQL languages (python, perl, tcl, etc) won't work.

Re: Patch: Improve Boolean Predicate JSON Path Docs

2024-01-26 Thread David E. Wheeler
On Jan 25, 2024, at 11:03, Tom Lane wrote: > I changed the preceding para to say "... check expressions are > required in ...", which I thought was sufficient to cover that. > Also, the tabular description of the operator tells you not to do it. Yeah, that’s good. I was perhaps leaning into bein

Re: psql: add \create_function command

2024-01-26 Thread Tom Lane
Pavel Stehule writes: > pá 26. 1. 2024 v 19:41 odesílatel Steve Chavez napsal: >> To solve the above issue, this patch adds a psql command to create a >> function and obtain its body from another file. It is used as: >> \create_function from ./data/max.py max(int,int) returns int LANGUAGE >> plpy

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

2024-01-26 Thread Jeff Davis
On Fri, 2024-01-26 at 19:31 +0530, Bharath Rupireddy wrote: > Are you suggesting to error out instead of returning 0? We'd do neither of those things, because no caller should actually call it while RecoveryInProgress() or on a different timeline. > How about > returning a negative value instead

Re: psql: add \create_function command

2024-01-26 Thread walther
Tom Lane: Or we could cut out the intermediate variable altogether by inventing something that works like :'...' but reads from a file not a variable. That might be too specialized though, and I'm not sure about good syntax for it either. Maybe like CREATE FUNCTION foo() RETURNS whatever AS :{s

Re: psql: add \create_function command

2024-01-26 Thread walther
Pavel Stehule: looks a little bit obscure - why do you need to do it from psql? And how frequently do you do it? I store all my SQL code in git and use "psql -e" to "bundle" it into an extension, which is then deployed to production. The code is spread over many files, which include other fi

Re: make dist using git archive

2024-01-26 Thread Tristan Partin
On Fri Jan 26, 2024 at 12:28 AM CST, Peter Eisentraut wrote: On 25.01.24 17:25, Tristan Partin wrote: > For what it's worth, I run Meson 1.3, and the behavior of generating the > tarballs even though it is a dirty tree still occurred. In the new patch > you seem to say it was fixed in 0.60. T

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-01-26 Thread Bharath Rupireddy
On Thu, Jan 11, 2024 at 10:48 AM Bharath Rupireddy wrote: > > Hi, > > Replication slots in postgres will prevent removal of required > resources when there is no connection using them (inactive). This > consumes storage because neither required WAL nor required rows from > the user tables/system c

Re: psql: add \create_function command

2024-01-26 Thread David G. Johnston
On Fri, Jan 26, 2024 at 12:23 PM Tom Lane wrote: > > \set fbody `cat source_file.txt` > CREATE FUNCTION foo() RETURNS whatever AS :'fbody' LANGUAGE ...; > > and maybe we should say that that's sufficient. I really don't have a problem, and kinda prefer, using psql variables this way but feel mu

Re: psql: add \create_function command

2024-01-26 Thread Pavel Stehule
pá 26. 1. 2024 v 20:45 odesílatel napsal: > Pavel Stehule: > > looks a little bit obscure - why do you need to do it from psql? And how > > frequently do you do it? > > I store all my SQL code in git and use "psql -e" to "bundle" it into an > extension, which is then deployed to production. > th

Re: psql: add \create_function command

2024-01-26 Thread Tom Lane
walt...@technowledgy.de writes: > Pavel Stehule: >> looks a little bit obscure - why do you need to do it from psql? And how >> frequently do you do it? > I store all my SQL code in git and use "psql -e" to "bundle" it into an > extension, which is then deployed to production. > The code is spr

Re: Add minimal C example and SQL registration example for custom table access methods.

2024-01-26 Thread Tristen Raab
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:tested, passed Hello, I've reviewed your patch and it applies correctly and the doc

Re: Add minimal C example and SQL registration example for custom table access methods.

2024-01-26 Thread Fabrízio de Royes Mello
On Wed, Nov 15, 2023 at 8:29 PM Roberto Mello wrote: > > Suggestion: > > In the C example you added you mention in the comment: > > + /* Methods from TableAmRoutine omitted from example, but all > + non-optional ones must be provided here. */ > > Perhaps you could provide a "see " to point th

Re: psql: add \create_function command

2024-01-26 Thread Tom Lane
Pavel Stehule writes: > but why you need to do in psql? - you can prepare content outside and > execute just like echo "CREATE FUNCTION " | psql The bit that's probably hard if you're trying to do this in a shell script is "quote this data as a SQL string literal". psql can get that right ev

Re: psql: add \create_function command

2024-01-26 Thread Pavel Stehule
pá 26. 1. 2024 v 21:04 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > but why you need to do in psql? - you can prepare content outside and > > execute just like echo "CREATE FUNCTION " | psql > > The bit that's probably hard if you're trying to do this in a shell > script is "quote

Re: psql: add \create_function command

2024-01-26 Thread Tom Lane
Pavel Stehule writes: > I don't know, maybe I have a problem with the described use case. I cannot > imagine holding the body and head of PL routines in different places and I > don't understand the necessity to join it. It seems a little weird to me too, and I would vote against accepting \creat

Re: psql: add \create_function command

2024-01-26 Thread Pavel Stehule
pá 26. 1. 2024 v 21:17 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > I don't know, maybe I have a problem with the described use case. I > cannot > > imagine holding the body and head of PL routines in different places and > I > > don't understand the necessity to join it. > > It seems

Re: psql: add \create_function command

2024-01-26 Thread Adam S
idea: what about custom functions for (each) IDE, which calls psql -c "CREATE FUNCTION ..." when the user saves the file? (it would easy to prototype for emacs...) (obviously, this isn't a core feature...) On Fri, Jan 26, 2024 at 3:19 PM Pavel Stehule wrote: > > > pá 26. 1. 2024 v 21:17 odesíl

Re: proposal: psql: show current user in prompt

2024-01-26 Thread Pavel Stehule
pá 26. 1. 2024 v 11:40 odesílatel Jelte Fennema-Nio napsal: > On Thu, 25 Jan 2024 at 21:43, Pavel Stehule > wrote: > > 2. using GUC for all reported GUC looks not too readable. Maybe it > should be used just for customized reporting, not for default > > I thought about this too, because indeed t

Re: A performance issue with Memoize

2024-01-26 Thread Tom Lane
David Rowley writes: > I've adjusted the comments to what you mentioned and also leaned out > the pretty expensive test case to something that'll run much faster > and pushed the result. drongo and fairywren are consistently failing the test case added by this commit. I'm not quite sure why the

  1   2   >