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

2023-07-16 Thread Amit Kapila
On Thu, Jun 8, 2023 at 9:24 AM Hayato Kuroda (Fujitsu) wrote: > Few comments/questions 1. +check_for_parameter_settings(ClusterInfo *new_cluster) { ... + + res = executeQueryOrDie(conn, "SHOW max_replication_slots;"); + max_replication_slots = atoi(PQgetvalue(res, 0, 0)); +

Re: remaining sql/json patches

2023-07-16 Thread jian he
hi. seems there is no explanation about, json_api_common_syntax in functions-json.html I can get json_query full synopsis from functions-json.html as follows: json_query ( context_item, path_expression [ PASSING { value AS varname } [, ...]] [ RETURNING data_type [ FORMAT JSON [ ENCODING UTF8 ] ]

Re: Inefficiency in parallel pg_restore with many tables

2023-07-16 Thread Nathan Bossart
On Sun, Jul 16, 2023 at 09:45:54AM -0400, Tom Lane wrote: > Actually, as long as we're talking about approximately-correct behavior: > let's make the ready_list be a priority heap, and then just make > pop_next_work_item scan forward from the array start until it finds an > item that's runnable

Re: unrecognized node type while displaying a Path due to dangling pointer

2023-07-16 Thread Tom Lane
David Rowley writes: > On Wed, 12 Jul 2023 at 14:50, David Rowley wrote: >> On Wed, 12 Jul 2023 at 14:23, Tom Lane wrote: >>> I did think about that, but "shallow copy a Path" seems nontrivial >>> because the Path structs are all different sizes. Maybe it is worth >>> building some

Re: unrecognized node type while displaying a Path due to dangling pointer

2023-07-16 Thread David Rowley
On Wed, 12 Jul 2023 at 14:50, David Rowley wrote: > > On Wed, 12 Jul 2023 at 14:23, Tom Lane wrote: > > I did think about that, but "shallow copy a Path" seems nontrivial > > because the Path structs are all different sizes. Maybe it is worth > > building some infrastructure to support that? >

Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-16 Thread Peter Smith
On Sat, Jul 15, 2023 at 2:10 PM Amit Kapila wrote: > > On Fri, Jul 14, 2023 at 2:15 PM Hayato Kuroda (Fujitsu) > wrote: > > > > > > I think it's appropriate to add on the restrictions page. (But > > > > mentioning that this > > > restriction is only for subscriber) > > > > > > > > If the list

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2023-07-16 Thread Justin Pryzby
On Thu, Jun 01, 2023 at 08:50:50AM -0400, Michael Paquier wrote: > >> Speaking of which, ATExecSetAccessMethodNoStorage() does a catalog > >> update even if ALTER TABLE is defined to use the same table AM as what > >> is currently set. There is no need to update the relation's pg_class > >> entry

Re: logicalrep_message_type throws an error

2023-07-16 Thread Amit Kapila
On Sat, Jul 15, 2023 at 7:16 PM Euler Taveira wrote: > > On Sat, Jul 15, 2023, at 4:27 AM, Amit Kapila wrote: > > Do you have something like attached in mind? > > > WFM. I would change the comment that says > > This function is called to provide context in the error ... > > to > > This message

Re: Improve heapgetpage() performance, overhead from serializable

2023-07-16 Thread Zhang Mingli
Hi, Regards, Zhang Mingli On Jul 16, 2023 at 09:57 +0800, Andres Freund , wrote: > Hi, > > Several loops which are important for query performance, like heapgetpage()'s > loop over all tuples, have to call functions like > HeapCheckForSerializableConflictOut() and PredicateLockTID() in every >

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

2023-07-16 Thread Michael Paquier
On Fri, Jul 14, 2023 at 01:32:49PM -0700, David Zhang wrote: > I believe before users can make a backup using pg_basebackup and then start > the backup as an independent Primary server for whatever reasons. Now, if > this is still allowed, then users need to be aware that the backup_label > must

Re: Autogenerate some wait events code and documentation

2023-07-16 Thread Michael Paquier
On Sun, Jul 16, 2023 at 12:21:20PM -0700, Andres Freund wrote: > I think the search issue is valid, so I do think going the other way is > preferrable. I.e. use just the enum value in the .txt and generate the camel > case name from that. That allows you to search the define used in code and >

Re: Changing types of block and chunk sizes in memory contexts

2023-07-16 Thread David Rowley
On Fri, 14 Jul 2023 at 18:53, Melih Mutlu wrote: > David Rowley , 13 Tem 2023 Per, 08:04 tarihinde şunu > yazdı: >> >> I looked at your v2 patch. The only thing that really looked wrong >> were the (Size) casts in the context creation functions. These should >> have been casts to uint32 rather

Re: Permute underscore separated components of columns before fuzzy matching

2023-07-16 Thread Arne Roland
Hello Mikhail, I'm sorry. Please try attached patch instead. Thank you for having a look! Regards Arne From: Mikhail Gribkov Sent: Thursday, July 6, 2023 13:31 To: Arne Roland Cc: Pg Hackers Subject: Re: Permute underscore separated components of columns

Re: Use of additional index columns in rows filtering

2023-07-16 Thread Tomas Vondra
On 7/15/23 16:20, Tomas Vondra wrote: > > ... > > 4) problems with opcintype != opckeytype (name_ops) > > While running the tests, I ran into an issue with name_ops, causing > failures for \dT and other catalog queries. The root cause is that > name_ops has opcintype = name, but opckeytype =

Re: Autogenerate some wait events code and documentation

2023-07-16 Thread Andres Freund
Hi, On 2023-07-14 13:49:22 +0900, Michael Paquier wrote: > I have looked again at 0001 and 0002 and applied them to get them out > of the way. 0003 and 0004 are rebased and attached. I'll add them to > the CF for later consideration. More opinions are welcome. > From

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

2023-07-16 Thread Alena Rybakina
Hi, I'm still working on it, but, unfortunately, I didn't have much time to work with it well enough that there would be something that could be shown. Now I am trying to sort out the problems that I drew attention to in the previous letter. -- Regards, Alena Rybakina Postgres Professional

Re: Inefficiency in parallel pg_restore with many tables

2023-07-16 Thread Tom Lane
Andrew Dunstan writes: > On 2023-07-15 Sa 13:47, Tom Lane wrote: >> I wonder if we could replace the sorted ready-list with a priority heap, >> although that might be complicated by the fact that pop_next_work_item >> has to be capable of popping something that's not necessarily the >> largest

Re: Inefficiency in parallel pg_restore with many tables

2023-07-16 Thread Andrew Dunstan
On 2023-07-15 Sa 13:47, Tom Lane wrote: I looked into the performance gripe at [1] about pg_restore not making effective use of parallel workers when there are a lot of tables. I was able to reproduce that by dumping and parallel restoring 100K tables made according to this script: do $$ begin

Re: Should we remove db_user_namespace?

2023-07-16 Thread Magnus Hagander
On Sat, Jul 15, 2023 at 1:34 AM Nathan Bossart wrote: > > On Mon, Jul 10, 2023 at 03:43:07PM +0900, Michael Paquier wrote: > > On Wed, Jul 05, 2023 at 08:49:26PM -0700, Nathan Bossart wrote: > >> On Thu, Jul 06, 2023 at 08:21:18AM +0900, Michael Paquier wrote: > >>> Removing the GUC from this

Getting rid of OverrideSearhPath in namespace.c

2023-07-16 Thread Alexander Lakhin
Hello hackers, As a follow-up for the CVE-2023-2454 fix, I think that it makes sense to completely remove unsafe functions PushOverrideSearchPath()/PopOverrideSearchPath(), which are not used in the core now. Please look at the patch attached. Beside that, maybe it's worth to rename three