Re: REVOKE FROM warning on grantor

2024-03-18 Thread Étienne BERSAC
Hi Tom, Thanks for your anwser. > It does not say that that set must be nonempty.  Admittedly it's not > very clear from this one point.  However, if you look around in the > standard it seems clear that they expect no-op revokes to be no-ops > not errors. Postgres actually identifies

Re: What about Perl autodie?

2024-03-18 Thread Daniel Gustafsson
> On 18 Mar 2024, at 14:18, Dagfinn Ilmari Mannsåker wrote: > Daniel Gustafsson writes: >> It would have been nice to standardize on >> using one of "|| die" and "or die" consistently but that's clearly not for >> this >> body of work. > > "or die" is generally the preferred form, since ||

Re: sslinfo extension - add notbefore and notafter timestamps

2024-03-18 Thread Jacob Champion
On Fri, Mar 8, 2024 at 4:16 PM Cary Huang wrote: > Yes, I noticed this in the SSL test too. I am also in GTM-8, so for me the > tests would fail too due to the time zone differences from GMT. It shall be > okay to specifically set the outputs of pg_stat_ssl, > ssl_client_get_notbefore, and

Re: Is there still password max length restrictions in PG?

2024-03-18 Thread Daniel Gustafsson
> On 18 Mar 2024, at 14:29, Sean wrote: > Need some document to make a clarification or suggestion to the user? The suggestion is to not use password authentication but instead use SCRAM. -- Daniel Gustafsson

Re: Alternative SAOP support for GiST

2024-03-18 Thread Michał Kłeczek
Hi All, > On 11 Mar 2024, at 18:58, Michał Kłeczek wrote: > > Hi All, > > During my journey of designing Pg based solution at my work I was severely > hit by several shortcomings in GiST. > The most severe one is the lack of support for SAOP filters as it makes it > difficult to have

Is there still password max length restrictions in PG?

2024-03-18 Thread Sean
Hi All, Just noticed that the definition: postgres=# \d pg_shadow . usebypassrls | boolean | | | passwd | text | C | | . Looks like there is no length restriction for the password of a user. And in the code change history, 67a472d71c ("Remove

Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan

2024-03-18 Thread Matthias van de Meent
On Sat, 16 Mar 2024 at 01:12, Peter Geoghegan wrote: > > On Fri, Mar 8, 2024 at 9:00 AM Matthias van de Meent > wrote: > > I've attached v14, where 0001 is v13, 0002 is a patch with small > > changes + some large comment suggestions, and 0003 which contains > > sorted merge join code for

Re: What about Perl autodie?

2024-03-18 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: >> On 18 Mar 2024, at 07:27, Peter Eisentraut wrote: > >> After some pondering, I figured the exclude list is better. > > Agreed. > >> So here is a squashed patch, also with a complete commit message. > > Looks good from a read-through. It would have been nice to

Re: Support json_errdetail in FRONTEND builds

2024-03-18 Thread Jacob Champion
On Sun, Mar 17, 2024 at 4:49 PM Daniel Gustafsson wrote: > I took another look at this tonight and committed it with some mostly cosmetic > changes. Great! Thanks everyone. --Jacob

Re: Possibility to disable `ALTER SYSTEM`

2024-03-18 Thread Daniel Gustafsson
> On 18 Mar 2024, at 13:57, Robert Haas wrote: > my proposal is something like this, taking a > bunch of text from Jelte's patch and some inspiration from Magnus's > earlier remarks: I still think any wording should clearly mention that settings in the file are still applied. The proposed

Re: Improve readability by using designated initializers when possible

2024-03-18 Thread jian he
On Mon, Mar 18, 2024 at 6:01 PM jian he wrote: > > On Mon, Mar 18, 2024 at 3:09 PM Peter Eisentraut wrote: > > > > On 14.03.24 01:26, Michael Paquier wrote: > > > -EventTriggerSupportsObjectClass(ObjectClass objclass) > > > +EventTriggerSupportsObject(const ObjectAddress *object) > > > > > > The

Re: Possibility to disable `ALTER SYSTEM`

2024-03-18 Thread Robert Haas
On Fri, Mar 15, 2024 at 7:09 AM Jelte Fennema-Nio wrote: > On Fri, 15 Mar 2024 at 11:08, Daniel Gustafsson wrote: > > Another quirk for the documentation of this: if I disable ALTER SYSTEM I > > would > > assume that postgresql.auto.conf is no longer consumed, but it still is (and > > still

Re: Building with meson on NixOS/nixpkgs

2024-03-18 Thread Nazir Bilal Yavuz
Hi, Thank you for the patches! On Sat, 16 Mar 2024 at 14:48, Wolfgang Walther wrote: > > To build on NixOS/nixpkgs I came up with a few small patches to > meson.build. All of this works fine with Autoconf/Make already. I do not have NixOS but I confirm that patches cleanly apply to master and

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-03-18 Thread Daniel Gustafsson
Attached is a fresh rebase with only minor cosmetic touch-ups which I would like to go ahead with during this CF. Peter: does this address the comments you had on translation and code duplication? -- Daniel Gustafsson v15-0001-pg_upgrade-run-all-data-type-checks-per-connecti.patch

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-18 Thread Heikki Linnakangas
On 14/02/2024 21:42, Andres Freund wrote: On 2024-02-13 18:11:25 -0500, Melanie Plageman wrote: patch 0004 is, I think, a bug fix. see [2]. I'd not quite call it a bugfix, it's not like it leads to wrong behaviour. Seems more like an optimization. But whatever :) It sure looks like bug to

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2024-03-18 Thread Amit Langote
On Mon, Mar 18, 2024 at 8:57 PM Ashutosh Bapat wrote: > On Mon, Mar 18, 2024 at 5:05 PM Amit Langote wrote: >> On Mon, Mar 18, 2024 at 20:11 Ashutosh Bapat >> wrote: >>> On Fri, Mar 15, 2024 at 11:45 AM Amit Langote >>> wrote: Could you please post the numbers with the palloc() /

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2024-03-18 Thread Ashutosh Bapat
On Mon, Mar 18, 2024 at 5:05 PM Amit Langote wrote: > On Mon, Mar 18, 2024 at 20:11 Ashutosh Bapat > wrote: > >> Hi Amit, >> >> >> On Fri, Mar 15, 2024 at 11:45 AM Amit Langote >> wrote: >> >>> > > >>> > > That being said I'm a big fan of using a local variable on stack and >>> > > filling it.

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2024-03-18 Thread Amit Langote
On Mon, Mar 18, 2024 at 20:11 Ashutosh Bapat wrote: > Hi Amit, > > > On Fri, Mar 15, 2024 at 11:45 AM Amit Langote > wrote: > >> > > >> > > That being said I'm a big fan of using a local variable on stack and >> > > filling it. I'd probably go with the usual palloc/pfree, because that >> > >

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-18 Thread Tomas Vondra
On 3/17/24 20:36, Tomas Vondra wrote: > > ... > >> Besides a lot of other things, I finally added debugging fprintfs printing >> the >> pid, (prefetch, read), block number. Even looking at tiny excerpts of the >> large amount of output that generates shows that two iterators were out of >>

Re: Add pg_basetype() function to obtain a DOMAIN base type

2024-03-18 Thread Alexander Korotkov
On Mon, Mar 18, 2024 at 2:01 AM jian he wrote: > > looking at it again. > I found out we can just simply do > ` > Datum > pg_basetype(PG_FUNCTION_ARGS) > { > Oid oid; > > oid = get_fn_expr_argtype(fcinfo->flinfo, 0); > PG_RETURN_OID(getBaseType(oid)); > } > ` > > if the type is not a domain,

Re: speed up a logical replica setup

2024-03-18 Thread Peter Eisentraut
On 18.03.24 06:43, Hayato Kuroda (Fujitsu) wrote: 02. "The main difference between the logical replication setup and pg_createsubscriber is the initial data copy." Grammarly suggests: "The initial data copy is the main difference between the logical replication setup and pg_createsubscriber."

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2024-03-18 Thread Ashutosh Bapat
Hi Amit, On Fri, Mar 15, 2024 at 11:45 AM Amit Langote wrote: > > > > > > That being said I'm a big fan of using a local variable on stack and > > > filling it. I'd probably go with the usual palloc/pfree, because that > > > makes it much easier to use - the callers would not be responsible

Re: speed up a logical replica setup

2024-03-18 Thread Peter Eisentraut
On 18.03.24 08:18, vignesh C wrote: 1) Maximum size of the object name is 64, we can have a check so that we don't specify more than the maximum allowed length: + case 3: + if (!simple_string_list_member(_names, optarg)) + { + simple_string_list_append(_names, optarg); + num_replslots++; + } +

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-18 Thread Bertrand Drouvot
Hi, On Sat, Mar 16, 2024 at 09:29:01AM +0530, Bharath Rupireddy wrote: > Please see the attached v11 patch set with all the above review > comments addressed. Thanks! Looking at 0001: 1 === + True if this logical slot conflicted with recovery (and so is now + invalidated). When

Re: remaining sql/json patches

2024-03-18 Thread Amit Langote
Himanshu, On Mon, Mar 18, 2024 at 4:57 PM Himanshu Upadhyaya wrote: > I have tested a nested case but why is the negative number allowed in > subscript(NESTED '$.phones[-1]'COLUMNS), it should error out if the number is > negative. > > ‘postgres[170683]=#’SELECT * FROM JSON_TABLE(jsonb '{ >

Re: Catalog domain not-null constraints

2024-03-18 Thread Aleksander Alekseev
Hi, > Anyway, in order to move this forward, here is an updated patch where > the ADD CONSTRAINT ... NOT NULL behavior for domains matches the > idempotent behavior of tables. This uses the patch that Jian He posted. I tested the patch on Raspberry Pi 5 and Intel MacBook and also experimented

Re: Improve readability by using designated initializers when possible

2024-03-18 Thread jian he
On Mon, Mar 18, 2024 at 3:09 PM Peter Eisentraut wrote: > > On 14.03.24 01:26, Michael Paquier wrote: > > -EventTriggerSupportsObjectClass(ObjectClass objclass) > > +EventTriggerSupportsObject(const ObjectAddress *object) > > > > The shortcut introduced here is interesting, but it is

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-18 Thread Alexander Korotkov
On Mon, Mar 18, 2024 at 5:17 AM Amit Kapila wrote: > On Sun, Mar 17, 2024 at 7:40 PM Alexander Korotkov wrote: > > On Sat, Mar 16, 2024 at 5:05 PM Bharath Rupireddy > > wrote: > > > On Sat, Mar 16, 2024 at 4:26 PM Amit Kapila wrote: > > > > In general, it seems this patch has been stuck for a

Re: Refactoring backend fork+exec code

2024-03-18 Thread Heikki Linnakangas
On 13/03/2024 09:30, Heikki Linnakangas wrote: Attached is a new version of the remaining patches. Committed, with some final cosmetic cleanups. Thanks everyone! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-18 Thread Bertrand Drouvot
Hi, On Mon, Mar 18, 2024 at 08:50:56AM +0530, Amit Kapila wrote: > On Sun, Mar 17, 2024 at 2:03 PM Bharath Rupireddy > wrote: > > > > On Sat, Mar 16, 2024 at 3:55 PM Amit Kapila wrote: > > > > > > procArray->replication_slot_catalog_xmin) but then don't adjust it for > > > 'max_slot_xid_age'. I

Re: Autogenerate some wait events code and documentation

2024-03-18 Thread Alvaro Herrera
On 2023-Aug-28, Michael Paquier wrote: > I have looked again at that, and switching wait_event_names.txt to use > two columns made of the typedef definitions and the docs like is not a > problem: > FOO_BAR "Waiting on Foo Bar." > > WAIT_EVENT_ is appended to the typedef definitions in the

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-18 Thread Bertrand Drouvot
Hi, On Sat, Mar 16, 2024 at 09:29:01AM +0530, Bharath Rupireddy wrote: > I've also responded to Bertrand's comments here. Thanks! > > On Wed, Mar 6, 2024 at 3:56 PM Bertrand Drouvot > wrote: > > > > 5 === > > > > -# Check conflict_reason is NULL for physical slot > > +# Check

Re: Autogenerate some wait events code and documentation

2024-03-18 Thread Bertrand Drouvot
Hi, On Mon, Mar 18, 2024 at 08:02:24AM +0900, Michael Paquier wrote: > On Sun, Mar 17, 2024 at 11:31:14AM -0700, Noah Misch wrote: > > Adding an event > > will renumber others, which can make an extension report the wrong event > > until > > recompiled. Extensions citus, pg_bulkload, and vector

Re: Skip collecting decoded changes of already-aborted transactions

2024-03-18 Thread Masahiko Sawada
On Fri, Mar 15, 2024 at 1:21 PM Ajin Cherian wrote: > > > > On Fri, Mar 15, 2024 at 3:17 PM Masahiko Sawada wrote: >> >> >> I resumed working on this item. I've attached the new version patch. >> >> I rebased the patch to the current HEAD and updated comments and >> commit messages. The patch is

Re: Check lateral references within PHVs for memoize cache keys

2024-03-18 Thread Richard Guo
On Fri, Feb 2, 2024 at 5:18 PM Richard Guo wrote: > The v4 patch does not apply any more. I've rebased it on master. > Nothing else has changed. > Here is another rebase over master so it applies again. I also added a commit message to help review. Nothing else has changed. Thanks Richard

Re: Support json_errdetail in FRONTEND builds

2024-03-18 Thread Daniel Gustafsson
> On 18 Mar 2024, at 01:13, Tom Lane wrote: > > Daniel Gustafsson writes: >> I took another look at this tonight and committed it with some mostly >> cosmetic >> changes. Since then, tamandua failed the SSL test on this commit but I am >> unable to reproduce any error both on older OpenSSL

Re: What about Perl autodie?

2024-03-18 Thread Daniel Gustafsson
> On 18 Mar 2024, at 07:27, Peter Eisentraut wrote: > After some pondering, I figured the exclude list is better. Agreed. > So here is a squashed patch, also with a complete commit message. Looks good from a read-through. It would have been nice to standardize on using one of "|| die" and

Re: Remove a FIXME and unused variables in Meson

2024-03-18 Thread Peter Eisentraut
On 14.03.24 06:13, Tristan Partin wrote: One of them adds version gates to two LLVM flags (-frwapv, -fno-strict-aliasing). I believe we moved the minimum LLVM version recently, so these might not be necessary, but maybe it helps for historictal reasons. If not, I'll just remove the comment in

Re: MERGE ... RETURNING

2024-03-18 Thread Dean Rasheed
On Fri, 15 Mar 2024 at 17:14, Jeff Davis wrote: > > On Fri, 2024-03-15 at 11:20 +, Dean Rasheed wrote: > > > So barring any further objections, I'd like to go ahead and get this > > patch committed. > > I like this feature from a user perspective. So +1 from me. > I have committed this.

Re: remaining sql/json patches

2024-03-18 Thread Himanshu Upadhyaya
I have tested a nested case but why is the negative number allowed in subscript(NESTED '$.phones[-1]'COLUMNS), it should error out if the number is negative. ‘postgres[170683]=#’SELECT * FROM JSON_TABLE(jsonb '{ ‘...>’ "id" : "0.234567897890", ‘...>’ "name" : {

Re: Catalog domain not-null constraints

2024-03-18 Thread Peter Eisentraut
Anyway, in order to move this forward, here is an updated patch where the ADD CONSTRAINT ... NOT NULL behavior for domains matches the idempotent behavior of tables. This uses the patch that Jian He posted. From a0075e4bcd5f2db292f92fc2b70576ccebd07210 Mon Sep 17 00:00:00 2001 From: Peter

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-03-18 Thread Yugo NAGATA
On Thu, 14 Mar 2024 11:10:42 -0500 Nathan Bossart wrote: > On Wed, Mar 13, 2024 at 01:09:18PM +0700, Yugo NAGATA wrote: > > On Tue, 12 Mar 2024 22:07:17 -0500 > > Nathan Bossart wrote: > >> I did some light editing to prepare this for commit. > > > > Thank you. I confirmed the test you

Re: speed up a logical replica setup

2024-03-18 Thread vignesh C
On Sat, 16 Mar 2024 at 21:13, Euler Taveira wrote: > > On Fri, Mar 15, 2024, at 3:34 AM, Amit Kapila wrote: > > Did you consider adding options for publication/subscription/slot > names as mentioned in my previous email? As discussed in a few emails > above, it would be quite confusing for users

Re: Improve readability by using designated initializers when possible

2024-03-18 Thread Peter Eisentraut
On 14.03.24 01:26, Michael Paquier wrote: -EventTriggerSupportsObjectClass(ObjectClass objclass) +EventTriggerSupportsObject(const ObjectAddress *object) The shortcut introduced here is interesting, but it is inconsistent. HEAD treats OCLASS_SUBSCRIPTION as something supported by event

RE: PostgreSQL 17 Release Management Team & Feature Freeze

2024-03-18 Thread Hayato Kuroda (Fujitsu)
Dear Michael, > If you think that this is OK, and as far as I can see this looks OK on > the thread, then this open item should be moved under "resolved before > 17beta1", mentioning the commit involved in the fix. Please see [1] > for examples. OK, I understood that I could wait checking from

Re: What about Perl autodie?

2024-03-18 Thread Andrew Dunstan
On Mon, Mar 18, 2024 at 2:28 AM Peter Eisentraut wrote: > On 21.02.24 08:26, Peter Eisentraut wrote: > > On 14.02.24 17:52, Peter Eisentraut wrote: > >> A gentler way might be to start using some perlcritic policies like > >> InputOutput::RequireCheckedOpen or the more general > >>

Re: What about Perl autodie?

2024-03-18 Thread Peter Eisentraut
On 21.02.24 08:26, Peter Eisentraut wrote: On 14.02.24 17:52, Peter Eisentraut wrote: A gentler way might be to start using some perlcritic policies like InputOutput::RequireCheckedOpen or the more general InputOutput::RequireCheckedSyscalls and add explicit error checking at the sites it

Re: Weird test mixup

2024-03-18 Thread Michael Paquier
On Mon, Mar 18, 2024 at 10:50:25AM +0500, Andrey M. Borodin wrote: > Maybe consider function injection_points_attach_local(‘point name’) > instead of static switch? > Or even injection_points_attach_global(‘point name’), while function > injection_points_attach(‘point name’) will be global? This

Re: Switching XLog source from archive to streaming when primary available

2024-03-18 Thread Michael Paquier
On Sun, Mar 17, 2024 at 11:37:58AM +0530, Bharath Rupireddy wrote: > Rebase needed after 071e3ad59d6fd2d6d1277b2bd9579397d10ded28 due to a > conflict in meson.build. Please see the attached v23 patch. I've been reading this patch, and this is a very tricky one. Please be *very* cautious.

<    1   2