Re: postgres_fdw: wrong results with self join + enable_nestloop off

2023-06-24 Thread Richard Guo
On Wed, Jun 14, 2023 at 2:49 PM Etsuro Fujita wrote: > On Mon, Jun 5, 2023 at 10:19 PM Etsuro Fujita > wrote: > > To avoid this issue, I am wondering if we should modify > > add_paths_to_joinrel() in back branches so that it just disallows the > > FDW to consider pushing down joins when the rest

Re: Stampede of the JIT compilers

2023-06-24 Thread James Coleman
On Sat, Jun 24, 2023 at 8:14 PM David Rowley wrote: > > On Sun, 25 Jun 2023 at 05:54, Tom Lane wrote: > > > > James Coleman writes: > > > On Sat, Jun 24, 2023 at 7:40 AM Tomas Vondra > > > wrote: > > >> On 6/24/23 02:33, David Rowley wrote: > > >>> On Sat, 24 Jun 2023 at 02:28, James Coleman w

Re: Stampede of the JIT compilers

2023-06-24 Thread James Coleman
On Sat, Jun 24, 2023 at 1:54 PM Tom Lane wrote: > > James Coleman writes: > > In that context capping the number of backends compiling, particularly > > where plans (and JIT?) might be cached, could well save us (depending > > on workload). > > TBH I do not find this proposal attractive in the le

Re: Add support for AT LOCAL

2023-06-24 Thread Vik Fearing
On 6/12/23 17:37, Alvaro Herrera wrote: On 2023-Jun-06, Laurenz Albe wrote: At a quick glance, it looks like you resolve "timezone" at the time the query is parsed. Shouldn't the resolution happen at query execution time? Sounds like it -- consider the case where the timestamp value is a par

Re: Stampede of the JIT compilers

2023-06-24 Thread David Rowley
On Sun, 25 Jun 2023 at 05:54, Tom Lane wrote: > > James Coleman writes: > > On Sat, Jun 24, 2023 at 7:40 AM Tomas Vondra > > wrote: > >> On 6/24/23 02:33, David Rowley wrote: > >>> On Sat, 24 Jun 2023 at 02:28, James Coleman wrote: > There are a couple of issues here. I'm sure it's been di

Inquiry/Help with pg_adviser (problem in index_create function for creating indexes)

2023-06-24 Thread Ahmed Ibrahim
Hi everyone! I am new to PostgreSQL community and working currently on project pg_adviser [https://github.com/DrPostgres/pg_adviser/] The extension last worked with version 8.3, and currently I am working to make it support version 16 and then the other active versions. I will give a brief about

Re: Do we want a hashset type?

2023-06-24 Thread Joel Jacobson
New version of int4hashset_contains() that should follow the same General Rules as MULTISET's MEMBER OF (8.16 ). The first rule is to return False if the cardinality is 0 (zero). However, we must first check if the first argument is null, in which case the cardinality cannot be 0 (zero), so if the

Re: Stampede of the JIT compilers

2023-06-24 Thread Tom Lane
James Coleman writes: > On Sat, Jun 24, 2023 at 7:40 AM Tomas Vondra > wrote: >> On 6/24/23 02:33, David Rowley wrote: >>> On Sat, 24 Jun 2023 at 02:28, James Coleman wrote: There are a couple of issues here. I'm sure it's been discussed before, and it's not the point of my thread, but

Re: Stampede of the JIT compilers

2023-06-24 Thread James Coleman
On Sat, Jun 24, 2023 at 7:40 AM Tomas Vondra wrote: > > > > On 6/24/23 02:33, David Rowley wrote: > > On Sat, 24 Jun 2023 at 02:28, James Coleman wrote: > >> There are a couple of issues here. I'm sure it's been discussed > >> before, and it's not the point of my thread, but I can't help but note

Re: psql: Add role's membership options to the \du+ command

2023-06-24 Thread David G. Johnston
On Sat, Jun 24, 2023 at 8:11 AM Pavel Luzanov wrote: > Notes > * The name of the new command. It's a good name, if not for the history. > There are two commands showing the same information about roles: \du and > \dr. > The addition of \drg may be misinterpreted: if there is \drg, then there > is

Re: Things I don't like about \du's "Attributes" column

2023-06-24 Thread Pavel Luzanov
On 23.06.2023 03:50, Tom Lane wrote: Nearby I dissed psql's \du command for its incoherent "Attributes" column [1]. It's too late to think about changing that for v16, but here's some things I think we should consider for v17: If there are no others willing, I am ready to take up this topic. T

Re: psql: Add role's membership options to the \du+ command

2023-06-24 Thread Pavel Luzanov
Thank you for all valuable comments. I can now continue working on the patch. Here's what I plan to do in the next version. Changes for \du & \dg commands * showing distinct roles in the "Member of" column * explicit order for list of roles * no changes for extended mode (\du+) New meta-command

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-06-24 Thread Joe Conway
On 6/22/23 03:26, Heikki Linnakangas wrote: On 21/06/2023 01:02, Joe Conway wrote: On 6/19/23 19:30, Heikki Linnakangas wrote: I think we should call "uselocale(LC_GLOBAL_LOCALE)" immediately after returning from the perl interpreter, instead of before setlocale() calls, if we want all Postgres

Re: Allow ordered partition scans in more cases

2023-06-24 Thread David Rowley
On Sat, 4 Mar 2023 at 00:56, David Rowley wrote: > What's on my mind now is if turning 1 Sort into N Sorts is a > particularly good idea from a work_mem standpoint. I see that we don't > do tuplesort_end() until executor shutdown, so that would mean that we > could end up using 1 x work_mem per So

Re: Stampede of the JIT compilers

2023-06-24 Thread Tomas Vondra
On 6/24/23 02:33, David Rowley wrote: > On Sat, 24 Jun 2023 at 02:28, James Coleman wrote: >> There are a couple of issues here. I'm sure it's been discussed >> before, and it's not the point of my thread, but I can't help but note >> that the default value of jit_above_cost of 10 seems abs

Re: Remove deprecation warnings when compiling PG ~13 with OpenSSL 3.0~

2023-06-24 Thread Michael Paquier
On Fri, Jun 23, 2023 at 10:41:06PM +0200, Peter Eisentraut wrote: > Considering that, yes. Thanks, applied to 11~13, then. -- Michael signature.asc Description: PGP signature

Re: Problems with estimating OR conditions, IS NULL on LEFT JOINs

2023-06-24 Thread Tomas Vondra
On 6/24/23 02:08, Tom Lane wrote: > Tomas Vondra writes: >> The problem is that the selectivity for "IS NULL" is estimated using the >> table-level statistics. But the LEFT JOIN entirely breaks the idea that >> the null_frac has anything to do with NULLs in the join result. > > Right. > >> I won

Re: Do we want a hashset type?

2023-06-24 Thread Joel Jacobson
On Thu, Jun 22, 2023, at 07:51, Joel Jacobson wrote: > For instance, how should hashset_count() work? > > Given the query, > > SELECT hashset_count('{1,2,3,null}'::int4hashset); > > Should we, > > a) threat NULL as a distinct value and return 4? > > b) ignore NULL and return 3? > > c) return NULL?