Re: pg_stat_statements and "IN" conditions

2024-05-12 Thread Dmitry Dolgov
> On Tue, Apr 23, 2024 at 10:18:15AM +0200, Dmitry Dolgov wrote: > > On Mon, Apr 15, 2024 at 06:09:29PM +0900, Sutou Kouhei wrote: > > > > Thanks. I'm not familiar with this code base but I've > > reviewed these patches because I'm interested in this > > featu

Re: Use generation memory context for tuplestore.c

2024-05-10 Thread Dmitry Dolgov
> On Sat, May 04, 2024 at 01:55:22AM +1200, David Rowley wrote: > (40af10b57 did this for tuplesort.c, this is the same, but for tuplestore.c) An interesting idea, thanks. I was able to reproduce the results of your benchmark and get similar conclusions from the results. > Using generation has

Re: partitioning and identity column

2024-05-06 Thread Dmitry Dolgov
> On Mon, May 06, 2024 at 06:52:41PM +0530, Ashutosh Bapat wrote: > On Sun, May 5, 2024 at 1:43 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > I had a quick look, it covers the issues mentioned above in the thread. > > Few nitpicks/questions: > > > >

Re: partitioning and identity column

2024-05-04 Thread Dmitry Dolgov
> On Tue, Apr 30, 2024 at 04:29:11PM +0530, Ashutosh Bapat wrote: > On Sun, Apr 28, 2024 at 12:29 PM Alexander Lakhin > wrote: > > > 27.04.2024 18:00, Alexander Lakhin wrote: > > > > > > Please look also at another script, which produces the same error: > > > > I've discovered yet another

Re: Build with meson + clang + sanitizer resulted in undefined reference

2024-04-30 Thread Dmitry Dolgov
> On Thu, Apr 25, 2024 at 06:38:58PM +0300, Maxim Orlov wrote: > > And then upon build I've got overwhelmed by thousands of undefined > reference errors. > > fe-auth-scram.c:(.text+0x17a): undefined reference to > `__ubsan_handle_builtin_unreachable' > /usr/bin/ld: fe-auth-scram.c:(.text+0x189):

Re: pg_stat_statements and "IN" conditions

2024-04-23 Thread Dmitry Dolgov
> On Mon, Apr 15, 2024 at 06:09:29PM +0900, Sutou Kouhei wrote: > > Thanks. I'm not familiar with this code base but I've > reviewed these patches because I'm interested in this > feature too. Thanks for the review! The commentaries for the first patch make sense to me, will apply. > 0003: > > >

Identify huge pages accessibility using madvise

2024-04-13 Thread Dmitry Dolgov
Hi, I would like to propose a small patch to address an annoying issue with the way how PostgreSQL does fallback in case if "huge_pages = try" is set. Here is how the problem looks like: * PostgreSQL is starting on a machine with some huge pages available * It tries to identify that fact and

Re: broken JIT support on Fedora 40

2024-04-10 Thread Dmitry Dolgov
> On Wed, Apr 10, 2024 at 12:43:23PM +1200, Thomas Munro wrote: > On Tue, Apr 9, 2024 at 10:05 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > + /* In assertion builds, run the LLVM verify pass. */ > > +#i

Re: broken JIT support on Fedora 40

2024-04-09 Thread Dmitry Dolgov
> On Tue, Apr 09, 2024 at 07:07:58PM +1200, Thomas Munro wrote: > On Sat, Apr 6, 2024 at 5:01 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > > Yep, I think this is it. I've spent some hours trying to understand why > > > > suddenly deform func

Re: broken JIT support on Fedora 40

2024-04-05 Thread Dmitry Dolgov
> On Fri, Apr 05, 2024 at 03:50:50PM +0200, Dmitry Dolgov wrote: > > On Fri, Apr 05, 2024 at 03:21:06PM +0200, Dmitry Dolgov wrote: > > > On Sat, Apr 06, 2024 at 02:00:38AM +1300, Thomas Munro wrote: > > > On Sun, Mar 31, 2024 at 12:49 PM Thomas Munro > > > wr

Re: broken JIT support on Fedora 40

2024-04-05 Thread Dmitry Dolgov
> On Fri, Apr 05, 2024 at 03:21:06PM +0200, Dmitry Dolgov wrote: > > On Sat, Apr 06, 2024 at 02:00:38AM +1300, Thomas Munro wrote: > > On Sun, Mar 31, 2024 at 12:49 PM Thomas Munro > > wrote: > > > https://github.com/llvm/llvm-project/pull/87093 > > > >

Re: broken JIT support on Fedora 40

2024-04-05 Thread Dmitry Dolgov
> On Sat, Apr 06, 2024 at 02:00:38AM +1300, Thomas Munro wrote: > On Sun, Mar 31, 2024 at 12:49 PM Thomas Munro wrote: > > https://github.com/llvm/llvm-project/pull/87093 > > Oh, with those clues, I think I might see... It is a bit strange that > we copy attributes from AttributeTemplate(), a

Re: pg_stat_statements and "IN" conditions

2024-04-04 Thread Dmitry Dolgov
> On Wed, Mar 27, 2024 at 08:56:12AM +0900, Yasuo Honda wrote: > Thanks for the useful info. > > Ruby on Rails uses bigint as a default data type for the primary key > and prepared statements have been enabled by default for PostgreSQL. > I'm looking forward to these current patches being merged

Re: broken JIT support on Fedora 40

2024-03-30 Thread Dmitry Dolgov
> On Sat, Mar 30, 2024 at 04:38:11PM +1300, Thomas Munro wrote: > On Fri, Mar 22, 2024 at 7:15 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > For verification, I've modified the deform.outblock to call LLVMBuildRet > > > instead of LLVMBuildRetVoid an

Re: pg_stat_statements and "IN" conditions

2024-03-26 Thread Dmitry Dolgov
> On Tue, Mar 26, 2024 at 04:21:46PM +0900, Yasuo Honda wrote: > Yes. The script uses prepared statements because Ruby on Rails enables > prepared statements by default for PostgreSQL databases. > > Then I tested this branch > https://github.com/yahonda/postgres/tree/pg_stat_statements without >

Re: pg_stat_statements and "IN" conditions

2024-03-25 Thread Dmitry Dolgov
> On Sun, Mar 24, 2024 at 11:36:38PM +0900, Yasuo Honda wrote: > Thanks for the information. I can apply these 4 patches from > 0eb23285a2 . I tested this branch from Ruby on Rails and it gets some > unexpected behavior from my point of view. > Setting

Re: pg_stat_statements and "IN" conditions

2024-03-23 Thread Dmitry Dolgov
> On Sat, Mar 23, 2024 at 04:13:44PM +0900, Yasuo Honda wrote: > Hi, I'm interested in this feature. It looks like these patches have > some conflicts. > > http://cfbot.cputube.org/patch_47_2837.log > > Would you rebase these patches? Sure, I can rebase, give me a moment. If you don't want to

Re: broken JIT support on Fedora 40

2024-03-21 Thread Dmitry Dolgov
> On Sun, Mar 17, 2024 at 09:02:08PM +0100, Dmitry Dolgov wrote: > > On Fri, Mar 15, 2024 at 01:54:38PM +1300, Thomas Munro wrote: > > For me it seems that the LLVMRunPasses() call, new in > > > > commit 76200e5ee469e4a9db5f9514b9d0c6a31b496bff > > Author: Thomas

Re: broken JIT support on Fedora 40

2024-03-17 Thread Dmitry Dolgov
> On Fri, Mar 15, 2024 at 01:54:38PM +1300, Thomas Munro wrote: > For me it seems that the LLVMRunPasses() call, new in > > commit 76200e5ee469e4a9db5f9514b9d0c6a31b496bff > Author: Thomas Munro > Date: Wed Oct 18 22:15:54 2023 +1300 > > jit: Changes for LLVM 17. > > is reaching code that

Re: Schema variables - new implementation for Postgres 15

2024-01-30 Thread Dmitry Dolgov
Yep, in this constellation the implementation holds much better (in terms of memory) in my create/let/drop testing. I've marked the CF item as ready for committer, but a note for anyone who would like to pick up it from here -- we're talking about first 5 patches here, up to the memory cleaning

Re: Schema variables - new implementation for Postgres 15

2024-01-29 Thread Dmitry Dolgov
> On Mon, Jan 29, 2024 at 08:57:42AM +0100, Pavel Stehule wrote: > Hi > > ne 28. 1. 2024 v 19:00 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > Thanks for the update, smaller patches looks promising. > > > > Off the list Pavel has me

Re: Schema variables - new implementation for Postgres 15

2024-01-28 Thread Dmitry Dolgov
> On Sun, Jan 28, 2024 at 08:34:40PM +0100, Pavel Stehule wrote: > > * I've noticed an interesting result when a LET statement is used to > > assign a > > value without a subquery: > > > > create variable test as text; > > -- returns NULL > > select test; > > > >

Re: Schema variables - new implementation for Postgres 15

2024-01-28 Thread Dmitry Dolgov
Thanks for the update, smaller patches looks promising. Off the list Pavel has mentioned that the first two patches contain a bare minimum for session variables, so I've reviewed them once more and suggest to concentrate on them first. I'm afraid the memory cleanup patch has to be added to the

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 resu

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 >

Re: pg_stat_statements and "IN" conditions

2024-01-22 Thread Dmitry Dolgov
> On Mon, Jan 22, 2024 at 05:33:26PM +1100, Peter Smith wrote: > 2024-01 Commitfest. > > Hi, This patch has a CF status of "Needs Review" [1], but it seems > there was a CFbot test failure last time it was run [2]. Please have a > look and post an updated version if necessary. > > == > [1]

Re: pg_stat_statements and "IN" conditions

2024-01-13 Thread Dmitry Dolgov
> On Mon, Jan 08, 2024 at 05:10:20PM +0100, Dmitry Dolgov wrote: > > On Sat, Jan 06, 2024 at 09:04:54PM +0530, vignesh C wrote: > > > > CFBot shows documentation build has failed at [1] with: > > [07:44:55.531] time make -s -j${BUILD_JOBS} -C doc > > [07:44:57.987

Re: pg_stat_statements and "IN" conditions

2024-01-08 Thread Dmitry Dolgov
> On Sat, Jan 06, 2024 at 09:04:54PM +0530, vignesh C wrote: > > CFBot shows documentation build has failed at [1] with: > [07:44:55.531] time make -s -j${BUILD_JOBS} -C doc > [07:44:57.987] postgres.sgml:572: element xref: validity error : IDREF > attribute linkend references an unknown ID >

Re: [RFC] Clang plugin for catching suspicious typedef casting

2023-12-06 Thread Dmitry Dolgov
> On Sun, Dec 03, 2023 at 07:02:55PM -0800, Peter Geoghegan wrote: > On Sun, Dec 3, 2023 at 6:31 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > Only advantage I see to using libclang is that you can run programs built > > > with libclang regardless of what y

Re: [RFC] Clang plugin for catching suspicious typedef casting

2023-12-03 Thread Dmitry Dolgov
> On Fri, Dec 01, 2023 at 04:01:05PM -0600, Tristan Partin wrote: > On Fri Aug 4, 2023 at 5:47 AM CDT, Dmitry Dolgov wrote: > > > On Thu, Aug 03, 2023 at 12:23:52PM -0500, Tristan Partin wrote: > > > > > > This is the first I am learning about clang plugins. Intere

Re: Schema variables - new implementation for Postgres 15

2023-12-03 Thread Dmitry Dolgov
> On Sun, Dec 03, 2023 at 06:04:12AM +0100, Pavel Stehule wrote: > > Thank you for your review. Next two weeks I'll not too much time to work > on this patch - I have to work on some commercial work, and the week is > Prague PgConf, so my reply will be slow. But after these events I'll >

Re: Schema variables - new implementation for Postgres 15

2023-11-26 Thread Dmitry Dolgov
> On Sat, Nov 18, 2023 at 06:28:53PM +0100, Pavel Stehule wrote: > so 18. 11. 2023 v 15:54 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > As a side note, I'm intended to go one more time through the first few > > patches introducing the basic f

Re: Schema variables - new implementation for Postgres 15

2023-11-18 Thread Dmitry Dolgov
> On Sat, Nov 18, 2023 at 02:19:09PM +0100, Pavel Stehule wrote: > > Would it be a problem to make pg_session_variables inspect the catalog > > or something similar if needed? > > > > It can be very easy to build pg_session_variables based on iteration over > the system catalog. But I am not sure

Re: Schema variables - new implementation for Postgres 15

2023-11-17 Thread Dmitry Dolgov
> On Wed, Aug 23, 2023 at 04:02:44PM +0200, Pavel Stehule wrote: > NameListToString is already buildin function. Do you think NamesFromList? > > This is my oversight - there is just `+extern List *NamesFromList(List > *names); ` line, but sure - it should be in 0002 patch > > fixed now Right,

Re: pg_stat_statements and "IN" conditions

2023-10-31 Thread Dmitry Dolgov
> On Fri, Oct 27, 2023 at 05:02:44PM +0200, Dmitry Dolgov wrote: > > On Thu, Oct 26, 2023 at 09:08:42AM +0900, Michael Paquier wrote: > > typedef struct ArrayExpr > > { > > + pg_node_attr(custom_query_jumble) > > + > > > > Hmm. I am not sure that

Re: pg_stat_statements and "IN" conditions

2023-10-27 Thread Dmitry Dolgov
> On Thu, Oct 26, 2023 at 09:08:42AM +0900, Michael Paquier wrote: > typedef struct ArrayExpr > { > + pg_node_attr(custom_query_jumble) > + > > Hmm. I am not sure that this is the best approach > implementation-wise. Wouldn't it be better to invent a new > pg_node_attr (these can include

Re: pg_stat_statements and "IN" conditions

2023-10-17 Thread Dmitry Dolgov
> On Fri, Oct 13, 2023 at 03:35:19PM +0200, Dmitry Dolgov wrote: > > On Fri, Oct 13, 2023 at 05:07:00PM +0900, Michael Paquier wrote: > > Now, it doesn't mean that this approach with the "powers" will never > > happen, but based on the set of opinions I am gathe

Re: LLVM 16 (opaque pointers)

2023-10-13 Thread Dmitry Dolgov
> On Fri, Oct 13, 2023 at 11:06:21AM +0200, Dmitry Dolgov wrote: > > On Thu, Oct 12, 2023 at 04:31:20PM -0700, Andres Freund wrote: > > I don't think the "function(no-op-function),no-op-module" bit does something > > particularly useful? > > Right, looks like l

Re: pg_stat_statements and "IN" conditions

2023-10-13 Thread Dmitry Dolgov
> On Fri, Oct 13, 2023 at 05:07:00PM +0900, Michael Paquier wrote: > Now, it doesn't mean that this approach with the "powers" will never > happen, but based on the set of opinions I am gathering on this thread > I would suggest to rework the patch as follows: > - First implement an on/off switch

Re: LLVM 16 (opaque pointers)

2023-10-13 Thread Dmitry Dolgov
> On Thu, Oct 12, 2023 at 04:31:20PM -0700, Andres Freund wrote: > Hi, > > On 2023-10-11 21:59:50 +1300, Thomas Munro wrote: > > +#else > > + LLVMPassBuilderOptionsRef options; > > + LLVMErrorRef err; > > + int compile_optlevel; > > + char *passes; > > + > > +

Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

2023-10-06 Thread Dmitry Dolgov
> On Wed, Sep 20, 2023 at 03:42:43PM +0200, David Geier wrote: > Another, not yet discussed, option I can see work is: > > 4. Allocate a fixed amount of memory for the instrumentation stats based on > MAX_PARALLEL_WORKER_LIMIT: MAX_PARALLEL_WORKER_LIMIT is 1024 and used as the > limit of the

Re: [RFC] Add jit deform_counter

2023-09-08 Thread Dmitry Dolgov
> On Fri, Sep 08, 2023 at 03:34:42PM +0200, Daniel Gustafsson wrote: > > On 5 Sep 2023, at 16:37, Daniel Gustafsson wrote: > > > I've gone over this version of the patch and I think it's ready to go in. > > I'm > > marking this Ready for Committer and will go ahead with it shortly barring > >

Re: [RFC] Add jit deform_counter

2023-08-14 Thread Dmitry Dolgov
> On Wed, Jul 19, 2023 at 05:18:29PM +0200, Dmitry Dolgov wrote: > > On Tue, Jul 18, 2023, 3:32 PM Daniel Gustafsson wrote > >> Here is the patch with the proposed variation. > > > > This version still leaves non-text EXPLAIN formats with timing which > doesn't &g

Re: Schema variables - new implementation for Postgres 15

2023-08-12 Thread Dmitry Dolgov
> On Sat, Aug 12, 2023 at 09:28:19AM +0800, Julien Rouhaud wrote: > On Fri, Aug 11, 2023 at 05:55:26PM +0200, Dmitry Dolgov wrote: > > > > Another confusing example was this one at the end of set_session_variable: > > > > + /* > > +

Re: Schema variables - new implementation for Postgres 15

2023-08-11 Thread Dmitry Dolgov
> On Thu, Aug 03, 2023 at 08:15:13AM +0200, Pavel Stehule wrote: > Hi > > fresh rebase Thanks for continuing efforts. The new patch structure looks better to me (although the boundary between patches 0001 and 0002 is somewhat fuzzy, e.g. the function NameListToString is used already in the first

Re: [RFC] Clang plugin for catching suspicious typedef casting

2023-08-09 Thread Dmitry Dolgov
> On Wed, Aug 09, 2023 at 03:23:32PM +0200, Peter Eisentraut wrote: > On 03.08.23 18:56, Dmitry Dolgov wrote: > > I would like to get your opinion, folks. Does it sound interesting > > enough for the community, is it worth it to pursue the idea? > > I think it's interesti

Re: [RFC] Clang plugin for catching suspicious typedef casting

2023-08-04 Thread Dmitry Dolgov
> On Thu, Aug 03, 2023 at 12:23:52PM -0500, Tristan Partin wrote: > > This is the first I am learning about clang plugins. Interesting concept. > Did you give any thought to using libclang instead of a compiler plugin? I > am kind of doing similar work, but I went with libclang instead of a

[RFC] Clang plugin for catching suspicious typedef casting

2023-08-03 Thread Dmitry Dolgov
Hi, In the commit [1] one side change was to fix mixed up usage of BlockNumber and Buffer variables. This was a one-off manual effort, and indeed it hardly seems possible to get compilation warnings for such code, as long as the underlying types could be converted in a standard conforming way. As

Re: [RFC] Add jit deform_counter

2023-07-19 Thread Dmitry Dolgov
> On Tue, Jul 18, 2023, 3:32 PM Daniel Gustafsson wrote >> Here is the patch with the proposed variation. > > This version still leaves non-text EXPLAIN formats with timing which doesn't > add up. Below are JSON and XML examples: Good point. For the structured formats it should be represented

Re: pg_stat_statements and "IN" conditions

2023-07-04 Thread Dmitry Dolgov
> On Mon, Jul 03, 2023 at 09:46:11PM -0700, Nathan Bossart wrote: Thanks for reviewing. > On Sun, Mar 19, 2023 at 01:27:34PM +0100, Dmitry Dolgov wrote: > > +If this parameter is on, two queries with an array will get the > > same > > +query identifie

Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Dmitry Dolgov
> On Mon, Jun 05, 2023 at 06:43:54PM +0300, Heikki Linnakangas wrote: > On 05/06/2023 11:28, Tristan Partin wrote: > > > # Exposed PIDs > > > > > > We expose backend process PIDs to users in a few places. > > > pg_stat_activity.pid and pg_terminate_backend(), for example. They need > > > to be

Re: LLVM 16 (opaque pointers)

2023-06-04 Thread Dmitry Dolgov
> On Mon, May 22, 2023 at 03:38:44PM +1200, Thomas Munro wrote: > Further changes are already needed for their "main" branch (LLVM > 17-to-be), so this won't quite be enough to shut seawasp up. At a > glance, we will need to change from the "old pass manager" API that > has recently been

Re: xmlserialize bug - extra empty row at the end

2023-04-23 Thread Dmitry Dolgov
> On Sun, Apr 23, 2023 at 02:02:17PM +0200, Jim Jones wrote: > On 23.04.23 07:31, Pavel Stehule wrote: > > Hi > > > > maybe I found a bug in xmlserialize > > > > SELECT xmlserialize(DOCUMENT '42' > > AS varchar INDENT); > > > > (2023-04-23 07:27:53) postgres=# SELECT xmlserialize(DOCUMENT > > '42'

Re: [RFC] Add jit deform_counter

2023-04-15 Thread Dmitry Dolgov
> On Fri, Mar 31, 2023 at 07:39:27PM +0200, Dmitry Dolgov wrote: > > On Wed, Mar 29, 2023 at 01:50:37PM +1300, David Rowley wrote: > > On Sun, 12 Jun 2022 at 21:14, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > I've noticed that JIT performance co

Re: Schema variables - new implementation for Postgres 15

2023-03-31 Thread Dmitry Dolgov
> On Tue, Mar 28, 2023 at 09:34:20PM +0200, Pavel Stehule wrote: > Hi > > > Talking about documentation I've noticed that the implementation > > contains few limitations, that are not mentioned in the docs. Examples > > are WITH queries: > > > > WITH x AS (LET public.svar = 100) SELECT * FROM

Re: [RFC] Add jit deform_counter

2023-03-31 Thread Dmitry Dolgov
> On Wed, Mar 29, 2023 at 01:50:37PM +1300, David Rowley wrote: > On Sun, 12 Jun 2022 at 21:14, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > I've noticed that JIT performance counter generation_counter seems to > > include > > actions, relevant for both jit_expre

Re: Schema variables - new implementation for Postgres 15

2023-03-26 Thread Dmitry Dolgov
> On Sun, Mar 26, 2023 at 07:32:05PM +0800, Julien Rouhaud wrote: > Hi, > > I just have a few minor wording improvements for the various comments / > documentation you quoted. Talking about documentation I've noticed that the implementation contains few limitations, that are not mentioned in the

Re: Schema variables - new implementation for Postgres 15

2023-03-26 Thread Dmitry Dolgov
> On Fri, Mar 24, 2023 at 08:04:08AM +0100, Pavel Stehule wrote: > čt 23. 3. 2023 v 19:54 odesílatel Pavel Stehule > napsal: > > > čt 23. 3. 2023 v 16:33 odesílatel Peter Eisentraut < > > peter.eisentr...@enterprisedb.com> napsal: > > > >> The other issue is that by its nature this patch adds a

Re: pg_stat_statements and "IN" conditions

2023-03-19 Thread Dmitry Dolgov
> On Tue, Mar 14, 2023 at 08:04:32PM +0100, Dmitry Dolgov wrote: > > On Tue, Mar 14, 2023 at 02:14:17PM -0400, Gregory Stark (as CFM) wrote: > > So I was seeing that this patch needs a rebase according to cfbot. > > Yeah, folks are getting up to speed in with pgss improvemen

Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

2023-03-17 Thread Dmitry Dolgov
> On Tue, Feb 21, 2023 at 01:02:35PM +0100, David Geier wrote: > Hi, > > On 1/20/23 09:34, David Geier wrote: > > EXPLAIN ANALYZE for parallel Bitmap Heap Scans currently only reports > > the number of heap blocks processed by the leader. It's missing the > > per-worker stats. The attached patch

Re: pg_stat_statements and "IN" conditions

2023-03-14 Thread Dmitry Dolgov
> On Tue, Mar 14, 2023 at 02:14:17PM -0400, Gregory Stark (as CFM) wrote: > So I was seeing that this patch needs a rebase according to cfbot. Yeah, folks are getting up to speed in with pgss improvements recently. Thanks for letting me know. > However it looks like the review feedback you're

Re: Schema variables - new implementation for Postgres 15

2023-03-08 Thread Dmitry Dolgov
> On Wed, Mar 08, 2023 at 08:31:07AM +0100, Pavel Stehule wrote: > pá 3. 3. 2023 v 21:19 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > > On Tue, Feb 28, 2023 at 06:12:50AM +0100, Pavel Stehule wrote: > > > > > > fresh rebase >

Re: Schema variables - new implementation for Postgres 15

2023-03-03 Thread Dmitry Dolgov
> On Tue, Feb 28, 2023 at 06:12:50AM +0100, Pavel Stehule wrote: > > fresh rebase I'm continuing to review, this time going through shadowing stuff in transformColumnRef, IdentifyVariable etc. Well, that's a lot of leg work for rather little outcome :) I guess all attempts to simplify this part

Re: pg_stat_statements and "IN" conditions

2023-02-26 Thread Dmitry Dolgov
> On Thu, Feb 23, 2023 at 09:48:35AM +0100, David Geier wrote: > Hi, > > > > Seems like supporting only constants is a good starting > > > point. The only thing that is likely confusing for users is that NUMERICs > > > (and potentially constants of other types) are unsupported. Wouldn't it be > >

Re: pg_stat_statements and "IN" conditions

2023-02-17 Thread Dmitry Dolgov
> On Thu, Feb 09, 2023 at 08:43:29PM +0100, Dmitry Dolgov wrote: > > On Thu, Feb 09, 2023 at 06:26:51PM +0100, Alvaro Herrera wrote: > > On 2023-Feb-09, Dmitry Dolgov wrote: > > > > > > On Thu, Feb 09, 2023 at 02:30:34PM +0100, Peter Eisentraut wrote: > &

Re: pg_stat_statements and "IN" conditions

2023-02-17 Thread Dmitry Dolgov
> On Wed, Feb 15, 2023 at 08:51:56AM +0100, David Geier wrote: > Hi, > > On 2/11/23 13:08, Dmitry Dolgov wrote: > > > On Sat, Feb 11, 2023 at 11:47:07AM +0100, Dmitry Dolgov wrote: > > > > > > The original version of the patch was doing all of this, i.

Re: pg_stat_statements and "IN" conditions

2023-02-11 Thread Dmitry Dolgov
> On Sat, Feb 11, 2023 at 11:47:07AM +0100, Dmitry Dolgov wrote: > > The original version of the patch was doing all of this, i.e. handling > numerics, Param nodes, RTE_VALUES. The commentary about > find_const_walker in tests is referring to a part of that, that was > deali

Re: pg_stat_statements and "IN" conditions

2023-02-11 Thread Dmitry Dolgov
> On Sat, Feb 11, 2023 at 11:03:36AM +0100, David Geier wrote: > Hi, > > On 2/9/23 16:02, Dmitry Dolgov wrote: > > > Unfortunately, rebase is needed again due to recent changes in > > > queryjumblefuncs ( 9ba37b2cb6a174b37fc51d0649ef73e56eae27fc ) > I review

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Dmitry Dolgov
> On Thu, Feb 09, 2023 at 06:26:51PM +0100, Alvaro Herrera wrote: > On 2023-Feb-09, Dmitry Dolgov wrote: > > > > On Thu, Feb 09, 2023 at 02:30:34PM +0100, Peter Eisentraut wrote: > > > > What is the point of making this a numeric setting? Either you want > >

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Dmitry Dolgov
> On Thu, Feb 09, 2023 at 02:30:34PM +0100, Peter Eisentraut wrote: > On 07.02.23 21:14, Sergei Kornilov wrote: > > It seems a little strange to me that with const_merge_threshold = 1, such a > > test case gives the same result as with const_merge_threshold = 2 > > What is the point of making

Re: pg_stat_statements and "IN" conditions

2023-02-09 Thread Dmitry Dolgov
> On Tue, Feb 07, 2023 at 11:14:52PM +0300, Sergei Kornilov wrote: > Hello! Thanks for reviewing. > Unfortunately, rebase is needed again due to recent changes in > queryjumblefuncs ( 9ba37b2cb6a174b37fc51d0649ef73e56eae27fc ) Yep, my favourite game, rebaseball. Will post a new version soon,

Re: pg_stat_statements and "IN" conditions

2023-02-05 Thread Dmitry Dolgov
> On Sun, Feb 05, 2023 at 11:02:32AM -0500, Tom Lane wrote: > Dmitry Dolgov <9erthali...@gmail.com> writes: > > I'm thinking about this in the following way: the core jumbling logic is > > responsible for deriving locations based on the input expressions; in > > the c

Re: pg_stat_statements and "IN" conditions

2023-02-05 Thread Dmitry Dolgov
> On Sun, Feb 05, 2023 at 10:30:25AM +0900, Michael Paquier wrote: > On Sat, Feb 04, 2023 at 06:08:41PM +0100, Dmitry Dolgov wrote: > > Here is the rebased version. To adapt to the latest changes, I've marked > > ArrayExpr with custom_query_jumble to implement this functional

Re: pg_stat_statements and "IN" conditions

2023-02-04 Thread Dmitry Dolgov
> On Thu, Feb 02, 2023 at 04:05:54PM +0100, Dmitry Dolgov wrote: > > On Thu, Feb 02, 2023 at 03:07:27PM +0100, Alvaro Herrera wrote: > > This appears to have massive conflicts. Would you please rebase? > > Sure, I was already mentally preparing myself to do so in the vie

Re: pg_stat_statements and "IN" conditions

2023-02-02 Thread Dmitry Dolgov
> On Thu, Feb 02, 2023 at 03:07:27PM +0100, Alvaro Herrera wrote: > This appears to have massive conflicts. Would you please rebase? Sure, I was already mentally preparing myself to do so in the view of recent changes in query jumbling. Will post soon.

Re: pg_stat_statements and "IN" conditions

2023-01-29 Thread Dmitry Dolgov
> On Sun, Jan 29, 2023 at 09:56:02AM -0300, Marcos Pegoraro wrote: > Em dom., 29 de jan. de 2023 às 09:24, Dmitry Dolgov <9erthali...@gmail.com> > escreveu: > > > > On Fri, Jan 27, 2023 at 08:15:29PM +0530, vignesh C wrote: > > > The patch does not apply o

Re: pg_stat_statements and "IN" conditions

2023-01-29 Thread Dmitry Dolgov
> On Fri, Jan 27, 2023 at 08:15:29PM +0530, vignesh C wrote: > The patch does not apply on top of HEAD as in [1], please post a rebased > patch: Thanks. I think this one should do the trick. >From 3c51561ddaecdbc82842fae4fab74cc33526f17c Mon Sep 17 00:00:00 2001 From: Dmitrii Dolgov

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2023-01-27 Thread Dmitry Dolgov
> On Fri, Jan 27, 2023 at 10:02:32AM +0100, David Geier wrote: > It's very curious as to why we didn't really see that when dumping the > bitcode. It seems like the bitcode is always different enough to not spot > that. As I've noted off-list, there was noticeable difference in the dumped

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-24 Thread Dmitry Dolgov
> On Mon, Jan 23, 2023 at 07:09:27PM +0100, Pavel Stehule wrote: > po 23. 1. 2023 v 15:25 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > > On Sun, Jan 22, 2023 at 07:47:07PM +0100, Pavel Stehule wrote: > > > pá 20. 1. 2023 v 21:35 odesílatel

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-23 Thread Dmitry Dolgov
> On Sun, Jan 22, 2023 at 07:47:07PM +0100, Pavel Stehule wrote: > pá 20. 1. 2023 v 21:35 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > * I think it was already mentioned in the thread, there seems to be not a > > single usage of CHECK_FOR_IN

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-20 Thread Dmitry Dolgov
I've accumulated another collection of various questions and comments. As a side note I'm getting a good feeling about this patch, those part I've read so far looks good to me. * I've suddenly realized one could use pseudo types for variables, and it not always works. E.g.: =# create

Re: [RFC] Add jit deform_counter

2023-01-15 Thread Dmitry Dolgov
> On Sun, Jan 08, 2023 at 09:06:33PM +0100, Pavel Stehule wrote: > It is working although I am not sure if it is correctly > > when I run EXPLAIN ANALYZE for query `explain analyze select > count(length(prosrc) > 0) from pg_proc;` > > I got plan and times > >

Re: [RFC] Add jit deform_counter

2023-01-08 Thread Dmitry Dolgov
> On Sat, Jan 07, 2023 at 07:09:11PM +0100, Pavel Stehule wrote: > so 7. 1. 2023 v 16:48 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > > On Fri, Jan 06, 2023 at 09:42:09AM +0100, Pavel Stehule wrote: > > > The explain part is working, th

Re: [RFC] Add jit deform_counter

2023-01-07 Thread Dmitry Dolgov
> On Fri, Jan 06, 2023 at 09:42:09AM +0100, Pavel Stehule wrote: > The explain part is working, the part of pg_stat_statements doesn't > > set jit_above_cost to 10; > set jit_optimize_above_cost to 10; > set jit_inline_above_cost to 10; > > (2023-01-06 09:08:59) postgres=# explain analyze select >

Re: [RFC] Add jit deform_counter

2023-01-02 Thread Dmitry Dolgov
> On Sun, Dec 25, 2022 at 06:55:02PM +0100, Pavel Stehule wrote: > there are some problems with stability of regress tests > > http://cfbot.cputube.org/dmitry-dolgov.html Looks like this small change predates moving to meson, the attached version should help. >From

Re: Schema variables - new implementation for Postgres 15 (typo)

2022-12-22 Thread Dmitry Dolgov
> On Thu, Dec 22, 2022 at 08:45:57PM +0100, Pavel Stehule wrote: > > From the first look it seems some major topics the discussion is evolving > > are about: > > > > * Validity of the use case. Seems to be quite convincingly addressed in > > [1] and > > [2]. > > > > * Complicated logic around

Re: Schema variables - new implementation for Postgres 15 (typo)

2022-12-22 Thread Dmitry Dolgov
Hi, I'm continuing review the patch slowly, and have one more issue plus one philosophical question. The issue have something to do with variables invalidation. Enabling debug_discard_caches = 1 (about which I've learned from this thread) and running this subset of the test suite:

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2022-12-01 Thread Dmitry Dolgov
> On Thu, Jul 14, 2022 at 02:45:29PM +0200, David Geier wrote: > On Mon, Jul 4, 2022 at 10:32 PM Andres Freund wrote: > > On 2022-06-27 16:55:55 +0200, David Geier wrote: > > > Indeed, the total JIT time increases the more modules are used. The > > reason > > > for this to happen is that the

Re: Schema variables - new implementation for Postgres 15

2022-11-04 Thread Dmitry Dolgov
> On Fri, Nov 04, 2022 at 03:17:18PM +0100, Pavel Stehule wrote: > > I've stumbled upon something that looks weird to me (inspired by the > > example from tests): > > > > =# create variable v2 as int; > > =# let v2 = 3; > > =# create view vv2 as select coalesce(v2, 0) + 1000 as result

Re: Schema variables - new implementation for Postgres 15

2022-11-04 Thread Dmitry Dolgov
> On Fri, Nov 04, 2022 at 05:58:06AM +0100, Pavel Stehule wrote: > Hi > > fix clang warning I've stumbled upon something that looks weird to me (inspired by the example from tests): =# create variable v2 as int; =# let v2 = 3; =# create view vv2 as select coalesce(v2, 0) + 1000 as

Re: Schema variables - new implementation for Postgres 15

2022-10-30 Thread Dmitry Dolgov
> On Thu, Oct 13, 2022 at 07:41:32AM +0200, Pavel Stehule wrote: > rebased with simplified code related to usage of pfree function Thanks for the patch, great work! I've got a couple of questions, although I haven't fully finished reviewing yet (so more to come): * I'm curious about ALTER

Re: pg_stat_statements and "IN" conditions

2022-09-24 Thread Dmitry Dolgov
> On Sat, Sep 24, 2022 at 04:07:14PM +0200, Dmitry Dolgov wrote: > > On Fri, Sep 16, 2022 at 09:25:13PM +0300, Sergei Kornilov wrote: > > Hello! > > > > Unfortunately the patch needs another rebase due to the recent split of > > guc.c (0a20ff54f5e66158930d

Re: pg_stat_statements and "IN" conditions

2022-09-24 Thread Dmitry Dolgov
> On Fri, Sep 16, 2022 at 09:25:13PM +0300, Sergei Kornilov wrote: > Hello! > > Unfortunately the patch needs another rebase due to the recent split of guc.c > (0a20ff54f5e66158930d5328f89f087d4e9ab400) > > I'm reviewing a patch on top of a previous commit and noticed a failed test: > > #

Re: pg_stat_statements and "IN" conditions

2022-07-24 Thread Dmitry Dolgov
> On Sat, Mar 26, 2022 at 06:40:35PM +0100, Dmitry Dolgov wrote: > > On Mon, Mar 14, 2022 at 04:51:50PM +0100, Dmitry Dolgov wrote: > > > On Mon, Mar 14, 2022 at 11:38:23AM -0400, Tom Lane wrote: > > > Dmitry Dolgov <9erthali...@gmail.com> writes: > > >

[RFC] Add jit deform_counter

2022-06-12 Thread Dmitry Dolgov
Hi, I've noticed that JIT performance counter generation_counter seems to include actions, relevant for both jit_expressions and jit_tuple_deforming options. It means one can't directly see what is the influence of jit_tuple_deforming alone, which would be helpful when adjusting JIT options. To

Re: Limiting memory allocation

2022-05-19 Thread Dmitry Dolgov
> On Wed, May 18, 2022 at 04:49:24PM -0400, Joe Conway wrote: > On 5/18/22 16:20, Alvaro Herrera wrote: > > On 2022-May-18, Joe Conway wrote: > > > > > On 5/18/22 11:11, Alvaro Herrera wrote: > > > > > > Apparently, if the cgroup goes over the "high" limit, the processes are > > > > *throttled*.

Re: pg_stat_statements and "IN" conditions

2022-03-26 Thread Dmitry Dolgov
> On Mon, Mar 14, 2022 at 04:51:50PM +0100, Dmitry Dolgov wrote: > > On Mon, Mar 14, 2022 at 11:38:23AM -0400, Tom Lane wrote: > > Dmitry Dolgov <9erthali...@gmail.com> writes: > > > On Mon, Mar 14, 2022 at 11:23:17AM -0400, Tom Lane wrote: > > >> I do f

Re: MDAM techniques and Index Skip Scan patch

2022-03-23 Thread Dmitry Dolgov
> On Wed, Mar 23, 2022 at 05:32:46PM -0400, Tom Lane wrote: > Dmitry Dolgov <9erthali...@gmail.com> writes: > > On Tue, Mar 22, 2022 at 04:55:49PM -0400, Tom Lane wrote: > >> In short: I would throw out just about all the planner infrastructure > >> that's b

Re: MDAM techniques and Index Skip Scan patch

2022-03-23 Thread Dmitry Dolgov
> On Tue, Mar 22, 2022 at 04:55:49PM -0400, Tom Lane wrote: > Peter Geoghegan writes: > > Like many difficult patches, the skip scan patch is not so much > > troubled by problems with the implementation as it is troubled by > > *ambiguity* about the design. Particularly concerning how skip scan >

Re: MDAM techniques and Index Skip Scan patch

2022-03-22 Thread Dmitry Dolgov
eturns false in case if index skip scan is used, otherwise amskip has to deal with scroll cursor and be prepared to handle different advance/read directions. ExecSupportsBackwardScan may seem to have too big scope, but looks like now it used only together with cursor

  1   2   3   4   5   6   >