Re: [Proposal] Add foreign-server health checks infrastructure

2022-01-22 Thread Fujii Masao
On 2022/01/21 15:08, kuroda.hay...@fujitsu.com wrote: Dear Fujii-san, Zhihong, I attached the latest version. Thanks for updating the patch! +int +TryDisableRemoteServerCheckingTimeout(void) When more than one FDWs are used, even if one FDW calls this function to disable the timeout, its

Re: Parallelize correlated subqueries that execute within each worker

2022-01-22 Thread James Coleman
On Fri, Jan 21, 2022 at 3:20 PM Robert Haas wrote: > > On Fri, Jan 14, 2022 at 2:25 PM James Coleman wrote: > > I've been chewing on this a bit, and I was about to go re-read the > > code and see how easy it'd be to do exactly what you're suggesting in > > generate_gather_paths() (and verifying i

Re: Warning in geqo_main.c from clang 13

2022-01-22 Thread Thomas Munro
On Sun, Jan 23, 2022 at 11:34 AM Tom Lane wrote: > We're starting to see more buildfarm animals producing this warning, > so I took another look, and thought of a slightly less invasive way to > silence it. I confirmed this works with clang 13.0.0 on Fedora 35. LGTM. Tested on bleeding edge cla

Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-22 Thread Tomas Vondra
Hi, There's a bug in ProcArrayApplyRecoveryInfo, introduced by 8431e296ea, which may cause failures when starting a replica, making it unusable. The commit message for 8431e296ea is not very clear about what exactly is being done and why, but the root cause is that at while processing RUNNING

Re: Parameter for planner estimate of recursive queries

2022-01-22 Thread Kenaniah Cerny
> The factor 10 should not be hardcoded in the planner, but should be settable, just as cursor_tuple_fraction is. I feel considerably out of my depth here, but I like the idea of a working table size multiplier GUC, given the challenges of predicting the number of iterations (and any adjustments t

Re: Warning in geqo_main.c from clang 13

2022-01-22 Thread Tom Lane
I wrote: > Thomas Munro writes: >> Clang 13 on my machine and peripatus (but not Apple clang 13 on eg >> sifika, I'm still confused about Apple's versioning but I think that's >> really llvm 12-based) warns: >> geqo_main.c:86:8: warning: variable 'edge_failures' set but not used >> [-Wunused-but-s

Re: MDAM techniques and Index Skip Scan patch

2022-01-22 Thread Dmitry Dolgov
> On Fri, Jan 14, 2022 at 04:03:41PM +0800, Julien Rouhaud wrote: > Hi, > > On Fri, Jan 14, 2022 at 08:55:26AM +0100, Dmitry Dolgov wrote: > > > > FYI, I've attached this thread to the CF item as an informational one, > > but as there are some patches posted here, folks may get confused. For > > th

Re: Index Skip Scan (new UniqueKeys)

2022-01-22 Thread Dmitry Dolgov
> On Fri, May 21, 2021 at 05:31:38PM +0200, Dmitry Dolgov wrote: > Hi, > > Here is another take on the patch with a couple of changes: > > * I've removed for now UniqueKeys parts. The interaction of skip scan & > unique keys patch was actually not that big, so the main difference is > that now

Re: CREATEROLE and role ownership hierarchies

2022-01-22 Thread Stephen Frost
Greetings, * Mark Dilger (mark.dil...@enterprisedb.com) wrote: > > On Jan 4, 2022, at 12:47 PM, Joshua Brindle > > wrote: > > > >> I was able to reproduce that using REASSIGN OWNED BY to cause a user to > >> own itself. Is that how you did it, or is there yet another way to get > >> into tha

Re: autovacuum prioritization

2022-01-22 Thread Peter Geoghegan
On Thu, Jan 20, 2022 at 4:43 PM Robert Haas wrote: > > Since we now have the failsafe, the scheduling algorithm can afford to > > not give too much special attention to table age until we're maybe > > over the 1 billion age mark -- or even 1.5 billion+. But once the > > scheduling stuff starts to

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-22 Thread Noah Misch
On Sun, Jan 16, 2022 at 01:02:41PM -0800, Noah Misch wrote: > My next steps: > > - Report a Debian bug for the sparc64+ext4 zeros problem. (Not done yet.) > - Try to falsify the idea that "write only the not-already-written portion of > a WAL block" is an effective workaround. Specifically, m

Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX

2022-01-22 Thread Tom Lane
"Euler Taveira" writes: > On Mon, Dec 20, 2021, at 3:45 AM, houzj.f...@fujitsu.com wrote: >> When reviewing some replica identity related patches, I found that when >> adding >> primary key using an existing unique index on not null columns, the >> target table's relcache won't be invalidated. >

pg_upgrade/test.sh and v9.5

2022-01-22 Thread Justin Pryzby
In fa66b6dee, Micheal fixed test.sh to work back to v11, so I suppose nobody is trying to run it with older versions, as I was endeavored to do. With the attached patch, I'm able to test upgrades back to v9.6. In 9.5, there are regression diffs from CONTEXT lines from non-error messages, which is

Re: How to get started with contribution

2022-01-22 Thread Stephen Frost
Greetings, * vrund shah (vrund3...@gmail.com) wrote: > Thank you for your valuable guidance. > I will surely look at the links and if have any queries then I will contact > you. On these mailing lists, we prefer that you reply 'in-line', as I'm doing here, and not use 'top-posting' (as you did in

Re: Skipping logical replication transactions on subscriber side

2022-01-22 Thread David G. Johnston
On Sat, Jan 22, 2022 at 9:21 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Sat, Jan 22, 2022 at 2:41 AM Amit Kapila > wrote: > >> >> > Additionally, the description for pg_stat_subscription_workers should >> describe what happens once the transaction represented by last_error_xid

Re: Skipping logical replication transactions on subscriber side

2022-01-22 Thread David G. Johnston
On Sat, Jan 22, 2022 at 2:41 AM Amit Kapila wrote: > On Sat, Jan 22, 2022 at 12:41 PM David G. Johnston > wrote: > > > > On Fri, Jan 21, 2022 at 10:30 PM Amit Kapila > wrote: > >> > >> On Fri, Jan 21, 2022 at 10:00 PM David G. Johnston > >> wrote: > >> > > >> > On Fri, Jan 21, 2022 at 4:55 AM

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-22 Thread Andrew Dunstan
On 1/21/22 18:04, Andres Freund wrote: > Hi, > > On 2022-01-21 17:42:45 -0500, Tom Lane wrote: >> Andrew Dunstan writes: >>> c.f. src/bin/pg_verifybackup/t/003_corruption.pl which says: >>>     my $source_ts_prefix = $source_ts_path; >>>     $source_ts_prefix =~ s!(^[A-Z]:/[^/]*)/.*!$1!; >>>    

Re: Document atthasmissing default optimization avoids verification table scan

2022-01-22 Thread David G. Johnston
On Saturday, January 22, 2022, James Coleman wrote: > On Sat, Jan 22, 2022 at 12:35 AM David G. Johnston > wrote: > > > > On Fri, Jan 21, 2022 at 5:14 PM James Coleman wrote: > >> > >> > >> > Really? That's horrid, because that's directly useful advice. > >> > >> Remedied, but rewritten a bit

Re: row filtering for logical replication

2022-01-22 Thread Alvaro Herrera
On 2022-Jan-22, Amit Kapila wrote: > CREATE TABLE parent (a int primary key, b int not null, c varchar) > PARTITION BY RANGE(a); > CREATE TABLE child PARTITION OF parent FOR VALUES FROM (0) TO (250); > CREATE UNIQUE INDEX b_index on child(b); > ALTER TABLE child REPLICA IDENTITY using INDEX b_inde

Re: Proposal: allow database-specific role memberships

2022-01-22 Thread Julien Rouhaud
Hi, On Sat, Jan 22, 2022 at 05:28:05AM -0800, Kenaniah Cerny wrote: > Thank you so much for the backtrace! > > This latest patch should address by moving the dumpRoleMembership call to > before the pointer is closed. Thanks! The cfbot turned green since: https://cirrus-ci.com/github/postgresql-

Re: Proposal: allow database-specific role memberships

2022-01-22 Thread Kenaniah Cerny
Thank you so much for the backtrace! This latest patch should address by moving the dumpRoleMembership call to before the pointer is closed. On Sat, Jan 22, 2022 at 1:11 AM Julien Rouhaud wrote: > Hi, > > On Fri, Jan 21, 2022 at 07:01:21PM -0800, Kenaniah Cerny wrote: > > Thanks for the feedbac

Re: Document atthasmissing default optimization avoids verification table scan

2022-01-22 Thread James Coleman
On Sat, Jan 22, 2022 at 12:35 AM David G. Johnston wrote: > > On Fri, Jan 21, 2022 at 5:14 PM James Coleman wrote: >> >> >> > Really? That's horrid, because that's directly useful advice. >> >> Remedied, but rewritten a bit to better fit with the new style/goal of >> that tip). >> >> Version 3 i

Re: Logical replication timeout problem

2022-01-22 Thread Amit Kapila
On Fri, Jan 21, 2022 at 10:45 PM Fabrice Chapuis wrote: > > I keep your patch 0001 and I add these two calls in function > WalSndUpdateProgress without modifying WalSndKeepaliveIfNecessary, it works > too. > What do your think of this patch? > I think this will also work. Here, the point was to

Re: Skipping logical replication transactions on subscriber side

2022-01-22 Thread Amit Kapila
On Sat, Jan 22, 2022 at 12:41 PM David G. Johnston wrote: > > On Fri, Jan 21, 2022 at 10:30 PM Amit Kapila wrote: >> >> On Fri, Jan 21, 2022 at 10:00 PM David G. Johnston >> wrote: >> > >> > On Fri, Jan 21, 2022 at 4:55 AM Amit Kapila >> > wrote: >> >> >> >> Apart from this, I have changed a f

Re: Proposal: allow database-specific role memberships

2022-01-22 Thread Julien Rouhaud
Hi, On Fri, Jan 21, 2022 at 07:01:21PM -0800, Kenaniah Cerny wrote: > Thanks for the feedback. > > I have attached an alternate version of the v5 patch that incorporates the > suggested changes to the documentation and DRYs up some of the acl.c code > for comparison. As for the databaseOid / Inva