Re: [PATCH] Missing dep on Catalog.pm in meson rules

2023-06-01 Thread Tristan Partin
On Thu Jun 1, 2023 at 4:22 PM CDT, Dagfinn Ilmari Mannsåker wrote: > On Thu, 1 Jun 2023, at 22:16, Tristan Partin wrote: > > Could you create a variable for the file instead of calling files() 3 > > times? > > > >> catalog_pm = files('path/to/Catalog.pm') > > Sure, but which meson.build file should

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

2023-06-01 Thread Suraj Kharage
+1 for fixing this in the backend code rather than FDW code. Thanks, Richard, for working on this. The patch looks good to me at a glance. On Tue, Apr 25, 2023 at 3:36 PM Richard Guo wrote: > > On Fri, Apr 14, 2023 at 8:51 PM Etsuro Fujita > wrote: > >> I think that the root cause for this iss

Re: Request for new function in view update

2023-06-01 Thread Heikki Linnakangas
On 01/06/2023 13:18, Terry Brennan wrote: Hello all, I am a researcher in databases who would like to suggest a new function.  I am writing to you because you have an active developer community.  Your website said that suggestions for new functions should go to this mailing list.  If there is

Re: [PATCH] Missing dep on Catalog.pm in meson rules

2023-06-01 Thread Dagfinn Ilmari Mannsåker
On Thu, 1 Jun 2023, at 22:16, Tristan Partin wrote: > Could you create a variable for the file instead of calling files() 3 > times? > >> catalog_pm = files('path/to/Catalog.pm') Sure, but which meson.build file should it go in? I know nothing about meson variable scoping. > -- > Tristan Partin

Re: [PATCH] Missing dep on Catalog.pm in meson rules

2023-06-01 Thread Tristan Partin
Could you create a variable for the file instead of calling files() 3 times? > catalog_pm = files('path/to/Catalog.pm') -- Tristan Partin Neon (https://neon.tech)

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Andrew Dunstan
On 2023-06-01 Th 16:39, Kirk Wolak wrote: On Thu, Jun 1, 2023 at 3:13 PM Andrew Dunstan wrote: On 2023-06-01 Th 12:57, Kirk Wolak wrote: PS: It dawned on me that if pg_dump had used server side code to generate its DDL, its complexity would drop. Maybe, that remains to be s

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Kirk Wolak
On Thu, Jun 1, 2023 at 3:13 PM Andrew Dunstan wrote: > On 2023-06-01 Th 12:57, Kirk Wolak wrote: > > PS: It dawned on me that if pg_dump had used server side code to generate > its DDL, its complexity would drop. > > Maybe, that remains to be seen. pg_dump needs to produce SQL that is > suitable

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Andrew Dunstan
On 2023-06-01 Th 12:57, Kirk Wolak wrote: PS: It dawned on me that if pg_dump had used server side code to generate its DDL, its complexity would drop. Maybe, that remains to be seen. pg_dump needs to produce SQL that is suitable for the target database, not the source database. cheers

Re: An inefficient query caused by unnecessary PlaceHolderVar

2023-06-01 Thread James Coleman
On Wed, May 31, 2023 at 10:30 PM Richard Guo wrote: > > > On Wed, May 31, 2023 at 1:27 AM James Coleman wrote: >> >> This looks good to me. > > > Thanks for the review! Sure thing! >> >> A few small tweaks suggested to comment wording: >> >> +-- lateral reference for simple Var can escape Place

Re: Adding SHOW CREATE TABLE

2023-06-01 Thread Kirk Wolak
On Thu, May 25, 2023 at 9:23 AM Jelte Fennema wrote: > On Mon, 22 May 2023 at 13:52, Andrew Dunstan wrote: > > A performant server side set of functions would be written in C and > follow the patterns in ruleutils.c. > > We have lots of DDL ruleutils in our Citus codebase: > > https://github.com

Re: [PATCH] Missing dep on Catalog.pm in meson rules

2023-06-01 Thread Michael Paquier
On Thu, Jun 01, 2023 at 01:41:40PM +0100, Dagfinn Ilmari Mannsåker wrote: > While hacking on Catalog.pm (over in > https://postgr.es/m/87y1l3s7o9.fsf%40wibble.ilmari.org) I noticed that > ninja wouldn't rebuild postgres.bki on changes to the module. Here's a > patch that adds it to depend_files fo

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2023-06-01 Thread Michael Paquier
On Wed, May 31, 2023 at 06:35:34PM -0500, Justin Pryzby wrote: > What do you think the comment ought to say ? It already says: > > src/backend/catalog/heap.c- * Make a dependency link to force > the relation to be deleted if its > src/backend/catalog/heap.c- * access met

[PATCH] Missing dep on Catalog.pm in meson rules

2023-06-01 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, While hacking on Catalog.pm (over in https://postgr.es/m/87y1l3s7o9.fsf%40wibble.ilmari.org) I noticed that ninja wouldn't rebuild postgres.bki on changes to the module. Here's a patch that adds it to depend_files for the targets I culd find that invoke scripts that use it. - ilmari

Re: Docs: Encourage strong server verification with SCRAM

2023-06-01 Thread Michael Paquier
On Thu, Jun 01, 2023 at 10:22:28AM +0200, Daniel Gustafsson wrote: > It's true that an attacker kan use offline analysis but it makes it sound > easier than it might be in practice. I would have written "to potentially > determine". Hmm. Okay by me. -- Michael signature.asc Description: PGP si

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-06-01 Thread Peter Smith
On Thu, Jun 1, 2023 at 7:22 AM Melih Mutlu wrote: > > Hi Peter, > > Peter Smith , 26 May 2023 Cum, 10:30 tarihinde > şunu yazdı: > > > > On Thu, May 25, 2023 at 6:59 PM Melih Mutlu wrote: > > Yes, I was mostly referring to the same as point 1 below about patch > > 0001. I guess I just found the c

Re: Avoiding another needless ERROR during nbtree page deletion

2023-06-01 Thread Peter Geoghegan
On Thu, Jun 1, 2023 at 6:47 AM Greg Stark wrote: > What error would one expect to see? I did have a case where vacuum was > erroring on a btree in $previous_job. You mean in general? It's usually this one: https://gitlab.com/gitlab-org/gitlab/-/issues/381443 In the case of this particular issu

[PATCH] Using named captures in Catalog::ParseHeader()

2023-06-01 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, Peter's patch set for autogenerating syscache info (https://postgr.es/m/75ae5875-3abc-dafc-8aec-73247ed41cde%40eisentraut.org) touched on one of my least favourite parts of Catalog.pm: the parenthesis-counting nightmare that is the parsing of catalog header directives. However, now th

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-06-01 Thread Melih Mutlu
Hi Peter, Peter Smith , 26 May 2023 Cum, 10:30 tarihinde şunu yazdı: > > On Thu, May 25, 2023 at 6:59 PM Melih Mutlu wrote: > Yes, I was mostly referring to the same as point 1 below about patch > 0001. I guess I just found the concept of mixing A) launching TSW (via > apply worker) with B) reass

Re: Do we want a hashset type?

2023-06-01 Thread Andrew Dunstan
On 2023-05-31 We 11:40, Joel Jacobson wrote: On Wed, May 31, 2023, at 16:53, Tomas Vondra wrote: I think this needs a better explanation - what exactly is a hashset in this context? Something like an array with a hash for faster lookup of unique elements, or what? In this context, by "hashset"

Re: Avoiding another needless ERROR during nbtree page deletion

2023-06-01 Thread Greg Stark
On Mon, May 22, 2023, 12:31 Peter Geoghegan wrote: > On Sun, May 21, 2023 at 11:51 PM Heikki Linnakangas > wrote: > > Any idea what might cause this corruption? > > Not really, no. As far as I know the specific case that was brought to > my attention (that put me on the path to writing this patc

RE: [16Beta1][doc] pgstat: Track time of the last scan of a relation

2023-06-01 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Hi, Thanks for your comment. As you say, it would be difficult to unify the data types in all documents right now. The patch I attached the other day unifies only the newly added columns in monitoring.sgml to "timestamp with time zone". Regards, Noriyoshi Shinoda -Original Message- From:

Re: Docs: Encourage strong server verification with SCRAM

2023-06-01 Thread Daniel Gustafsson
> On 31 May 2023, at 23:14, Michael Paquier wrote: > On Wed, May 31, 2023 at 10:08:39AM -0400, Jacob Champion wrote: >> LGTM! > > Okay. Does anybody have any comments and/or objections? LGTM. As a small nitpick, I think this sentence is a little bit misleading: "..can use offline ana

Re: [PATCH] Add LoongArch spinlock support in s_lock.h.

2023-06-01 Thread Daniel Gustafsson
> On 1 Jun 2023, at 10:05, zang ruochen wrote: > > Thanks, due to my mistake, I didn't notice that someone had already submitted > a patch, so please ignore my patch submission this time. No worries, thanks for the submission and support of postgres! -- Daniel Gustafsson

Re: [PATCH] Add LoongArch spinlock support in s_lock.h.

2023-06-01 Thread Daniel Gustafsson
> On 1 Jun 2023, at 09:53, zang ruochen wrote: > LoongArch is a new architecture that is already supported by linux-6.1, > gcc-12, and I want to add LoongArch spinlock support in s_lock.h. This has been discussed a number of times, see the thread linked below for a good starting point. https:/

[PATCH] Add LoongArch spinlock support in s_lock.h.

2023-06-01 Thread zang ruochen
LoongArch is a new architecture that is already supported by linux-6.1, gcc-12, and I want to add LoongArch spinlock support in s_lock.h. From 68c252b4aab5d116b1bf791e16f072fb3ee0161f Mon Sep 17 00:00:00 2001 From: Zang Ruochen Date: Thu, 1 Jun 2023 15:30:44 +0800 Subject: [PATCH] Add LoongArch sp

RE: Support logical replication of DDLs

2023-06-01 Thread Yu Shi (Fujitsu)
On Wed, May 31, 2023 5:41 PM shveta malik wrote: > > On Mon, May 29, 2023 at 11:45 AM Yu Shi (Fujitsu) > wrote: > > > > 0008 patch > > - > > 4. > > case AT_AddColumn: > > /* XXX need to set the "recurse" bit > > somewhere? */ > >

Re: Do we want a hashset type?

2023-06-01 Thread Joel Jacobson
On Thu, Jun 1, 2023, at 09:02, Joel Jacobson wrote: > Here is an example using a real anonymised social network. I realised the "found" column is not necessary in this particular example, since we only care about the friends at the exact depth level. Simplified query: CREATE OR REPLACE VIEW frien

Re: Do we want a hashset type?

2023-06-01 Thread Joel Jacobson
On Wed, May 31, 2023, at 18:59, Tomas Vondra wrote: > How does storing just the IDs solves anything? Isn't the main challenge > the random I/O when fetching the adjacent nodes? This does not really > improve that, no? I'm thinking of a recursive query where a lot of time is just spent following al