Re: GetNewObjectId question

2022-12-10 Thread Michael Paquier
On Sat, Dec 10, 2022 at 11:03:38PM -0800, Maciek Sakrejda wrote: > Sure. My C is pretty limited, but I think it's just the attached? I > patterned the usage on the way this is done in CreateRole. It passes > check-world here. Looks OK seen from here. Thanks for the patch! I don't have much

Re: GetNewObjectId question

2022-12-10 Thread Maciek Sakrejda
Sure. My C is pretty limited, but I think it's just the attached? I patterned the usage on the way this is done in CreateRole. It passes check-world here. From c7cae5d3e8d179505f26851f1241436a3748f9a8 Mon Sep 17 00:00:00 2001 From: Maciek Sakrejda Date: Sat, 10 Dec 2022 22:51:02 -0800 Subject:

Re: Progress report of CREATE INDEX for nested partitioned tables

2022-12-10 Thread Justin Pryzby
On Sat, Dec 10, 2022 at 12:18:32PM +0400, Ilya Gladyshev wrote: > Hi, > > I have noticed that progress reporting for CREATE INDEX of partitioned > tables seems to be working poorly for nested partitioned tables. In > particular, it overwrites total and done partitions count when it > recurses

Re: GetNewObjectId question

2022-12-10 Thread Tom Lane
Michael Paquier writes: > On Sat, Dec 10, 2022 at 07:11:13PM -0500, Tom Lane wrote: >> Yeah, that looks like somebody didn't read the memo. >> Want to submit a patch? > The comment has been added in e3ce2de but the call originates from > 6566133, so that's a HEAD-only issue. Ah, good that the

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2022-12-10 Thread Ian Lawrence Barwick
2022年8月3日(水) 7:56 Tom Lane : > > Jacob Champion writes: > > ...and Dinesh's email has just bounced back undelivered. :( > > > Anybody interested in running with this? If no one speaks up, I think we > > should return this as "needs more interest" before the next CF starts. > > Meh ... the last

Re: Allow parallel plan for referential integrity checks?

2022-12-10 Thread Ian Lawrence Barwick
2022年7月26日(火) 20:58 Frédéric Yhuel : > > > > On 4/14/22 14:25, Frédéric Yhuel wrote: > > > > > > On 3/19/22 01:57, Imseih (AWS), Sami wrote: > >> I looked at your patch and it's a good idea to make foreign key > >> validation > >> use parallel query on large relations. > >> > >> It would be

Re: [RFC] Add jit deform_counter

2022-12-10 Thread Pavel Stehule
Hi ne 11. 12. 2022 v 1:14 odesílatel Ian Lawrence Barwick napsal: > 2022年6月12日(日) 18:14 Dmitry Dolgov <9erthali...@gmail.com>: > > > > Hi, > > > > I've noticed that JIT performance counter generation_counter seems to > include > > actions, relevant for both jit_expressions and

Re: [BUG] Logical replica crash if there was an error in a function.

2022-12-10 Thread Anton A. Melnikov
On 07.12.2022 21:03, Andres Freund wrote: This CF entry causes tests to fail on all platforms: https://cirrus-ci.com/build/5755408111894528 E.g. https://api.cirrus-ci.com/v1/artifact/task/5298457144459264/testrun/build/testrun/subscription/100_bugs/log/regress_log_100_bugs Begin

Re: Raising the SCRAM iteration count

2022-12-10 Thread Michael Paquier
On Sun, Dec 11, 2022 at 12:46:23AM +0100, Daniel Gustafsson wrote: > SCRAM with an iteration count of 1 still provides a lot of benefits over md5, > so if we can make those comparable in performance then that could be a way > forward (with the tradeoffs properly documented). Okay, it looks like

Re: GetNewObjectId question

2022-12-10 Thread Michael Paquier
On Sat, Dec 10, 2022 at 07:11:13PM -0500, Tom Lane wrote: > Yeah, that looks like somebody didn't read the memo. > Want to submit a patch? The comment has been added in e3ce2de but the call originates from 6566133, so that's a HEAD-only issue. -- Michael signature.asc Description: PGP signature

Re: -Wunreachable-code-generic-assoc warnings on elver

2022-12-10 Thread Tom Lane
Thomas Munro writes: > On Sat, Dec 10, 2022 at 3:50 PM Tom Lane wrote: >> Recently, buildfarm member elver has started spewing literally >> thousands of $SUBJECT: > It was using LLVM and clang 15 for the JIT support (the base compiler > cc is clang 13 on this system, but CLANG is set to 15 for

Re: [RFC] Add jit deform_counter

2022-12-10 Thread Ian Lawrence Barwick
2022年6月12日(日) 18:14 Dmitry Dolgov <9erthali...@gmail.com>: > > 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

Re: GetNewObjectId question

2022-12-10 Thread Tom Lane
Maciek Sakrejda writes: > While browsing through varsup.c, I noticed this comment on GetNewObjectId: > * Hence, this routine should generally not be used directly. The only direct > * callers should be GetNewOidWithIndex() and GetNewRelFileNumber() in > * catalog/catalog.c. > But AddRoleMems in

Re: pg_rewind race condition just after promotion

2022-12-10 Thread Ian Lawrence Barwick
2021年11月9日(火) 20:31 Daniel Gustafsson : > > > On 14 Jul 2021, at 14:03, Aleksander Alekseev > > wrote: > > > > The following review has been posted through the commitfest application: > > make installcheck-world: tested, passed > > Implements feature: tested, passed > > Spec compliant:

Re: Error-safe user functions

2022-12-10 Thread Tom Lane
Andrew Dunstan writes: > On 2022-12-10 Sa 14:38, Tom Lane wrote: >> Seeing that SQL/JSON is one of the major drivers of this whole project, >> it seemed a little sad to me that jsonb couldn't manage to implement >> what is required. So I spent a bit of time poking at it. Attached >> is an

Re: Raising the SCRAM iteration count

2022-12-10 Thread Daniel Gustafsson
> On 10 Dec 2022, at 01:15, Andres Freund wrote: > On 2022-12-09 11:55:07 +0100, Daniel Gustafsson wrote: >> The attached introduces a scram_iteration_count GUC with a default of 15000 >> (still conservative, from RFC7677) and a minimum of 4096. Since the >> iterations >> are stored per secret

GetNewObjectId question

2022-12-10 Thread Maciek Sakrejda
While browsing through varsup.c, I noticed this comment on GetNewObjectId: * Hence, this routine should generally not be used directly. The only direct * callers should be GetNewOidWithIndex() and GetNewRelFileNumber() in * catalog/catalog.c. But AddRoleMems in user.c appears to also call the

Re: Error-safe user functions

2022-12-10 Thread Andrew Dunstan
On 2022-12-10 Sa 14:38, Tom Lane wrote: > Andrew Dunstan writes: >> OK, json is a fairly easy case, see attached. But jsonb is a different >> kettle of fish. Both the semantic routines called by the parser and the >> subsequent call to JsonbValueToJsonb() can raise errors. These are >> pretty

Re: Speedup generation of command completion tags

2022-12-10 Thread Andres Freund
Hi, On 2022-12-10 20:32:06 +1300, David Rowley wrote: > @@ -20,13 +20,14 @@ > typedef struct CommandTagBehavior > { > const char *name; > + const uint8 namelen; Perhaps worth adding a comment noting that namelen is the length without the null byte? > +static inline Size >

Re: Error-safe user functions

2022-12-10 Thread Tom Lane
Corey Huinker writes: > On Sat, Dec 10, 2022 at 9:20 AM Tom Lane wrote: >> A fallback we can offer to anyone with such a problem is "write a >> plpgsql function and wrap the potentially-failing bit in an exception >> block". Then they get to pay the cost of the subtransaction, while >> we're

Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX

2022-12-10 Thread Nathan Bossart
On Sat, Dec 10, 2022 at 12:07:12PM -0800, Jeff Davis wrote: > It seems like the discussion on VACUUM/CLUSTER/REINDEX privileges is > happening in the other thread. What would you like to accomplish in > this thread? Given the feedback in the other thread [0], I was planning to rewrite this patch

Re: -Wunreachable-code-generic-assoc warnings on elver

2022-12-10 Thread Thomas Munro
On Sat, Dec 10, 2022 at 3:50 PM Tom Lane wrote: > Recently, buildfarm member elver has started spewing literally > thousands of $SUBJECT: > > elver | 2022-12-10 01:17:29 | > ../../src/include/utils/float.h:223:33: warning: due to lvalue conversion of > the controlling expression,

Re: ExecRTCheckPerms() and many prunable partitions (checkAsUser)

2022-12-10 Thread Justin Pryzby
On Tue, Nov 29, 2022 at 10:37:56PM +0900, Amit Langote wrote: > 0002 contains changes that has to do with changing how we access > checkAsUser in some foreign table planning/execution code sites. > Thought it might be better to describe it separately too. This was committed as 599b33b94: Stop

Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX

2022-12-10 Thread Jeff Davis
On Thu, 2022-12-08 at 10:37 -0800, Nathan Bossart wrote: > 0001 makes it possible to > grant CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX. 0002 adds > predefined roles that allow performing these commands on all > relations. Regarding the pg_refresh_all_matview predefined role, I don't think

Re: Error-safe user functions

2022-12-10 Thread Tom Lane
Andrew Dunstan writes: > OK, json is a fairly easy case, see attached. But jsonb is a different > kettle of fish. Both the semantic routines called by the parser and the > subsequent call to JsonbValueToJsonb() can raise errors. These are > pretty much all about breaking various limits (for

Infinite Interval

2022-12-10 Thread Joseph Koshakow
Hi all, There have been multiple threads in the past discussing infinite intervals: https://www.postgresql.org/message-id/flat/4EB095C8.1050703%40agliodbs.com https://www.postgresql.org/message-id/flat/200101241913.f0OJDUu45423%40hub.org

Re: Error-safe user functions

2022-12-10 Thread Corey Huinker
On Sat, Dec 10, 2022 at 9:20 AM Tom Lane wrote: > Alvaro Herrera writes: > > On 2022-Dec-09, Tom Lane wrote: > >> ... So I think it might be > >> okay to say "if you want soft error treatment for a domain, > >> make sure its check constraints don't throw errors". > > > I think that's fine. If

Re: Error-safe user functions

2022-12-10 Thread Pavel Stehule
so 10. 12. 2022 v 15:35 odesílatel Andrew Dunstan napsal: > > On 2022-12-09 Fr 10:37, Andrew Dunstan wrote: > > I am currently looking at the json types. I think that will be enough to > > let us rework the sql/json patches as discussed a couple of months ago. > > > > OK, json is a fairly easy

Re: Error-safe user functions

2022-12-10 Thread Andrew Dunstan
On 2022-12-09 Fr 10:37, Andrew Dunstan wrote: > I am currently looking at the json types. I think that will be enough to > let us rework the sql/json patches as discussed a couple of months ago. > OK, json is a fairly easy case, see attached. But jsonb is a different kettle of fish. Both the

Re: Error-safe user functions

2022-12-10 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Dec-09, Tom Lane wrote: >> ... So I think it might be >> okay to say "if you want soft error treatment for a domain, >> make sure its check constraints don't throw errors". > I think that's fine. If the user does, say "CHECK (value > 0)" and that > results in a

Re: Error-safe user functions

2022-12-10 Thread Alvaro Herrera
On 2022-Dec-09, Tom Lane wrote: > I think though that it might be okay to just define this as > Not Our Problem. Although we don't seem to try to enforce it, > non-immutable domain check constraints are strongly deprecated > (the CREATE DOMAIN man page says that we assume immutability). > And

Progress report of CREATE INDEX for nested partitioned tables

2022-12-10 Thread Ilya Gladyshev
Hi, I have noticed that progress reporting for CREATE INDEX of partitioned tables seems to be working poorly for nested partitioned tables. In particular, it overwrites total and done partitions count when it recurses down to child partitioned tables and it only reports top-level partitions. So

Re: Minimal logical decoding on standbys

2022-12-10 Thread Drouvot, Bertrand
Hi, On 12/8/22 12:07 PM, Drouvot, Bertrand wrote: Hi, On 12/7/22 6:58 PM, Andres Freund wrote: Hi, On 2022-12-07 10:00:25 +0100, Drouvot, Bertrand wrote: Please find attached a new patch series: v27-0001-Add-info-in-WAL-records-in-preparation-for-logic.patch

Re: Generate pg_stat_get_* functions with Macros

2022-12-10 Thread Drouvot, Bertrand
Hi, On 12/10/22 4:55 AM, Nathan Bossart wrote: On Fri, Dec 09, 2022 at 09:43:56PM -0500, Tom Lane wrote: Presumably it could be silenced by removing the semicolons after the new macro calls: The backslash after the last right brace means that the line following that is part of the macro