Re: Force streaming every change in logical decoding

2022-12-21 Thread Peter Smith
Here are some review comments for patch v2. Since the GUC is still under design maybe these comments can be ignored for now, but I guess similar comments will apply in future anyhow (just with some name changes). == 1. Commit message Add a new GUC force_stream_mode, when it is set on, send

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-12-21 Thread Masahiko Sawada
On Tue, Dec 20, 2022 at 3:09 PM John Naylor wrote: > > > On Mon, Dec 19, 2022 at 2:14 PM Masahiko Sawada wrote: > > > > On Tue, Dec 13, 2022 at 1:04 AM Masahiko Sawada > > wrote: > > > > Looking at other code using DSA such as tidbitmap.c and nodeHash.c, it > > > seems that they look at only me

Re: [PATCH] random_normal function

2022-12-21 Thread Vik Fearing
On 12/19/22 04:36, Michael Paquier wrote: On Sat, Dec 17, 2022 at 05:49:15PM +0100, Fabien COELHO wrote: Overall, I think that there should be a clearer discussion and plan about which random functionS postgres should provide to complement the standard instead of going there… randomly:-) So, w

Re: Force streaming every change in logical decoding

2022-12-21 Thread Peter Smith
On Wed, Dec 21, 2022 at 6:22 PM Masahiko Sawada wrote: > > On Tue, Dec 20, 2022 at 7:49 PM Amit Kapila wrote: > > > > On Tue, Dec 20, 2022 at 2:46 PM Hayato Kuroda (Fujitsu) > > wrote: > > > > > > Dear hackers, > > > > > > > We have discussed three different ways to provide GUC for these > > > >

Re: Force streaming every change in logical decoding

2022-12-21 Thread Amit Kapila
On Wed, Dec 21, 2022 at 1:55 PM Peter Smith wrote: > > On Wed, Dec 21, 2022 at 6:22 PM Masahiko Sawada wrote: > > > > On Tue, Dec 20, 2022 at 7:49 PM Amit Kapila wrote: > > > > > > On Tue, Dec 20, 2022 at 2:46 PM Hayato Kuroda (Fujitsu) > > > wrote: > > > > > > > > Dear hackers, > > > > > > > >

Re: pgsql: Doc: Explain about Column List feature.

2022-12-21 Thread Peter Smith
On Wed, Dec 21, 2022 at 6:59 PM Alvaro Herrera wrote: > > On 2022-Dec-21, Peter Smith wrote: > > > By "searching" I also meant just scanning visually, although I was > > thinking more about scanning the PDF. > > > > Right now, the intention of any text box is obvious at a glance > > because of tho

Re: Minimal logical decoding on standbys

2022-12-21 Thread Drouvot, Bertrand
Hi, On 12/20/22 10:41 PM, Robert Haas wrote: On Tue, Dec 20, 2022 at 3:39 PM Robert Haas wrote: I think this might be the only WAL record type where there's a problem, but I haven't fully confirmed that yet. It's not. GIST has the same issue. The same test case demonstrates the problem there

RE: Force streaming every change in logical decoding

2022-12-21 Thread Hayato Kuroda (Fujitsu)
Dear Shveta, other hackers > Going with ' logical_decoding_work_mem' seems a reasonable solution, but > since we are mixing > the functionality of developer and production GUC, there is a slight risk > that customer/DBAs may end > up setting it to 0 and forget about it and thus hampering system'

Re: generic plans and "initial" pruning

2022-12-21 Thread Alvaro Herrera
This version of the patch looks not entirely unreasonable to me. I'll set this as Ready for Committer in case David or Tom or someone else want to have a look and potentially commit it. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

Re: daitch_mokotoff module

2022-12-21 Thread Dag Lem
Hi Andreas, Thank you for your detailed and constructive review! I have made a conscientuous effort to address all the issues you point out, please see comments below. Andres Freund writes: > Hi, > > On 2022-02-03 15:27:32 +0100, Dag Lem wrote: [...] > [23:43:34.796] contrib/fuzzystrmatch/me

Re: generic plans and "initial" pruning

2022-12-21 Thread Amit Langote
On Wed, Dec 21, 2022 at 7:18 PM Alvaro Herrera wrote: > This version of the patch looks not entirely unreasonable to me. I'll > set this as Ready for Committer in case David or Tom or someone else > want to have a look and potentially commit it. Thank you, Alvaro. -- Thanks, Amit Langote EDB:

Re: Inconsistency in reporting checkpointer stats

2022-12-21 Thread Bharath Rupireddy
On Tue, Dec 20, 2022 at 11:08 PM Andres Freund wrote: > > On 2022-12-20 08:18:36 -0500, Robert Haas wrote: > > I think that the SLRU information is potentially useful, but mixing it > > with the information about regular buffers just seems confusing. > > +1 > > At least for now, it'd be different

Re: Inconsistency in reporting checkpointer stats

2022-12-21 Thread Nitin Jadhav
Thanks Robert and Andres for sharing your thoughts. I have modified the code accordingly and attached the new version of patches. patch 0001 fixes the inconsistency in checkpointer stats and patch 0002 separates main buffer and SLRU buffer count from checkpoint complete log message. In 0001, I add

Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL

2022-12-21 Thread Bharath Rupireddy
On Fri, Dec 16, 2022 at 4:47 AM David Christensen wrote: > > On Thu, Dec 15, 2022 at 12:36 AM Michael Paquier wrote: > > > > On Wed, Dec 14, 2022 at 04:44:34PM -0600, David Christensen wrote: > > > I can get one sent in tomorrow. > > This v10 should incorporate your feedback as well as Bharath's.

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-21 Thread Amit Kapila
On Wed, Dec 21, 2022 at 11:02 AM houzj.f...@fujitsu.com wrote: > > > Attach the new patch set which also includes some > cosmetic comment changes. > I noticed one problem with the recent change in the patch. + * The fileset state should become FS_SERIALIZE_DONE once we have waited + * for a lock

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

2022-12-21 Thread Amit Kapila
On Tue, Dec 20, 2022 at 8:14 PM Melih Mutlu wrote: > > Amit Kapila , 16 Ara 2022 Cum, 05:46 tarihinde şunu > yazdı: >> >> Right, but when the size is 100MB, it seems to be taking a bit more >> time. Do we want to evaluate with different sizes to see how it looks? >> Other than that all the number

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2022-12-21 Thread Tomas Vondra
On 12/15/22 17:46, Tom Lane wrote: > James Finnerty writes: >> This patch looks good to me. I have two very minor nits: The inflation >> of the sample size by 10% is arbitrary but it doesn't seem unreasonable >> or concerning. It just makes me curious if there are any known cases >> that motivat

RE: Force streaming every change in logical decoding

2022-12-21 Thread shiy.f...@fujitsu.com
On Wed, Dec 21, 2022 4:54 PM Amit Kapila wrote: > > On Wed, Dec 21, 2022 at 1:55 PM Peter Smith > wrote: > > > > On Wed, Dec 21, 2022 at 6:22 PM Masahiko Sawada > wrote: > > > > > > On Tue, Dec 20, 2022 at 7:49 PM Amit Kapila > wrote: > > > > > > > > On Tue, Dec 20, 2022 at 2:46 PM Hayato Kuro

RE: Force streaming every change in logical decoding

2022-12-21 Thread shiy.f...@fujitsu.com
On Wed, Dec 21, 2022 4:05 PM Peter Smith wrote: > > Here are some review comments for patch v2. > > Since the GUC is still under design maybe these comments can be > ignored for now, but I guess similar comments will apply in future > anyhow (just with some name changes). > Thanks for your com

Re: Force streaming every change in logical decoding

2022-12-21 Thread Masahiko Sawada
On Wed, Dec 21, 2022 at 10:14 PM shiy.f...@fujitsu.com wrote: > > On Wed, Dec 21, 2022 4:54 PM Amit Kapila wrote: > > > > On Wed, Dec 21, 2022 at 1:55 PM Peter Smith > > wrote: > > > > > > On Wed, Dec 21, 2022 at 6:22 PM Masahiko Sawada > > wrote: > > > > > > > > On Tue, Dec 20, 2022 at 7:49 PM

float4in_internal

2022-12-21 Thread Andrew Dunstan
The attached patch factors out the guts of float4in so that the new float4in_internal function is callable without going through the fmgr call sequence. This will make adjusting the seg module's input function to handle soft errors simpler. A similar operation was done for float8in some years ago i

Re: generic plans and "initial" pruning

2022-12-21 Thread Tom Lane
Alvaro Herrera writes: > This version of the patch looks not entirely unreasonable to me. I'll > set this as Ready for Committer in case David or Tom or someone else > want to have a look and potentially commit it. I will have a look during the January CF. regards, tom l

Re: float4in_internal

2022-12-21 Thread Tom Lane
Andrew Dunstan writes: > The attached patch factors out the guts of float4in so that the new > float4in_internal function is callable without going through the fmgr > call sequence. This will make adjusting the seg module's input function > to handle soft errors simpler. A similar operation was do

Re: Array initialisation notation in syscache.c

2022-12-21 Thread Peter Eisentraut
On 21.12.22 04:16, Thomas Munro wrote: On Wed, Dec 21, 2022 at 1:33 PM Thomas Munro wrote: KEY(Anum_pg_attribute_attrelid, Anum_pg_attribute_attnum), I independently rediscovered that our VA_ARGS_NARGS() macro in c.h always returns 1 on MSVC via trial-by-CI. Derp. Here

Get access to the whole query in CustomScan path callback

2022-12-21 Thread Amin
Hi, The goal is to have access to all the tables that are being scanned or will be scanned as a part of the query. Basically, the callback looks like this: typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root, RelOptInfo *rel,

Re: meson and tmp_install

2022-12-21 Thread Nikita Malakhov
Hi! That's great, thanks! Discussion list is very long so I've missed this topic. Just a suggestion - I've checked the link above, maybe there should be added a small part on where build files are located and how to add new sources for successful build? On Tue, Dec 20, 2022 at 9:22 PM Andres Freu

Re: Get access to the whole query in CustomScan path callback

2022-12-21 Thread Tom Lane
Amin writes: > The goal is to have access to all the tables that are being scanned or will > be scanned as a part of the query. Basically, the callback looks like this: > typedef void (*set_rel_pathlist_hook_type) (PlannerInfo *root, > RelOptInfo *rel,

Re: Small miscellaneus fixes (Part II)

2022-12-21 Thread Ranier Vilela
Thanks for looking at this. Em ter., 20 de dez. de 2022 às 21:51, Justin Pryzby escreveu: > On Fri, Nov 25, 2022 at 06:27:04PM -0300, Ranier Vilela wrote: > > 5. Use boolean operator with boolean operands > > (b/src/backend/commands/tablecmds.c) > > tablecmds.c: right. Since 074c5cfbf > > pg_du

Re: Array initialisation notation in syscache.c

2022-12-21 Thread Nikita Malakhov
Hi! Wanted to ask this since I encountered a need for a cache with 5 keys - why is the syscache index still limited to 4 keys? Thanks! On Wed, Dec 21, 2022 at 7:36 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 21.12.22 04:16, Thomas Munro wrote: > > On Wed, Dec 21, 2022 a

Re: dynamic result sets support in extended query protocol

2022-12-21 Thread Alvaro Herrera
On 2022-Nov-22, Peter Eisentraut wrote: > I added tests using the new psql \bind command to test this functionality in > the extended query protocol, which showed that this got broken since I first > wrote this patch. This "blame" is on the pipeline mode in libpq patch > (acb7e4eb6b1c614c68a62fb3

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

2022-12-21 Thread Justin Pryzby
Alvaro could you comment on this ?

Re: Array initialisation notation in syscache.c

2022-12-21 Thread Tom Lane
Nikita Malakhov writes: > Wanted to ask this since I encountered a need for a cache with 5 keys - > why is the syscache index still limited to 4 keys? Because there are no cases requiring 5, so far. (A unique index with as many as 5 keys seems a bit fishy btw.) regards,

Re: assertion failures on BuildFarm that happened in slab.c

2022-12-21 Thread David Rowley
On Wed, 21 Dec 2022 at 16:28, Takamichi Osumi (Fujitsu) wrote: > TRAP: failed Assert("dlist_is_empty(blocklist)"), File: "slab.c", Line: 564, > PID: 16148 > I'm not sure, but this could be related to a recent commit (d21ded75fd) in > [4]. It was. I've just pushed a fix. Thanks for highlightin

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-21 Thread Magnus Hagander
On Wed, Dec 21, 2022 at 1:09 AM Michael Paquier wrote: > On Tue, Dec 20, 2022 at 06:04:40PM +0530, Bharath Rupireddy wrote: > > On Tue, Dec 20, 2022 at 1:27 PM Magnus Hagander > wrote: > >> Caught this thread late. To me, pg_dissect_walfile_name() is a > >> really strange name for a function. Gr

postgres_fdw planning issue: EquivalenceClass changes confuse it

2022-12-21 Thread Tom Lane
I discovered that if you do this: diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 2e6f7f4852..2ae231fd90 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -366,7 +366,7 @@ CREATE FUNCT

Re: float4in_internal

2022-12-21 Thread Andrew Dunstan
On 2022-12-21 We 10:33, Tom Lane wrote: > Andrew Dunstan writes: >> The attached patch factors out the guts of float4in so that the new >> float4in_internal function is callable without going through the fmgr >> call sequence. This will make adjusting the seg module's input function >> to handle

Re: psql tab-complete

2022-12-21 Thread Thomas Munro
On Sat, Oct 26, 2019 at 4:59 PM Michael Paquier wrote: > On Fri, Oct 25, 2019 at 11:57:18AM +0300, Victor Spirin wrote: > > This patch resolved one problem in the tab-complete.c on MSVC. The > > VA_ARGS_NARGS macros now work correctly on Windows. > > Can you explain why and in what the use of EXPA

Re: psql tab-complete

2022-12-21 Thread Tom Lane
Thomas Munro writes: > Since I really want to be able to use VA_ARGS_NARGS() elsewhere, +1, that'd be handy. > ... Assuming those switches actually work as claimed, I see > two choices: commit this hack with a comment reminding us to clean it > up later, or drop 2015. As long as we can hide the

Re: Error-safe user functions

2022-12-21 Thread Andrew Dunstan
On 2022-12-18 Su 09:42, Andrew Dunstan wrote: > On 2022-12-14 We 17:37, Tom Lane wrote: >> Andrew Dunstan writes: >>> Thanks, I have been looking at jsonpath, but I'm not quite sure how to >>> get the escontext argument to the yyerror calls in jsonath_scan.l. Maybe >>> I need to specify a lex-par

Re: Avoid lost result of recursion (src/backend/optimizer/util/inherit.c)

2022-12-21 Thread Ranier Vilela
Thanks David, for looking at this. Em ter., 20 de dez. de 2022 às 22:45, David Rowley escreveu: > On Wed, 21 Dec 2022 at 13:15, Ranier Vilela wrote: > > IMO, I think that commit a61b1f7, has an oversight. > > Currently is losing the result of recursion of function > translate_col_privs_multilev

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-21 Thread Jeff Davis
On Tue, 2022-12-20 at 21:26 -0800, Peter Geoghegan wrote: > When freeze_required is set to true, that means that lazy_scan_prune > literally has no choice -- it simply must freeze the page as > instructed by heap_prepare_freeze_tuple/FreezeMultiXactId. It's not > just a strong suggestion -- it's cr

Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment

2022-12-21 Thread David Rowley
On Wed, 16 Nov 2022 at 23:56, David Rowley wrote: > I've attached an updated patch. The 0002 is just intended to exercise > these allocations a little bit, it's not intended for commit. I was > using that to ensure valgrind does not complain about anything. It > seems happy now. After making so

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-21 Thread Peter Geoghegan
On Wed, Dec 21, 2022 at 4:30 PM Jeff Davis wrote: > The confusing thing to me is perhaps just the name -- to me, > "freeze_required" suggests that if it were set to true, it would cause > freezing to happen. But as far as I can tell, it does not cause > freezing to happen, it causes some other thi

Re: Optimization issue of branching UNION ALL

2022-12-21 Thread Tom Lane
Andrey Lepikhov writes: > Complaint is about auto-generated query with 1E4 simple union all's (see > t.sh to generate a demo script). The reason: in REL_11_STABLE it is > planned and executed in a second, but REL_12_STABLE and beyond makes > matters worse: planning of such a query needs tons of

Re: Direct I/O

2022-12-21 Thread Thomas Munro
On Wed, Dec 14, 2022 at 5:48 PM Thomas Munro wrote: > 0001 -- David's palloc_aligned() patch > https://commitfest.postgresql.org/41/3999/ > 0002 -- I/O-align almost all buffers used for I/O > 0003 -- Add the GUCs > 0004 -- Throwaway hack to make cfbot turn the GUCs on David pushed the first as c

Re: psql tab-complete

2022-12-21 Thread Michael Paquier
On Wed, Dec 21, 2022 at 05:56:05PM -0500, Tom Lane wrote: > Thomas Munro writes: >> Since I really want to be able to use VA_ARGS_NARGS() elsewhere, > > +1, that'd be handy. > >> ... Assuming those switches actually work as claimed, I see >> two choices: commit this hack with a comment reminding

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-21 Thread Michael Paquier
On Wed, Dec 21, 2022 at 10:22:02PM +0100, Magnus Hagander wrote: > Basically, we take one thing and turn it into 3. That very naturally rings > with "split" to me. > > Parse might work as well, certainly better than dissect. I'd still prefer > split though. Honestly, I don't have any counter-argu

Re: Inconsistency in reporting checkpointer stats

2022-12-21 Thread Kyotaro Horiguchi
At Mon, 19 Dec 2022 18:05:38 +0530, Bharath Rupireddy wrote in > On Fri, Dec 16, 2022 at 2:14 PM Kyotaro Horiguchi > wrote: > > > > In the first place I don't like that we count the same things twice. > > Couldn't we count the number only by any one of them? > > > > If we remove CheckPointerSta

Re: Optimization issue of branching UNION ALL

2022-12-21 Thread Richard Guo
On Thu, Dec 22, 2022 at 9:50 AM Tom Lane wrote: > Andrey Lepikhov writes: > > Superficial study revealed possibly unnecessary operations that could be > > avoided: > > 1. Walking across a query by calling substitute_phv_relids() even if > > lastPHId shows that no one phv is presented. > > Yeah,

Re: [PATCH] random_normal function

2022-12-21 Thread Michael Paquier
On Wed, Dec 21, 2022 at 08:47:32AM +0100, Fabien COELHO wrote: > From a typical use case point of view, I'd say uniform, normal and > exponential would make sense for floats. I'm also okay with generating a > uniform bytes pseudo-randomly. I'd agree with this set. > I'd be more at ease to add sim

Re: Inconsistency in reporting checkpointer stats

2022-12-21 Thread Kyotaro Horiguchi
At Wed, 21 Dec 2022 17:14:12 +0530, Nitin Jadhav wrote in > [1]: > 2022-12-21 10:52:25.931 UTC [63530] LOG: checkpoint complete: wrote > 4670 buffers (28.5%), wrote 3 slru buffers (0.0%); 0 WAL file(s) > added, 0 removed, 4 recycled; write=0.045 s, sync=0.161 s, total=0.244 > s; sync files=25,

Re: Optimization issue of branching UNION ALL

2022-12-21 Thread Tom Lane
Richard Guo writes: > I noticed we also check 'parse->hasSubLinks' when we fix PHVs and > AppendRelInfos in pull_up_simple_subquery. I'm not sure why we have > this check. It seems not necessary. Yeah, I was wondering about that too ... maybe it was important in some previous state of the code?

Re: Optimization issue of branching UNION ALL

2022-12-21 Thread Tom Lane
I wrote: > Richard Guo writes: >> I noticed we also check 'parse->hasSubLinks' when we fix PHVs and >> AppendRelInfos in pull_up_simple_subquery. I'm not sure why we have >> this check. It seems not necessary. > Yeah, I was wondering about that too ... maybe it was important > in some previous

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-21 Thread Bharath Rupireddy
On Thu, Dec 22, 2022 at 7:57 AM Michael Paquier wrote: > > On Wed, Dec 21, 2022 at 10:22:02PM +0100, Magnus Hagander wrote: > > Basically, we take one thing and turn it into 3. That very naturally rings > > with "split" to me. > > > > Parse might work as well, certainly better than dissect. I'd st

Re: Simplifications for error messages related to compression

2022-12-21 Thread Michael Paquier
On Tue, Dec 20, 2022 at 11:12:22PM -0600, Justin Pryzby wrote: > Yes, and its current users (basebackup) output a gzip file, right ? > > pg_dump -Fc doesn't output a gzip file, but now it's using user-facing > compression specifications referring to it as "gzip". Not all of them are compressed ei

Re: psql tab-complete

2022-12-21 Thread Thomas Munro
On Thu, Dec 22, 2022 at 3:25 PM Michael Paquier wrote: > On Wed, Dec 21, 2022 at 05:56:05PM -0500, Tom Lane wrote: > > Thomas Munro writes: > >> Since I really want to be able to use VA_ARGS_NARGS() elsewhere, > > > > +1, that'd be handy. > > > >> ... Assuming those switches actually work as clai

Exit walsender before confirming remote flush in logical replication

2022-12-21 Thread Hayato Kuroda (Fujitsu)
Dear hackers, (I added Amit as CC because we discussed in another thread) This is a fork thread from time-delayed logical replication [1]. While discussing, we thought that we could extend the condition of walsender shutdown[2][3]. Currently, walsenders delay the shutdown request until confirmin

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-21 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > > > Another related point to consider is what is the behavior of > > > synchronous replication when shutdown has been performed both in the > > > case of physical and logical replication especially when the > > > time-delayed replication feature is enabled? > > > > In physical replica

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-21 Thread Takamichi Osumi (Fujitsu)
Hi, On Thursday, December 15, 2022 12:53 PM Amit Kapila wrote: > On Thu, Dec 15, 2022 at 7:16 AM Kyotaro Horiguchi > wrote: > > > > At Wed, 14 Dec 2022 10:46:17 +, "Hayato Kuroda (Fujitsu)" > > wrote in > > > I have implemented and tested that workers wake up per > > > wal_receiver_timeou

An oversight in ExecInitAgg for grouping sets

2022-12-21 Thread Richard Guo
I happened to notice $subject. It happens when we build eqfunctions for each grouping set. /* for each grouping set */ for (int k = 0; k < phasedata->numsets; k++) { int length = phasedata->gset_lengths[k]; if (phasedata->eqfunctions[length - 1] != NULL)

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-21 Thread Masahiko Sawada
On Wed, Dec 21, 2022 at 2:32 PM houzj.f...@fujitsu.com wrote: > > On Wed, Dec 21, 2022 9:07 AM Peter Smith wrote: > > FYI - applying v63-0001 using the latest master does not work. > > > > git apply > > ../patches_misc/v63-0001-Perform-streaming-logical-transactions-by- > > parall.patch > > erro

Re: Error-safe user functions

2022-12-21 Thread Tom Lane
Andrew Dunstan writes: > And here's another for contrib/seg > I'm planning to commit these two in the next day or so. I didn't look at the jsonpath one yet. The seg patch passes an eyeball check, with one minor nit: in seg_atof, + *result = float4in_internal(value, NULL, "real", value, es

Re: [BUG] pg_upgrade test fails from older versions.

2022-12-21 Thread Anton A. Melnikov
Hello! Divided patch into two parts: first part refers to the modification of the old dump while the second one relates to dump filtering. 1) v2-0001-Remove-aclitem-from-old-dump.patch On 19.12.2022 06:10, Michael Paquier wrote: This is forgetting about materialized views, which is something t

Re: Force streaming every change in logical decoding

2022-12-21 Thread Amit Kapila
On Wed, Dec 21, 2022 at 7:25 PM Masahiko Sawada wrote: > > On Wed, Dec 21, 2022 at 10:14 PM shiy.f...@fujitsu.com > wrote: > > The patch looks good to me. Some minor comments are: > > - * limit, but we might also adapt a more elaborate eviction strategy > - for example > - * evicting enough trans

Re: Force streaming every change in logical decoding

2022-12-21 Thread Masahiko Sawada
On Thu, Dec 22, 2022 at 4:05 PM Amit Kapila wrote: > > On Wed, Dec 21, 2022 at 7:25 PM Masahiko Sawada wrote: > > > > On Wed, Dec 21, 2022 at 10:14 PM shiy.f...@fujitsu.com > > wrote: > > > > The patch looks good to me. Some minor comments are: > > > > - * limit, but we might also adapt a more e

RE: Force streaming every change in logical decoding

2022-12-21 Thread Hayato Kuroda (Fujitsu)
Dear Amit, Thank you for updating the patch. I have also checked the patch and basically it has worked well. Almost all things I found were modified by v4. One comment: while setting logical_decoding_mode to wrong value, I got unfriendly ERROR message. ``` postgres=# SET logical_decoding_mode =

Re: Force streaming every change in logical decoding

2022-12-21 Thread Kyotaro Horiguchi
At Thu, 22 Dec 2022 12:35:46 +0530, Amit Kapila wrote in > I have addressed these comments in the attached. Additionally, I have > modified the docs and commit messages to make those clear. I think > instead of adding new tests with this patch, it may be better to > change some of the existing t

Re: appendBinaryStringInfo stuff

2022-12-21 Thread David Rowley
On Tue, 20 Dec 2022 at 11:26, David Rowley wrote: > It would be good to see some measurements to find out how much adding > the strlen calls back in would cost us. I tried this out. I'm not pretending I found the best test which highlights how much the performance will change in a real-world cas

Re: Minimal logical decoding on standbys

2022-12-21 Thread Drouvot, Bertrand
Hi, On 12/21/22 10:06 AM, Drouvot, Bertrand wrote: Hi, On 12/20/22 10:41 PM, Robert Haas wrote: On Tue, Dec 20, 2022 at 3:39 PM Robert Haas wrote: I guess whatever else we do here, we should fix the comments. Agree, please find attached a patch proposal doing so. Bottom line is that I t

Re: appendBinaryStringInfo stuff

2022-12-21 Thread Tom Lane
David Rowley writes: > 22.57% postgres [.] escape_json Hmm ... shouldn't we do something like -appendStringInfoString(buf, "\\b"); +appendStringInfoCharMacro(buf, '\\'); +appendStringInfoCharMacro(buf, 'b'); and so on in that function?