Small fix on COPY ON_ERROR document

2024-01-25 Thread Yugo NAGATA
Hi, I found that the documentation of COPY ON_ERROR said COPY stops operation at the first error when "ON_ERROR is not specified.", but it also stop when ON_ERROR is specified to the default value, "stop". I attached a very small patch to fix this just for making the description more accurate.

Re: Evaluate arguments of correlated SubPlans in the referencing ExprState

2024-01-25 Thread vignesh C
On Tue, 24 Oct 2023 at 01:47, Alena Rybakina wrote: > > Hi! > > I looked through your patch and noticed that it was not applied to the > current version of the master. I rebased it and attached a version. I didn't > see any problems and, honestly, no big changes were needed, all regression > te

Re: Improve tab completion for ALTER DEFAULT PRIVILEGE and ALTER TABLE

2024-01-25 Thread vignesh C
On Mon, 27 Nov 2023 at 21:58, vignesh C wrote: > > On Fri, 24 Nov 2023 at 18:37, Shubham Khanna > wrote: > > > > n Fri, Nov 24, 2023 at 6:33 PM vignesh C wrote: > > > > > > Hi, > > > > > > Improved tab completion for "ALTER DEFAULT PRIVILEGE" and "ALTER TABLE": > > > 1) GRANT, REVOKE and FOR USE

Re: gai_strerror() is not thread-safe on Windows

2024-01-25 Thread vignesh C
On Tue, 5 Dec 2023 at 00:57, Thomas Munro wrote: > > On second thoughts, I guess it would make more sense to use the exact > messages Windows' own implementation would return instead of whatever > we had in the past (probably cribbed from some other OS or just made > up?). I asked CI to spit thos

Re: A performance issue with Memoize

2024-01-25 Thread Richard Guo
On Fri, Jan 26, 2024 at 2:32 AM Tom Lane wrote: > I'm fairly sure I thought it wouldn't matter because of the Param > de-duplication done in paramassign.c. However, Richard's example > shows that's not so, because process_subquery_nestloop_params is > picky about the param ID assigned to a parti

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

2024-01-25 Thread Jeff Davis
On Thu, 2024-01-25 at 14:35 +0530, Bharath Rupireddy wrote: > > "expecting zeros at the end" - this can't always be true as the WAL > ... > I think this needs to be discussed separately. If okay, I'll start a > new thread. Thank you for investigating. When the above issue is handled, I'll be mo

Re: Use of backup_label not noted in log

2024-01-25 Thread Michael Paquier
On Thu, Jan 25, 2024 at 05:44:52PM -0400, David Steele wrote: > On 1/25/24 17:42, Tom Lane wrote: >> We're talking about 1d35f705e, right? That certainly looks harmless >> and potentially useful. I'm +1 for back-patching. > > That's the one. If we were modifying existing messages I would be agai

Re: A performance issue with Memoize

2024-01-25 Thread David Rowley
On Fri, 26 Jan 2024 at 07:32, Tom Lane wrote: > > David Rowley writes: > > I'd feel better about doing it your way if Tom could comment on if > > there was a reason he put the function calls that way around in > > 5ebaaa494. > > I'm fairly sure I thought it wouldn't matter because of the Param >

Re: A performance issue with Memoize

2024-01-25 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. +1, I was wondering if the test could be cheaper. It wasn't horrid as Richard had it, but core regression tes

Re: A performance issue with Memoize

2024-01-25 Thread David Rowley
On Fri, 26 Jan 2024 at 16:51, Tom Lane wrote: > >> However ... it seems like we're not out of the woods yet. Why > >> is Richard's proposed test case still showing > >> + -> Memoize (actual rows=5000 loops=N) > >> + Cache Key: t1.two, t1.two > >> Seems like there is missing

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-25 Thread reid . thompson
On Thu, 2024-01-25 at 16:11 -0500, reid.thomp...@crunchydata.com wrote: > > I walked through v6 and didn't note any issues. > > I do want to ask, the patch alters ReorderBufferReturnTupleBuf() and > drops the unused parameter ReorderBuffer *rb. It seems that > ReorderBufferFreeSnap(), ReorderBuff

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-25 Thread Masahiko Sawada
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! > > > > I do want to ask, the patch alters ReorderBufferReturnTupleBuf() and > > drops the

Re: Small fix on COPY ON_ERROR document

2024-01-25 Thread Masahiko Sawada
On Fri, Jan 26, 2024 at 11:28 AM Yugo NAGATA wrote: > > Hi, > > I found that the documentation of COPY ON_ERROR said > COPY stops operation at the first error when > "ON_ERROR is not specified.", but it also stop when > ON_ERROR is specified to the default value, "stop". > > I attached a very smal

Re: A performance issue with Memoize

2024-01-25 Thread Richard Guo
On Fri, Jan 26, 2024 at 1:22 AM Tom Lane wrote: > Apologies for not having noticed this thread before. I'm taking > a look at it now. However, while sniffing around this I found > what seems like an oversight in paramassign.c's > assign_param_for_var(): it says it should compare all the same >

Re: Small fix on COPY ON_ERROR document

2024-01-25 Thread Yugo NAGATA
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 that the documentation of COPY ON_ERROR said > > COPY stops operation at the first error when > > "ON_ERROR is not specified.", but it also stop when > > ON

RE: speed up a logical replica setup

2024-01-25 Thread Hayato Kuroda (Fujitsu)
Dear Euler, Thanks for updating the patch! Before reading yours, I wanted to reply some of comments. > I'm still thinking about replacing --subscriber-conninfo with separate items (username, port, password?, host = socket dir). Maybe it is an overengineering. The user can always prepare the envi

Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-25 Thread Alexander Lakhin
Hello hackers, After determining a possible cause for intermittent failures of the test subscription/031_column_list [1], I was wondering what makes another subscription test (014_binary) fail on the buildfarm: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=snakefly&dt=2024-01-22%2001%3A

Re: A performance issue with Memoize

2024-01-25 Thread Richard Guo
On Fri, Jan 26, 2024 at 12:18 PM David Rowley wrote: > On Fri, 26 Jan 2024 at 16:51, Tom Lane wrote: > > >> However ... it seems like we're not out of the woods yet. Why > > >> is Richard's proposed test case still showing > > >> + -> Memoize (actual rows=5000 loops=N) > > >> +

Re: Small fix on COPY ON_ERROR document

2024-01-25 Thread Masahiko Sawada
On Fri, Jan 26, 2024 at 2: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 that the documentation of COPY ON_ERROR said > > > COPY stops operation at the first er

Re: make dist using git archive

2024-01-25 Thread Peter Eisentraut
On 25.01.24 17:25, Tristan Partin wrote: The way that this currently works is that you will fail at configure time if bz2 doesn't exist on the system. Meson will try to resolve a .path() method on a NotFoundProgram. You might want to define the bz2 target to just call `exit 1` in this case. i

Re: Small fix on COPY ON_ERROR document

2024-01-25 Thread David G. Johnston
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 that the documentation of COPY ON_ERROR said > > > COPY stops operation at the first

Re: Popcount optimization using AVX512

2024-01-25 Thread Alvaro Herrera
On 2024-Jan-25, Alvaro Herrera wrote: > Finally, the matter of using ifunc as proposed by Noah seems to be still > in the air, with no patches offered for the popcount family. Oh, I just realized that the patch as currently proposed is placing the optimized popcount code in the path that does not

Re: Transaction timeout

2024-01-25 Thread Andrey M. Borodin
> 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 necessary. Thanks Peter! I’ve inspected CI fails and they were ca

Re: Transaction timeout

2024-01-25 Thread Andrey M. Borodin
> On 26 Jan 2024, at 11:44, Andrey M. Borodin wrote: > > > 1. It’s unsafe for isaoltion tester to await transaction_timeout within a > query. Usually it gets > FATAL: terminating connection due to transaction timeout > But if VM is a bit slow it can get occasional > PQconsumeInput failed: ser

Re: Small fix on COPY ON_ERROR document

2024-01-25 Thread Yugo NAGATA
On Fri, 26 Jan 2024 15:26:55 +0900 Masahiko Sawada wrote: > On Fri, Jan 26, 2024 at 2: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 that th

Delay Memoize hashtable build until executor run

2024-01-25 Thread David Rowley
Currently, nodeMemoize.c builds the hashtable for the cache during executor startup. This is not what is done in hash joins. I think we should make the two behave the same way. Per [1] and the corresponding discussion leading to that, making a possibly large allocation at executor startup can lea

Re: Small fix on COPY ON_ERROR document

2024-01-25 Thread David G. Johnston
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 incompatibility and a value other than stop is > specified > to the ON_ERROR option

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-25 Thread Masahiko Sawada
On Thu, Jan 25, 2024 at 10:17 PM Aleksander Alekseev wrote: > > Hi, > > > > Here is the corrected patch. > > > > Thank you for updating the patch! I have some comments: > > Thanks for the review. > > > -tuple = (ReorderBufferTupleBuf *) > > +tuple = (HeapTuple) > >

Apply the "LIMIT 1" optimization to partial DISTINCT

2024-01-25 Thread Richard Guo
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 DISTINCT, which I think should be. This can improve plans in som

Re: A performance issue with Memoize

2024-01-25 Thread David Rowley
On Fri, 26 Jan 2024 at 19:03, Richard Guo wrote: > At first I wondered if we should assume that the same param expr must > have the same equality operator. If not, we should also check the > operator to tell if the cache key is a duplicate, like > > - if (!list_member(*param_exprs, expr)

RE: speed up a logical replica setup

2024-01-25 Thread Hayato Kuroda (Fujitsu)
Dear Euler, Again, thanks for updating the patch! There are my random comments for v9. 01. I cannot find your replies for my comments#7 [1] but you reverted related changes. I'm not sure you are still considering it or you decided not to include changes. Can you clarify your opinion? (It is need

<    1   2