Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-28 Thread vignesh C
On Fri, 29 Sept 2023 at 04:55, Peter Smith wrote: > > Some minor review comments for v4-0001: > > == > src/backend/replication/logical/worker.c > > 1. > + /* > + * Exit if the owner of the subscription has changed from superuser to a > + * non-superuser. > + */ > + if

[PGDOCS] change function linkend to refer to a more relevant target

2023-09-28 Thread Peter Smith
Hi, I found a link in the docs that referred to the stats "views" section, instead of the more relevant (IMO) stats "functions" section. PSA the 1 line patch -- it explains what I mean better than I can describe in words... == Kind Regards, Peter Smith. Fujitsu Australia

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-28 Thread David Rowley
On Fri, 29 Sept 2023 at 01:00, Ranier Vilela wrote: > Perhaps, and using your own words, the leaders on this project seem > to be against reviewers armed with blunderbuss, too. I don't have any ideas on what you're talking about here, but if this is a valid concern that you think is unfair then

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2023-09-28 Thread Amit Langote
On Wed, Sep 27, 2023 at 8:07 PM Ashutosh Bapat wrote: > On Wed, Sep 27, 2023 at 2:30 PM Amit Langote wrote: > > + /* > > +* But the list of operator OIDs and the list of expressions may be > > +* referenced somewhere else. Do not free those. > > +*/ > > > > I don't see

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Tom Lane
Andres Freund writes: > On 2023-09-28 19:20:27 -0700, Andres Freund wrote: >> Thus the easiest fix looks to be to use this: >> - export_fmt = '-exported_symbols_list=@0@' >> + export_fmt = '-Wl,-exported_symbols_list,@0@' >> I don't have anything older than Ventura to check though. I don't

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2023-09-28 Thread Andrei Lepikhov
On 22/5/2023 22:59, reid.thomp...@crunchydata.com wrote: Attach patches updated to master. Pulled from patch 2 back to patch 1 a change that was also pertinent to patch 1. +1 to the idea, have doubts on the implementation. I have a question. I see the feature triggers ERROR on the exceeding of

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Andres Freund
Hi, On 2023-09-28 19:20:27 -0700, Andres Freund wrote: > Thus the easiest fix looks to be to use this: > > diff --git a/meson.build b/meson.build > index 5422885b0a2..16a2b0f801e 100644 > --- a/meson.build > +++ b/meson.build > @@ -224,7 +224,7 @@ elif host_system == 'darwin' >

Re: The danger of deleting backup_label

2023-09-28 Thread Michael Paquier
On Thu, Sep 28, 2023 at 05:14:22PM -0400, David Steele wrote: > While reading through [1] I saw there were two instances where backup_label > was removed to achieve a "successful" restore. This might work on trivial > test restores but is an invitation to (silent) disaster in a production >

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Andres Freund
Hi, On 2023-09-28 19:17:37 -0400, Tom Lane wrote: > I wrote: > > Andres Freund writes: > >> I think right now it doesn't work as-is on sonoma, because apple decided to > >> change the option syntax, which is what causes the -e warning below, so the > >> relevant option is just ignored. > > >

RE: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-28 Thread Hayato Kuroda (Fujitsu)
Dear Michael, I confirmed your commit. Thanks! CF entry was closed as "Committed". Best Regards, Hayato Kuroda FUJITSU LIMITED

Re: pg_stat_get_activity(): integer overflow due to (int) * (int) for MemoryContextAllocHuge()

2023-09-28 Thread Michael Paquier
On Thu, Sep 28, 2023 at 11:01:14AM +0200, Jakub Wartak wrote: > v3 attached. I had a problem coming out with a better error message, > so suggestions are welcome. The cast still needs to be present as per > above suggestion as 3GB is still valid buf size and still was causing > integer overflow.

Re: Index range search optimization

2023-09-28 Thread Peter Geoghegan
On Fri, Sep 22, 2023 at 7:24 AM Alexander Korotkov wrote: > The thing is that NULLs could appear in the middle of matching values. > > # WITH t (a, b) AS (VALUES ('a', 'b'), ('a', NULL), ('b', 'a')) > SELECT a, b, (a, b) > ('a', 'a') FROM t ORDER BY (a, b); > a | b | ?column? >

Re: Move global variables of pgoutput to plugin private scope.

2023-09-28 Thread Michael Paquier
On Wed, Sep 27, 2023 at 04:57:06PM +0900, Michael Paquier wrote: > Sure. I found the concept behind 0002 sound. Feel free to go ahead > with 0001, and I can always look at the second. Always happy to help. For the sake of the archives: - Amit has applied 0001 down to 16 as of 54ccfd65868c. -

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-28 Thread Michael Paquier
On Thu, Sep 28, 2023 at 02:23:59PM +1000, Peter Smith wrote: > v4 LGTM. Applied v4 down to 16, then. -- Michael signature.asc Description: PGP signature

Re: Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Tom Lane
Vik Fearing writes: > On 9/28/23 20:46, Tom Lane wrote: >> We went through all these points years ago when the enum feature >> was first developed, as I recall. Nobody thought that the ability >> to remove an enum value was worth the amount of complexity it'd >> entail. > This issue comes up

Re: Try adding type cast with tablespace

2023-09-28 Thread Tom Lane
Kenichiro Tanaka writes: > Therefore I think it is good to add regtablespace alias,but I’m also > newbie pgsql-hackers. > We need some senior hackers’s opinions. Well ... for my two cents, I'm kind of down on this, mainly because I don't understand where we'd stop. I don't want to end up in a

Re: Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Vik Fearing
On 9/28/23 20:46, Tom Lane wrote: Andrew Dunstan writes: I wonder if we could have a boolean flag in pg_enum, indicating that setting an enum to that value was forbidden. Yeah, but that still offers no coherent solution to the problem of what happens if there's a table that already contains

Re: pg_upgrade and logical replication

2023-09-28 Thread Michael Paquier
On Wed, Sep 27, 2023 at 07:31:41PM +0530, Amit Kapila wrote: > On Wed, Sep 27, 2023 at 3:37 PM vignesh C wrote: >> Once the table is in SUBREL_STATE_SYNCDONE state, the apply worker >> will check if the apply worker has some LSN records that need to be >> applied to reach the LSN of the table.

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

2023-09-28 Thread Peter Geoghegan
On Sun, Sep 17, 2023 at 4:47 PM Peter Geoghegan wrote: > Attached is v2, which makes all array key advancement take place using > the "next index tuple" approach (using binary searches to find array > keys using index tuple values). Attached is v3, which fixes bitrot caused by today's bugfix

Re: Try adding type cast with tablespace

2023-09-28 Thread Kenichiro Tanaka
Hello,Yuki. My understanding is that your patch is aimed to enrich an alias type for oid. There are already some alias types for oid so I think it is good to add regtablespace for convenience. https://www.postgresql.org/docs/16/datatype-oid.html#DATATYPE-OID-TABLE Actually,I also felt it is a

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2023-09-28 Thread Michael Paquier
On Thu, Sep 28, 2023 at 01:29:21PM -0500, Justin Pryzby wrote: > On Thu, Dec 14, 2017 at 07:18:59PM +0700, Ali Akbar wrote: > > By the way, should i add this patch to the current commitfest? > > The patch for pg_upgrade --check got forgotten 6 years ago, but it's a > continuing problem (we hit it

Re: Does anyone ever use OPTIMIZER_DEBUG?

2023-09-28 Thread Michael Paquier
On Fri, Sep 29, 2023 at 10:20:39AM +1300, David Rowley wrote: > 4 years is quite a long time for such a bug. Maybe that's because > nobody uses OPTIMIZER_DEBUG. I certainly don't, and Tom mentions [1] > he doesn't either. I've used it perhaps once in the last 10 years, so removing it is OK by me.

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-09-28 Thread Michael Paquier
On Thu, Sep 28, 2023 at 04:23:42PM -0400, David Steele wrote: > After some playing around, I find I agree with Michael on this, i.e. require > at least standby.signal when a backup_label is present. > > According to my testing, you can preserve the "independent server" > functionality by setting

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-28 Thread Peter Smith
Some minor review comments for v4-0001: == src/backend/replication/logical/worker.c 1. + /* + * Exit if the owner of the subscription has changed from superuser to a + * non-superuser. + */ + if (!newsub->isownersuperuser && MySubscription->isownersuperuser) + { + if

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Tom Lane
I wrote: > Andres Freund writes: >> I think right now it doesn't work as-is on sonoma, because apple decided to >> change the option syntax, which is what causes the -e warning below, so the >> relevant option is just ignored. > Hmm, we'd better fix that then. Or is it their bug? It looks to

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Tom Lane
Andres Freund writes: > On 2023-09-28 16:46:08 -0400, Tom Lane wrote: >> Well, it's only important on platforms where we can't restrict >> libpq.so from exporting all symbols. I don't know how close we are >> to deciding that such cases are no longer interesting to worry about. >> Makefile.shlib

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Andres Freund
Hi, On 2023-09-28 16:46:08 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2023-09-27 16:52:44 -0400, Tom Lane wrote: > >> I think it doesn't, as long as all the relevant build targets > >> write their dependencies with "frontend_code" before "libpq". > > > Hm, that's not great. I don't

Re: Does anyone ever use OPTIMIZER_DEBUG?

2023-09-28 Thread Tom Lane
David Rowley writes: > In c4a1933b4 I pushed a fix for a 4 year old bug in print_path() where > I'd forgotten to add handling for TidRangePaths while working on > bb437f995. > 4 years is quite a long time for such a bug. Maybe that's because > nobody uses OPTIMIZER_DEBUG. I certainly don't, and

Re: On login trigger: take three

2023-09-28 Thread Alexander Korotkov
Hi, Daniel! On Mon, Sep 25, 2023 at 3:42 PM Daniel Gustafsson wrote: > > On 25 Sep 2023, at 11:13, Alexander Korotkov wrote: > > > I'd like to do a short summary of > > design issues on this thread. > > Thanks for summarizing this long thread! > > > the patch for the GUC option to disable > >

Does anyone ever use OPTIMIZER_DEBUG?

2023-09-28 Thread David Rowley
In c4a1933b4 I pushed a fix for a 4 year old bug in print_path() where I'd forgotten to add handling for TidRangePaths while working on bb437f995. 4 years is quite a long time for such a bug. Maybe that's because nobody uses OPTIMIZER_DEBUG. I certainly don't, and Tom mentions [1] he doesn't

The danger of deleting backup_label

2023-09-28 Thread David Steele
Hackers, While reading through [1] I saw there were two instances where backup_label was removed to achieve a "successful" restore. This might work on trivial test restores but is an invitation to (silent) disaster in a production environment where the checkpoint stored in backup_label is

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Tom Lane
Andres Freund writes: > On 2023-09-27 16:52:44 -0400, Tom Lane wrote: >> I think it doesn't, as long as all the relevant build targets >> write their dependencies with "frontend_code" before "libpq". > Hm, that's not great. I don't think that should be required. I'll try to take > a look at why

Re: Annoying build warnings from latest Apple toolchain

2023-09-28 Thread Andres Freund
Hi, On 2023-09-27 16:52:44 -0400, Tom Lane wrote: > I wrote: > > I've not yet looked at the meson build infrastructure to > > see if it needs a corresponding change. > > I think it doesn't, as long as all the relevant build targets > write their dependencies with "frontend_code" before "libpq".

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-09-28 Thread David Steele
On 9/27/23 23:58, Kyotaro Horiguchi wrote: At Fri, 10 Mar 2023 15:59:04 +0900, Michael Paquier wrote in My apologies for the long message, but this deserves some attention, IMHO. So, any thoughts? Sorry for being late. However, I agree with David's concern regarding the unnecessary

Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges

2023-09-28 Thread Tom Lane
Tommy Pavlicek writes: > I've attached a new version of the ALTER OPERATOR patch that allows > no-ops. It should be ready to review now. I got around to looking through this finally (sorry about the delay). I'm mostly on board with the functionality, with the exception that I don't see why we

Re: Is this a problem in GenericXLogFinish()?

2023-09-28 Thread Jeff Davis
On Wed, 2023-09-27 at 18:57 +0300, Heikki Linnakangas wrote: > We could define a new REGBUF_NO_CHANGE flag to signal that the buffer > is > registered just for locking purposes, and not actually modified by > the > WAL record. Out of curiosity I also added a trial assert (not intending to

Re: Index range search optimization

2023-09-28 Thread Alexander Korotkov
On Thu, Sep 28, 2023 at 5:21 AM Peter Geoghegan wrote: > On Wed, Sep 27, 2023 at 9:41 AM Alexander Korotkov > wrote: > > Fixed typo inficating => indicating as pointed by Pavel. > > Peter, what do you think about the current shape of the patch? > > I'll try to get to this tomorrow. I'm rather

Re: Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Tom Lane
Andrew Dunstan writes: > I wonder if we could have a boolean flag in pg_enum, indicating that > setting an enum to that value was forbidden. Yeah, but that still offers no coherent solution to the problem of what happens if there's a table that already contains such a value. It doesn't seem

Re: Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Andrew Dunstan
On 2023-09-28 Th 10:28, Tom Lane wrote: =?UTF-8?B?0JTQsNC90LjQuyDQodGC0L7Qu9C/0L7QstGB0LrQuNGF?= writes: I would like to offer my patch on the problem of removing values from enums It adds support for expression ALTER TYPE DROP VALUE This does not fix any of the hard problems that caused

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2023-09-28 Thread Justin Pryzby
On Thu, Dec 14, 2017 at 07:18:59PM +0700, Ali Akbar wrote: > By the way, should i add this patch to the current commitfest? The patch for pg_upgrade --check got forgotten 6 years ago, but it's a continuing problem (we hit it again which cost an hour during pg_upgrade) and ought to be (have been)

Re: wal recycling problem

2023-09-28 Thread Christoph Moench-Tegeder
## Fabrice Chapuis (fabrice636...@gmail.com): > We have a cluster of 2 members (1 primary and 1 standby) with Postgres > version 14.9 and 2 barman server, slots are only configured for barman, > barman is version 3.7. The obvious question here is: can both of those barmans keep up with your

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-28 Thread Jeff Davis
On Thu, 2023-09-28 at 11:34 -0400, Robert Haas wrote: > I guess it depends on whether we think this is a bug. I think you > could argue it either way. I'd suggest backporting to 16 unless there's some kind of difficulty. Otherwise we have a minor difference in behavior for no reason. Regards,

Re: bug: ANALYZE progress report with inheritance tables

2023-09-28 Thread Heikki Linnakangas
On 22/01/2023 18:23, Justin Pryzby wrote: pg_stat_progress_analyze was added in v13 (a166d408e). For tables with inheritance children, do_analyze_rel() and acquire_sample_rows() are called twice. The first time through, pgstat_progress_start_command() has memset() the progress array to zero.

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-28 Thread Robert Haas
On Wed, Sep 27, 2023 at 2:58 AM Amit Kapila wrote: > But OTOH, the owner of the subscription can be changed by the Alter > Subscription command whereas superuser status can't be changed. I > think we should consider changing the message for this case. The superuser status of the subscription

Re: Eliminate redundant tuple visibility check in vacuum

2023-09-28 Thread Robert Haas
On Thu, Sep 28, 2023 at 8:46 AM Melanie Plageman wrote: > Once I started writing the function comment, however, I felt a bit > awkward. In order to make the function available to both pruneheap.c > and vacuumlazy.c, I had to put it in a header file. Writing a > function, available to anyone

Re: Is it worth adding Assert(false) for unknown paths in print_path()?

2023-09-28 Thread David Rowley
On Fri, 29 Sept 2023 at 03:23, Tom Lane wrote: > FWIW, I'd argue for dropping print_path rather than continuing to > maintain it. I never use it, finding pprint() to serve the need > better and more reliably. Then perhaps we just need to open a thread with an appropriate subject to check if

Re: Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Tom Lane
=?UTF-8?B?0JTQsNC90LjQuyDQodGC0L7Qu9C/0L7QstGB0LrQuNGF?= writes: > I would like to offer my patch on the problem of removing values from enums > It adds support for expression ALTER TYPE DROP VALUE > This does not fix any of the hard problems that caused us not to have such a feature to begin

Re: Is it worth adding Assert(false) for unknown paths in print_path()?

2023-09-28 Thread Tom Lane
David Rowley writes: > In [1] Andrey highlighted that I'd forgotten to add print_path() > handling for TidRangePaths in bb437f995. > I know the OPTIMIZER_DEBUG code isn't exactly well used. I never > personally use it and I work quite a bit in the planner, however, if > we're keeping it, I

Re: Clarify where the severity level is defined

2023-09-28 Thread Kuwamura Masaki
> > Committed, with some minor wordsmithing. Thanks! > Thanks for tweaking and pushing, Daniel-san! Masaki Kuwamura

Re: Set enable_seqscan doesn't take effect?

2023-09-28 Thread Bruce Momjian
On Thu, Sep 28, 2023 at 03:38:28PM +0800, jacktby jacktby wrote: > > You start several threads a week, often clearly not having done much, if > > any, > > prior research. Often even sending the same question to multiple lists. It > > should not be hard to find an explanation for the behaviour you

Re: Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Vik Fearing
On 9/28/23 14:13, Данил Столповских wrote: Greetings, everyone! I would like to offer my patch on the problem of removing values from enums It adds support for expression ALTER TYPE DROP VALUE Added: 1. expression in grammar 2. function to drop enum values 3. regression tests 4.

pg_resetwal: Corrections around -c option

2023-09-28 Thread Peter Eisentraut
Branching off from [0], here is a for-discussion patch about some corrections for the pg_resetwal -c (--commit-timestamp-ids) option. First, in the documentation for finding a manual value for the -c option based on the files present in the data directory, it was missing a multiplier, like for

Re: Is it worth adding Assert(false) for unknown paths in print_path()?

2023-09-28 Thread Alvaro Herrera
On 2023-Sep-29, David Rowley wrote: > In [1] Andrey highlighted that I'd forgotten to add print_path() > handling for TidRangePaths in bb437f995. > > I know the OPTIMIZER_DEBUG code isn't exactly well used. I never > personally use it and I work quite a bit in the planner, however, if > we're

Re: Clarify where the severity level is defined

2023-09-28 Thread Daniel Gustafsson
> On 25 Sep 2023, at 08:37, Daniel Gustafsson wrote: > >> On 25 Sep 2023, at 08:22, Kuwamura Masaki >> wrote: > >> Recently I read the document about ereport()[1]. >> Then, I felt that there is little information about severity level. >> So I guess it can be kind to clarify where severity

Re: Synchronizing slots from primary to standby

2023-09-28 Thread Drouvot, Bertrand
Hi, On 9/25/23 6:10 AM, shveta malik wrote: On Fri, Sep 22, 2023 at 3:48 PM Amit Kapila wrote: On Thu, Sep 21, 2023 at 9:16 AM shveta malik wrote: On Tue, Sep 19, 2023 at 10:29 AM shveta malik wrote: Currently in patch001, synchronize_slot_names is a GUC on both primary and physical

Re: Eliminate redundant tuple visibility check in vacuum

2023-09-28 Thread Melanie Plageman
On Thu, Sep 21, 2023 at 3:53 PM Robert Haas wrote: > > On Wed, Sep 13, 2023 at 1:29 PM Andres Freund wrote: > > > > /* > > >* The criteria for counting a tuple as live in this block > > > need to > > > @@ -1682,7 +1664,7 @@ retry: > > >* (Cases

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Zhijie Hou (Fujitsu)
On Thursday, September 28, 2023 5:32 PM Bharath Rupireddy wrote: Hi, > > On Mon, Sep 25, 2023 at 4:31 PM Hayato Kuroda (Fujitsu) > wrote: > > > > > 4. > > > +/* > > > + * There is a possibility that following records may be generated > > > + * during the upgrade. > >

Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag

2023-09-28 Thread Drouvot, Bertrand
Hi hackers, Please find attached a patch proposal to $SUBJECT. This patch allows the role provided in BackgroundWorkerInitializeConnection() and BackgroundWorkerInitializeConnectionByOid() to lack login authorization. In InitPostgres(), in case of a background worker, authentication is not

Allow deleting enumerated values from an existing enumerated data type

2023-09-28 Thread Данил Столповских
Greetings, everyone! I would like to offer my patch on the problem of removing values from enums It adds support for expression ALTER TYPE DROP VALUE Added: 1. expression in grammar 2. function to drop enum values 3. regression tests 4. documentation Subject: [PATCH] Add DROP VALUE for ALTER

Re: Out of memory error handling in frontend code

2023-09-28 Thread Daniel Gustafsson
> On 28 Sep 2023, at 10:14, Frédéric Yhuel wrote: > After some time, we understood that the 20 million of large objects were > responsible for the huge memory usage (more than 10 GB) by pg_dump. This sounds like a known issue [0] which has been reported several times, and one we should get

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-28 Thread Ranier Vilela
Em qua., 27 de set. de 2023 às 22:28, David Rowley escreveu: > On Thu, 28 Sept 2023 at 02:37, Ranier Vilela wrote: > >> Please check [1] for the mention of: > >> > >> "The fastest way to get your patch rejected is to make unrelated > >> changes. Reformatting lines that haven't changed, changing

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-28 Thread vignesh C
On Wed, 27 Sept 2023 at 12:28, Amit Kapila wrote: > > On Wed, Sep 27, 2023 at 6:58 AM Peter Smith wrote: > > > > On Tue, Sep 26, 2023 at 11:57 PM vignesh C wrote: > > > > > > On Tue, 26 Sept 2023 at 13:03, Peter Smith wrote: > > > > > > > > Here are some comments for patch v2-0001. > > > > > >

Is it worth adding Assert(false) for unknown paths in print_path()?

2023-09-28 Thread David Rowley
In [1] Andrey highlighted that I'd forgotten to add print_path() handling for TidRangePaths in bb437f995. I know the OPTIMIZER_DEBUG code isn't exactly well used. I never personally use it and I work quite a bit in the planner, however, if we're keeping it, I thought maybe we might get the memo

wal recycling problem

2023-09-28 Thread Fabrice Chapuis
Hello, I have a question about the automatic removal of unused WAL files. When loading data with pg_restore (200Gb) we noticed that a lot of WALs files are generated and they are not purged automatically nor recycled despite frequent checkpoints, then pg_wal folder (150Gb) fill and become out of

Re: remaining sql/json patches

2023-09-28 Thread Alvaro Herrera
On 2023-Sep-27, Amit Langote wrote: > Maybe the following is better: > > + /* > +* For expression nodes that support soft errors. Should be set to NULL > +* before calling ExecInitExprRec() if the caller wants errors thrown. > +*/ > > ...as in the attached. That's good. >

Re: trying again to get incremental backup

2023-09-28 Thread Jakub Wartak
On Wed, Aug 30, 2023 at 4:50 PM Robert Haas wrote: [..] I've played a little bit more this second batch of patches on e8d74ad625f7344f6b715254d3869663c1569a51 @ 31Aug (days before wait events refactor): test_across_wallevelminimal.sh test_many_incrementals_dbcreate.sh test_many_incrementals.sh

Re: Latches vs lwlock contention

2023-09-28 Thread Heikki Linnakangas
On 28/10/2022 06:56, Thomas Munro wrote: One example is heavyweight lock wakeups. If you run BEGIN; LOCK TABLE t; ... and then N other sessions wait in SELECT * FROM t;, and then you run ... COMMIT;, you'll see the first session wake all the others while it still holds the partition lock

Re: [PATCH] Add inline comments to the pg_hba_file_rules view

2023-09-28 Thread Jim Jones
Hi Daniel On 27.09.23 10:21, Daniel Gustafsson wrote: An annotation syntax specifically for this would address my concern, but the argument that pg_hba (and related code) is border-line too complicated as it is does hold some water. Complexity in code can lead to bugs, but complexity in

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Bharath Rupireddy
On Mon, Sep 25, 2023 at 4:31 PM Hayato Kuroda (Fujitsu) wrote: > > > 4. > > +/* > > + * There is a possibility that following records may be generated > > + * during the upgrade. > > + */ > > +is_valid = is_xlog_record_type(rmid, info, RM_XLOG_ID, > >

Re: Questions about the new subscription parameter: password_required

2023-09-28 Thread Benoit Lobréau
On 9/26/23 19:00, Jeff Davis wrote: + If the ownership of a subscription with password_required=true + is transferred to a non-superuser, they will gain full control over the subscription + but will not be able to modify it's connection string. I think you mean false, right?

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Amit Kapila
On Thu, Sep 28, 2023 at 2:22 PM Bharath Rupireddy wrote: > > On Fri, Sep 22, 2023 at 9:40 AM Michael Paquier wrote: > > > > On Thu, Sep 21, 2023 at 01:50:28PM +0530, Amit Kapila wrote: > > > We have discussed this point. Normally, we don't have such options in > > > upgrade, so we were hesitent

Re: pg_stat_get_activity(): integer overflow due to (int) * (int) for MemoryContextAllocHuge()

2023-09-28 Thread Jakub Wartak
On Thu, Sep 28, 2023 at 12:53 AM Michael Paquier wrote: > > On Wed, Sep 27, 2023 at 10:29:25AM -0700, Andres Freund wrote: > > I don't think going for size_t is a viable path for fixing this. I'm pretty > > sure the initial patch would trigger a type mismatch from guc_tables.c - we > > don't have

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Amit Kapila
On Thu, Sep 28, 2023 at 1:24 PM Bharath Rupireddy wrote: > > On Thu, Sep 28, 2023 at 1:06 PM Amit Kapila wrote: > > > > On Thu, Sep 28, 2023 at 10:44 AM Bharath Rupireddy > > wrote: > > > > > > > No, without that commit, there is a very high possibility that even if > > > > we have sent the WAL

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Bharath Rupireddy
On Fri, Sep 22, 2023 at 9:40 AM Michael Paquier wrote: > > On Thu, Sep 21, 2023 at 01:50:28PM +0530, Amit Kapila wrote: > > We have discussed this point. Normally, we don't have such options in > > upgrade, so we were hesitent to add a new one for this but there is a > > discussion to add an

Out of memory error handling in frontend code

2023-09-28 Thread Frédéric Yhuel
Hello, One of our customers recently complained that his pg_dump stopped abruptly with the message "out of memory". After some time, we understood that the 20 million of large objects were responsible for the huge memory usage (more than 10 GB) by pg_dump. I think a more useful error

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Bharath Rupireddy
On Thu, Sep 28, 2023 at 1:06 PM Amit Kapila wrote: > > On Thu, Sep 28, 2023 at 10:44 AM Bharath Rupireddy > wrote: > > > > > No, without that commit, there is a very high possibility that even if > > > we have sent the WAL to the subscriber and got the acknowledgment of > > > the same, we would

initdb's -c option behaves wrong way?

2023-09-28 Thread Kyotaro Horiguchi
Hello. I noticed that -c option of initdb behaves in an unexpected manner. Identical variable names with variations in letter casing are treated as distinct variables. $ initdb -cwork_mem=100 -cWORK_MEM=1000 -cWork_mem=2000 ... $ grep -i 'work_mem ' $PGDATA/postgresql.conf work_mem = 100

Re: Set enable_seqscan doesn't take effect?

2023-09-28 Thread jacktby jacktby
> 2023年9月28日 12:26,David G. Johnston 写道: > > On Wednesday, September 27, 2023, jacktby jacktby > wrote: >> postgres=# SET enable_seqscan = off; >> SET >> postgres=# explain select * from t; >>QUERY PLAN

Re: Set enable_seqscan doesn't take effect?

2023-09-28 Thread jacktby jacktby
> 2023年9月28日 01:07,Andres Freund 写道: > > Hi, > > On 2023-09-28 00:37:41 +0800, jacktby jacktby wrote: >> postgres=# SET enable_seqscan = off; >> SET >> postgres=# explain select * from t; >> QUERY PLAN >>

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-28 Thread Amit Kapila
On Thu, Sep 28, 2023 at 10:44 AM Bharath Rupireddy wrote: > > On Mon, Sep 25, 2023 at 2:06 PM Amit Kapila wrote: > > > > > > [1] > > > > https://www.postgresql.org/message-id/CAA4eK1%2BLtWDKXvxS7gnJ562VX%2Bs3C6%2B0uQWamqu%3DUuD8hMfORg%40mail.gmail.com > > > > > > I see. IIUC, without that

Re: Jumble the CALL command in pg_stat_statements

2023-09-28 Thread Michael Paquier
On Wed, Sep 13, 2023 at 11:09:19PM +, Imseih (AWS), Sami wrote: > I do have a patch for this with test cases, > 0001-v1-Jumble-the-SET-command.patch > If you feel this needs a separate discussion I can start one. Agreed tha tthis should have its own thread with a proper subject. > In the

Re: Partial aggregates pushdown

2023-09-28 Thread Alexander Pyhalov
fujii.y...@df.mitsubishielectric.co.jp писал 2023-09-28 07:40: I'm not sure that I like this mechanics of adding sort group clauses - it seems we do in core additional work, which is of use only for one extension, but at least it seems to be working. We cannot deparse the original sort group