Re: locking [user] catalog tables vs 2pc vs logical rep

2021-06-19 Thread Amit Kapila
On Sun, Jun 20, 2021 at 9:28 AM osumi.takami...@fujitsu.com wrote: > > On Saturday, June 19, 2021 6:51 PM Amit Kapila > wrote: > > On Fri, Jun 18, 2021 at 2:25 PM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Friday, June 18, 2021 11:41 AM osumi.takami...@fujitsu.com > > wrote: > > >

Re: pgbench logging broken by time logic changes

2021-06-19 Thread Thomas Munro
On Sun, Jun 20, 2021 at 3:18 PM Alvaro Herrera wrote: > On 2021-Jun-19, Thomas Munro wrote: > > Thanks for looking so far. It's the weekend here and I need to > > unplug, but I'll test these changes and if all looks good push on > > Monday. > > Surely not the same day as the beta stamp... Becaus

RE: locking [user] catalog tables vs 2pc vs logical rep

2021-06-19 Thread osumi.takami...@fujitsu.com
On Saturday, June 19, 2021 6:51 PM Amit Kapila wrote: > On Fri, Jun 18, 2021 at 2:25 PM osumi.takami...@fujitsu.com > wrote: > > > > On Friday, June 18, 2021 11:41 AM osumi.takami...@fujitsu.com > wrote: > > > > Simon, I appreciate your suggestions and yes, if the user catalog > > > table is r

Re: pgbench logging broken by time logic changes

2021-06-19 Thread Alvaro Herrera
On 2021-Jun-19, Thomas Munro wrote: > Thanks for looking so far. It's the weekend here and I need to > unplug, but I'll test these changes and if all looks good push on > Monday. Surely not the same day as the beta stamp... -- Álvaro Herrera Valdivia, Chile "Always assume the user will d

Re: unnesting multirange data types

2021-06-19 Thread Tom Lane
Alexander Korotkov writes: > I also don't feel comfortable hurrying with unnest part to beta2. > According to the open items wiki page, there should be beta3. Does > unnest part have a chance for beta3? Hm. I'd prefer to avoid another forced initdb after beta2. On the other hand, it's entirely

Re: unnesting multirange data types

2021-06-19 Thread Alexander Korotkov
On Sat, Jun 19, 2021 at 7:35 PM Tom Lane wrote: > Alexander Korotkov writes: > > Patch successfully passed commitfest.cputube.org. I'm going to > > re-push it if there are no objections. > > I'm still not happy about the way you've done the multirange-to-array > part. I think we'd be better off

Re: Race between KeepFileRestoredFromArchive() and restartpoint

2021-06-19 Thread Noah Misch
On Tue, Feb 02, 2021 at 07:14:16AM -0800, Noah Misch wrote: > Recycling and preallocation are wasteful during archive recovery, because > KeepFileRestoredFromArchive() unlinks every entry in its path. I propose to > fix the race by adding an XLogCtl flag indicating which regime currently owns > th

Re: Race condition in InvalidateObsoleteReplicationSlots()

2021-06-19 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > It occurred to me that this could be made better by sigstopping both > walreceiver and walsender, then letting only the latter run; AFAICS this > makes the test stable. I'll register this on the upcoming commitfest to > let cfbot run it, and if it looks g

Re: unnesting multirange data types

2021-06-19 Thread Tom Lane
Alexander Korotkov writes: > Patch successfully passed commitfest.cputube.org. I'm going to > re-push it if there are no objections. I'm still not happy about the way you've done the multirange-to-array part. I think we'd be better off improving the polymorphism rules so that that can be handle

Re: Optionally automatically disable logical replication subscriptions on error

2021-06-19 Thread Mark Dilger
> On Jun 19, 2021, at 7:44 AM, Mark Dilger wrote: > > Wouldn't the user rather skip just the problematic rows? I understand that > on the subscriber side it is difficult to do so, but if you are going to > implement this sort of thing, it makes more sense to allow the user to filter > out

Re: Add version macro to libpq-fe.h

2021-06-19 Thread Tom Lane
I wrote: > Alvaro Herrera writes: >> Well, if we do want docs for these macros, then IMO it'd be okay to have >> them in libpq-fe.h itself rather than SGML. A one-line comment for each >> would suffice: > WFM. I'd sort of supposed that the symbol names were self-documenting, > but you're right

Re: Optionally automatically disable logical replication subscriptions on error

2021-06-19 Thread Mark Dilger
> On Jun 19, 2021, at 3:17 AM, Amit Kapila wrote: > > Right, but there are things that could be common from the design > perspective. I went to reconcile my patch with that from [1] only to discover there is no patch on that thread. Is there one in progress that I can see? I don't mind try

Re: seawasp failing, maybe in glibc allocator

2021-06-19 Thread Tom Lane
Thomas Munro writes: > On Sat, Jun 19, 2021 at 5:07 PM Thomas Munro wrote: >> if (error != LLVMErrorSuccess) >> LLVMOrcDisposeMaterializationUnit(mu); >> >> +#if LLVM_VERSION_MAJOR > 12 >> + for (int i = 0; i < LookupSetSize; i++) >> + LLVMOrcRetainSymbolStringPoolEntry(symbo

Re: Unresolved repliaction hang and stop problem.

2021-06-19 Thread Amit Kapila
On Fri, Jun 18, 2021 at 11:22 AM Kyotaro Horiguchi wrote: > > At Thu, 17 Jun 2021 12:56:42 -0400, Alvaro Herrera > wrote in > > On 2021-Jun-17, Kyotaro Horiguchi wrote: > > > > > I don't see a call to hash_*seq*_search there. Instead, I see one in > > > ReorderBufferCheckMemoryLimit(). > > > > D

Re: Optionally automatically disable logical replication subscriptions on error

2021-06-19 Thread Amit Kapila
On Sat, Jun 19, 2021 at 1:06 AM Mark Dilger wrote: > > On Jun 17, 2021, at 9:47 PM, Amit Kapila wrote: > > > We are also discussing another action like skipping the apply of the > > transaction on an error [1]. I think it is better to evaluate both the > > proposals as one seems to be an extensio

Re: Question about StartLogicalReplication() error path

2021-06-19 Thread Amit Kapila
On Thu, Jun 17, 2021 at 4:25 AM Jeff Davis wrote: > > On Tue, 2021-06-15 at 15:19 +0900, Kyotaro Horiguchi wrote: > > I don't think the message is neded, but I don't oppose it as far as > > the level is LOG and the messages were changed as something like > > this: > > > > > > - elog(

Re: locking [user] catalog tables vs 2pc vs logical rep

2021-06-19 Thread Amit Kapila
On Fri, Jun 18, 2021 at 2:25 PM osumi.takami...@fujitsu.com wrote: > > On Friday, June 18, 2021 11:41 AM osumi.takami...@fujitsu.com > wrote: > > Simon, I appreciate your suggestions and yes, if the user catalog table is > > referenced by the output plugin, it can be another cause of the deadl

Re: seawasp failing, maybe in glibc allocator

2021-06-19 Thread Thomas Munro
On Sat, Jun 19, 2021 at 5:07 PM Thomas Munro wrote: > if (error != LLVMErrorSuccess) > LLVMOrcDisposeMaterializationUnit(mu); > > +#if LLVM_VERSION_MAJOR > 12 > + for (int i = 0; i < LookupSetSize; i++) > + LLVMOrcRetainSymbolStringPoolEntry(symbols[i].N

Re: Fix for segfault in logical replication on master

2021-06-19 Thread Amit Kapila
On Fri, Jun 18, 2021 at 9:18 AM Amit Kapila wrote: > > > I thought it was cheap enough to check that the relation we open is an > > index, because if it is not, we'll segfault when accessing fields of the > > relation->rd_index struct. I wouldn't necessarily advocate doing any > > really expen