Re: Fwd: Re: proposal: schema variables

2025-01-17 Thread Dmitry Dolgov
> On Fri, Jan 17, 2025 at 11:01:41AM GMT, Bruce Momjian wrote: > On Fri, Jan 17, 2025 at 04:55:07PM +0100, Pavel Stehule wrote: > > pá 17. 1. 2025 v 16:35 odesílatel Bruce Momjian napsal: > > > > So this feature would be like global GUC variables, with permission > > control? > > > > + typ

Re: pg_stat_statements and "IN" conditions

2024-12-03 Thread Dmitry Dolgov
> On Thu, Nov 28, 2024 at 08:36:47PM GMT, Kirill Reshke wrote: > > Hi! Can you please send a rebased version of this? Sure, here it is. >From 2de1af6489d46449b2884a9194515cd1090d5e8c Mon Sep 17 00:00:00 2001 From: Dmitrii Dolgov <9erthali...@gmail.com> Date: Tue, 3 Dec 2024 14:55:45 +0100 Subject:

Re: Changing shared_buffers without restart

2024-12-02 Thread Dmitry Dolgov
> On Fri, Nov 29, 2024 at 05:47:27PM GMT, Dmitry Dolgov wrote: > > On Fri, Nov 29, 2024 at 01:56:30AM GMT, Matthias van de Meent wrote: > > > > I mean, we can do the following to get a nice contiguous empty address > > space no other mmap(NULL)s will get put into: > &

Re: Consider the number of columns in the sort cost model

2024-12-02 Thread Dmitry Dolgov
Hi folks, Just wanted to mention, that looks like some CFBot test are failing, something around level_tracking in pgss.

Re: Partition-wise join with whole row vars

2024-12-02 Thread Dmitry Dolgov
> On Tue, Oct 08, 2024 at 09:24:15AM GMT, Alexander Pyhalov wrote: > > Attaching rebased patches. Just to let you know, looks like CFBot tests are red again, but this time there are some unexpected differences in some test query plan.

Re: CRC32C Parallel Computation Optimization on ARM

2024-12-01 Thread Dmitry Dolgov
> On Mon, Dec 04, 2023 at 10:18:09PM -0600, Nathan Bossart wrote: > > Thanks for the new patch. I am hoping to spend much more time on this in > the near future... Hi, The patch looks interesting, having around 8% improvement on that sounds attractive. Nathan, do you plan to come back to it and

Re: Changing shared_buffers without restart

2024-11-29 Thread Dmitry Dolgov
> On Fri, Nov 29, 2024 at 01:56:30AM GMT, Matthias van de Meent wrote: > > I mean, we can do the following to get a nice contiguous empty address > space no other mmap(NULL)s will get put into: > > /* reserve size bytes of memory */ > base = mmap(NULL, size, PROT_NONE, ...flags, ...); >

Re: Changing shared_buffers without restart

2024-11-28 Thread Dmitry Dolgov
> On Thu, Nov 28, 2024 at 12:18:54PM GMT, Robert Haas wrote: > > All that having been said, what does concern me a bit is our ability > to predict what Linux will do well enough to keep what we're doing > safe; and also whether the Linux behavior might abruptly change in the > future. Users would b

Re: Changing shared_buffers without restart

2024-11-28 Thread Dmitry Dolgov
> On Wed, Nov 27, 2024 at 04:05:47PM GMT, Robert Haas wrote: > On Wed, Nov 27, 2024 at 3:48 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > My understanding is that clashing of mappings (either at creation time > > or when resizing) could happen only withing the proces

Re: Changing shared_buffers without restart

2024-11-27 Thread Dmitry Dolgov
> On Wed, Nov 27, 2024 at 10:20:27AM GMT, Robert Haas wrote: > > > > > > code, but I'm not sure exactly which points are safe. If we have no > > > code anywhere that assumes the address of an unpinned buffer can't > > > change before we pin it, then I guess the check for pins is the only > > > thin

Re: [PoC] Reducing planning time when tables have many partitions

2024-11-27 Thread Dmitry Dolgov
> On Tue, Oct 15, 2024 at 12:20:04PM GMT, Yuya Watari wrote: > > The previous patches do not apply to the current master, so I have > attached the rebased version. Thanks for keeping it up to date. > v25-0001 > This patch is one of the main parts of my optimization. Traditionally, > EquivalenceCl

Re: Changing shared_buffers without restart

2024-11-26 Thread Dmitry Dolgov
> On Mon, Nov 25, 2024 at 02:33:48PM GMT, Robert Haas wrote: > > I think the idea of having multiple shared memory segments is > interesting and makes sense, but I would prefer to see them called > "segments" rather than "slots" just as do we do for DSMs. The name > "slot" is somewhat overused, and

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2024-11-24 Thread Dmitry Dolgov
> On Thu, Oct 10, 2024 at 05:36:10PM GMT, Ashutosh Bapat wrote: > > 3. With just patch 0001 applied, planning time usually shows > degradation (column Q and X in planning time sheets) with or without > PWJ enabled. I first thought that it might be because of the increased > size of PlannerInfo. We

Re: Extract numeric filed in JSONB more effectively

2024-11-22 Thread Dmitry Dolgov
> On Mon, Nov 18, 2024 at 08:23:52AM GMT, Andy Fan wrote: > > >> > I imagined you'd the patch should create a SupportRequestSimplify > >> > support function for jsonb_numeric() that checks if the input > >> > expression is an OpExpr with funcid of jsonb_object_field(). All you > >> > do then is di

Re: An inefficient query caused by unnecessary PlaceHolderVar

2024-11-21 Thread Dmitry Dolgov
> On Fri, Jun 21, 2024 at 10:35:30AM GMT, Richard Guo wrote: > On Mon, Jan 15, 2024 at 1:50 PM Richard Guo wrote: > > Updated this patch over 29f114b6ff, which indicates that we should apply > > the same rules for PHVs. > > Here is a new rebase of this patch, with some tweaks to comments. I've >

Re: ALTER TABLE uses a bistate but not for toast tables

2024-11-20 Thread Dmitry Dolgov
> On Wed, Nov 20, 2024 at 06:43:58AM -0600, Justin Pryzby wrote: > > > Thanks for rebasing. To help with review, could you also describe > > current status of the patch? I have to admit, currently the commit > > message doesn't tell much, and looks more like notes for the future you. > > The patch

Re: proposal: schema variables

2024-11-20 Thread Dmitry Dolgov
> On Tue, Nov 19, 2024 at 08:14:01PM +0100, Pavel Stehule wrote: > Hi > > I wrote POC of VARIABLE(varname) syntax support Thanks, the results look good. I'm still opposed the idea of having a warning, and think it has to be an error -- but it's my subjective opinion. Lets see if there are more vot

Re: Changing shared_buffers without restart

2024-11-19 Thread Dmitry Dolgov
> On Tue, Nov 19, 2024 at 01:57:00PM GMT, Peter Eisentraut wrote: > On 18.10.24 21:21, Dmitry Dolgov wrote: > > v1-0001-Allow-to-use-multiple-shared-memory-mappings.patch > > > > Preparation, introduces the possibility to work with many shmem mappings. To > > make it

Re: ALTER TABLE uses a bistate but not for toast tables

2024-11-19 Thread Dmitry Dolgov
> On Mon, Jul 15, 2024 at 03:43:24PM GMT, Justin Pryzby wrote: > @cfbot: rebased Hey Justin, Thanks for rebasing. To help with review, could you also describe current status of the patch? I have to admit, currently the commit message doesn't tell much, and looks more like notes for the future you

Re: Improving btree performance through specializing by key shape, take 2

2024-11-16 Thread Dmitry Dolgov
> On Mon, Mar 04, 2024 at 09:39:37PM GMT, Matthias van de Meent wrote: > Performance > > > I haven't retested the results separately yet, but I assume the > performance results of [2] hold mostly true in comparing 0002 vs 0007. > I will do a performance (re-)evaluation of only this patch i

Re: proposal: schema variables

2024-11-16 Thread Dmitry Dolgov
> On Sat, Nov 16, 2024 at 07:10:31AM GMT, Pavel Stehule wrote: Sorry, got distracted. Let me try to answer step by step. > > As far as I recall, last time this topic was discussed in hackers, two > > options were proposed: the one with VARIABLE(name), what you mention > > here; and another one wi

Re: Extract numeric filed in JSONB more effectively

2024-11-15 Thread Dmitry Dolgov
> On Thu, Sep 12, 2024 at 03:03:18AM GMT, Andy Fan wrote: > > > I imagined you'd the patch should create a SupportRequestSimplify > > support function for jsonb_numeric() that checks if the input > > expression is an OpExpr with funcid of jsonb_object_field(). All you > > do then is ditch the cast

Re: btree: implement dynamic prefix truncation (was: Improving btree performance through specializing by key shape, take 2)

2024-11-13 Thread Dmitry Dolgov
> On Tue, Aug 13, 2024 at 02:39:10PM GMT, Peter Geoghegan wrote: > On Tue, Aug 6, 2024 at 5:42 PM Matthias van de Meent > wrote: > > Attached is version 16 now. > > I ran this with my old land registry benchmark, used for validating > the space utilization impact of nbtree deduplication (among oth

Re: proposal: schema variables

2024-11-13 Thread Dmitry Dolgov
> On Sun, Nov 10, 2024 at 06:51:40PM GMT, Pavel Stehule wrote: > ne 10. 11. 2024 v 17:19 odesílatel Pavel Stehule > napsal: > I thought a lot of time about better solutions for identifier collisions > and I really don't think so there is some consistent user friendly syntax. > Personally I think t

Re: proposal: schema variables

2024-11-10 Thread Dmitry Dolgov
> On Sun, Nov 10, 2024 at 05:19:09PM GMT, Pavel Stehule wrote: > ne 10. 11. 2024 v 16:24 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > Hi folks, > > > > Thanks for continuing this work. As a side note, I would like to mention > > how st

Re: proposal: schema variables

2024-11-10 Thread Dmitry Dolgov
Hi folks, Thanks for continuing this work. As a side note, I would like to mention how strange the situation in this CF item is. If I understand correctly, there are two hackers threads discussing the same patch, with recent patches posted in both of them. This is obviously confusing, e.g. the mai

Re: Changing shared_buffers without restart

2024-11-08 Thread Dmitry Dolgov
> On Wed, Nov 06, 2024 at 07:10:06PM GMT, Vladlen Popolitov wrote: > Hi > > I tried to apply patches, but failed. I suppose the problem with CRLF in the > end of lines in the patch files. At least, after manual change of v1-0001 and > v1-0002 from CRLF to LF patches applied, but it was not helped

Re: Changing shared_buffers without restart

2024-11-08 Thread Dmitry Dolgov
> On Thu, Nov 07, 2024 at 02:05:52PM GMT, Thomas Munro wrote: > On Sat, Oct 19, 2024 at 8:21 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > Currently it > > supports only an increase of shared_buffers. > > Just BTW in case it is interesting, Palak and I experim

Re: Identify huge pages accessibility using madvise

2024-11-08 Thread Dmitry Dolgov
> On Thu, Sep 26, 2024 at 08:46:17AM GMT, Dmitry Dolgov wrote: > > On Thu, Sep 26, 2024 at 07:57:12AM GMT, Gabriele Bartolini wrote: > > Hi Dmitry, > > > > I've been attempting to replicate this issue directly in Kubernetes, but I > > haven't been succes

Re: Changing shared_buffers without restart

2024-11-01 Thread Dmitry Dolgov
> On Fri, Oct 18, 2024 at 09:21:19PM GMT, Dmitry Dolgov wrote: > > TL;DR A PoC for changing shared_buffers without PostgreSQL restart, via > changing shared memory mapping layout. Any feedback is appreciated. It was pointed out to me, that earlier this year there was a useful disc

Re: System views for versions reporting

2024-10-19 Thread Dmitry Dolgov
> On Mon, Oct 07, 2024 at 11:26:41AM GMT, Dmitry Dolgov wrote: > > On Sun, Oct 06, 2024 at 12:01:29PM GMT, Joe Conway wrote: > > I'm not sure why ICU is "Compile Time" rather than "Run Time" when it is not > > statically linked. > > It

Changing shared_buffers without restart

2024-10-18 Thread Dmitry Dolgov
TL;DR A PoC for changing shared_buffers without PostgreSQL restart, via changing shared memory mapping layout. Any feedback is appreciated. Hi, Being able to change PostgreSQL configuration on the fly is an important property for performance tuning, since it reduces the feedback time and invasive

Re: System views for versions reporting

2024-10-07 Thread Dmitry Dolgov
> On Sun, Oct 06, 2024 at 12:01:29PM GMT, Joe Conway wrote: > On 10/6/24 11:36, Dmitry Dolgov wrote: > > Hi, > > > > Based on the feedback in [1], here is my attempt at implementing system > > views for versions reporting. It adds pg_system_versions for showin

System views for versions reporting

2024-10-06 Thread Dmitry Dolgov
Hi, Based on the feedback in [1], here is my attempt at implementing system views for versions reporting. It adds pg_system_versions for showing things like core version, compiler, LLVM, etc, and pg_system_libraries for showing linked shared objects. I think everyone has ageed that the first was a

Re: Identify huge pages accessibility using madvise

2024-09-25 Thread Dmitry Dolgov
> On Thu, Sep 26, 2024 at 07:57:12AM GMT, Gabriele Bartolini wrote: > Hi Dmitry, > > I've been attempting to replicate this issue directly in Kubernetes, but I > haven't been successful so far. I've been using EKS nodes, and it seems > that they all run cgroup v2 now. Do you have anything that coul

Re: Add llvm version into the version string

2024-09-24 Thread Dmitry Dolgov
> On Mon, Sep 23, 2024 at 02:45:18PM GMT, Tom Lane wrote: > Maybe another idea could be a new system view? > > => select * from pg_system_version; > property | value > > core version | 18.1 > architecture | x86_64-pc-linux-gnu > word

Re: Add llvm version into the version string

2024-09-23 Thread Dmitry Dolgov
> On Sun, Sep 22, 2024 at 01:15:54PM GMT, Dmitry Dolgov wrote: > > On Sat, Sep 21, 2024 at 05:25:30PM GMT, Tom Lane wrote: > > > > Is there a way to get the llvm library's version at run time? If so > > we could consider building a new function to return

Re: Add llvm version into the version string

2024-09-22 Thread Dmitry Dolgov
> On Sat, Sep 21, 2024 at 05:25:30PM GMT, Tom Lane wrote: > > Is there a way to get the llvm library's version at run time? If so > we could consider building a new function to return that. Yes, there is a C api LLVMGetVersion to get the major, minor and patch numbers. The jit provider could be e

Add llvm version into the version string

2024-08-21 Thread Dmitry Dolgov
In many jit related bug reports, one of the first questions is often "which llvm version is used". How about adding it into the PG_VERSION_STR, similar to the gcc version? >From 9a4404c0df92f96ab98fca3ff0d7952287c30ece Mon Sep 17 00:00:00 2001 From: Dmitrii Dolgov <9erthali...@gmail.com> Date: Tue,

Re: pg_stat_statements and "IN" conditions

2024-08-13 Thread Dmitry Dolgov
> On Sun, Aug 11, 2024 at 09:34:55PM GMT, Dmitry Dolgov wrote: > > On Sun, Aug 11, 2024 at 07:54:05PM +0300, Sergei Kornilov wrote: > > > > This feature will improve my monitoring. Even in patch 0001. I think there > > are many other people in the thread who think

Re: pg_stat_statements and "IN" conditions

2024-08-11 Thread Dmitry Dolgov
> On Sun, Aug 11, 2024 at 07:54:05PM +0300, Sergei Kornilov wrote: > > This feature will improve my monitoring. Even in patch 0001. I think there > are many other people in the thread who think this is useful. So maybe we > should move it forward? Any complaints about the overall design? I see in

Re: Recovery of .partial WAL segments

2024-08-09 Thread Dmitry Dolgov
> On Fri, Aug 02, 2024 at 08:47:02AM GMT, Stefan Fercot wrote: > > Not sure why CFbot CI fails on macOS/Windows while it works with the Github > CI on my fork ( > https://cirrus-ci.com/github/pgstef/postgres/partial-walseg-recovery). I guess it's because the test has to wait a bit after the node h

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2024-08-03 Thread Dmitry Dolgov
> On Wed, Jun 26, 2024 at 03:16:07PM GMT, Peter Geoghegan wrote: > > Loose index scan is a far more specialized technique than skip scan. > It only applies within special scans that feed into a DISTINCT group > aggregate. Whereas my skip scan patch isn't like that at all -- it's > much more general

Re: Pluggable cumulative statistics

2024-07-28 Thread Dmitry Dolgov
> On Sun, Jul 28, 2024 at 10:20:45PM GMT, Michael Paquier wrote: > I would like to apply this new infrastructure stuff and move on to the > problems related to the scability of pg_stat_statements. So, are > there any objections with all that? So far I've got nothing against :)

Re: Pluggable cumulative statistics

2024-07-12 Thread Dmitry Dolgov
> On Thu, Jul 11, 2024 at 04:42:22PM GMT, Michael Paquier wrote: > > So we are down to the remaining parts of the patch, and this is going > to need a consensus about a few things because this impacts the > developer experience when implementing one's own custom stats: > - Are folks OK with the poi

Re: Pluggable cumulative statistics

2024-07-07 Thread Dmitry Dolgov
> On Fri, Jun 21, 2024 at 01:28:11PM +0900, Michael Paquier wrote: > On Fri, Jun 21, 2024 at 01:09:10PM +0900, Kyotaro Horiguchi wrote: > > At Thu, 13 Jun 2024 16:59:50 +0900, Michael Paquier > > wrote in > >> * The kind IDs may change across restarts, meaning that any stats data > >> associated

Re: libpq contention due to gss even when not using gss

2024-06-14 Thread Dmitry Dolgov
> On Fri, Jun 14, 2024 at 12:12:55PM GMT, Daniel Gustafsson wrote: > > I've been experimenting with both: > > > > * The server is built without gssapi, but the client does support it. > > This produces exactly the contention you're talking about. > > > > * The server is built with gssapi, but do n

Re: libpq contention due to gss even when not using gss

2024-06-14 Thread Dmitry Dolgov
> On Thu, Jun 13, 2024 at 10:30:24AM GMT, Andres Freund wrote: > > > To investigate a report of both postgres and pgbouncer having issues when > > > a > > > lot of new connections aree established, I used pgbench -C. Oddly, on an > > > early attempt, the bottleneck wasn't postgres+pgbouncer, it w

Re: libpq contention due to gss even when not using gss

2024-06-13 Thread Dmitry Dolgov
> On Mon, Jun 10, 2024 at 11:12:12AM GMT, Andres Freund wrote: > Hi, > > To investigate a report of both postgres and pgbouncer having issues when a > lot of new connections aree established, I used pgbench -C. Oddly, on an > early attempt, the bottleneck wasn't postgres+pgbouncer, it was pgbench.

Re: Proposal: Job Scheduler

2024-06-06 Thread Dmitry Dolgov
> On Thu, Jun 06, 2024 at 12:53:38PM GMT, Alvaro Herrera wrote: > On 2024-Jun-06, Dave Page wrote: > > > It's this kind of choice that means it's unlikely we'd include any one > > option in PostgreSQL, much like various other tools such as failover > > managers or poolers. > > TBH I see that more a

Re: Test 031_recovery_conflict fails when a conflict counted twice

2024-06-05 Thread Dmitry Dolgov
> On Mon, May 27, 2024 at 06:00:00PM GMT, Alexander Lakhin wrote: > Hello hackers, > > As a recent buildfarm test failure on olingo (which builds postgres with > -O1 and address sanitizer) [1] shows: > ... > [23:12:02.127](0.166s) not ok 6 - snapshot conflict: stats show conflict on > standby > [2

Re: Schema variables - new implementation for Postgres 15

2024-05-31 Thread Dmitry Dolgov
> On Tue, May 28, 2024 at 05:18:02PM GMT, Pavel Stehule wrote: > > I propose another variants. First we can introduce pseudo function VAR( ). > The argument should be session variables. The name of this function can be > pgvar, globvar, ... We can talk about good name, it should not be too long, >

Re: Schema variables - new implementation for Postgres 15

2024-05-24 Thread Dmitry Dolgov
> On Wed, May 22, 2024 at 08:44:28PM +0200, Pavel Stehule wrote: > st 22. 5. 2024 v 19:25 odesílatel Tom Lane napsal: > > > Peter Eisentraut writes: > > > On 18.05.24 13:29, Alvaro Herrera wrote: > > >> I want to note that when we discussed this patch series at the dev > > >> meeting in FOSDEM, a

Re: Schema variables - new implementation for Postgres 15

2024-05-22 Thread Dmitry Dolgov
> On Wed, May 22, 2024 at 02:37:49PM +0200, Peter Eisentraut wrote: > On 18.05.24 13:29, Alvaro Herrera wrote: > > I want to note that when we discussed this patch series at the dev > > meeting in FOSDEM, a sort-of conclusion was reached that we didn't want > > schema variables at all because of th

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-19 Thread Dmitry Dolgov
> On Thu, May 16, 2024 at 02:30:03PM -0400, Robert Haas wrote: > > I wonder what ideas people have for improving this situation. I doubt > that there's any easy answer that just makes the problem go away -- > keeping large groups of people organized is a tremendously difficult > task under pretty m

Re: broken JIT support on Fedora 40

2024-05-16 Thread Dmitry Dolgov
fy pass on all generated IR. We fixed a recent problem that crashed LLVM 18, but Dmitry pointed out that we'd have known about that all along if we'd automatically run the verify pass on the IR we generate. Turn that on in assertion builds. That reveals one other complaint about a

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 >

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 th

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

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 problema

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): un

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 doe

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 fu

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 fun

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 as

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 a

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

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 pg_stat_statements.query_id_const_merge_thresh

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 wait

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 se

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 af

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 ment

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

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

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

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

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

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 fu

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 i

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

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 pa

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

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

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; > > + > > + if

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 max_pa

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

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'

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: > > > > + /* > > +*

  1   2   3   4   5   6   7   >