On Tue, Feb 9, 2021 at 5:53 PM Alvaro Herrera wrote:
>
> On 2021-Feb-09, Amit Kapila wrote:
>
> > On Tue, Feb 9, 2021 at 4:16 PM Alvaro Herrera
> > wrote:
>
> > > By all means let's get the bug fixed.
> >
> > I am planning to push this in HEAD only as there is no user reported
> > problem and th
On 2021-Feb-09, Amit Kapila wrote:
> On Tue, Feb 9, 2021 at 4:16 PM Alvaro Herrera wrote:
> > By all means let's get the bug fixed.
>
> I am planning to push this in HEAD only as there is no user reported
> problem and this is actually more about giving correct information to
> the user rather
On Tue, Feb 9, 2021 at 4:16 PM Alvaro Herrera wrote:
>
> On 2021-Feb-09, Amit Kapila wrote:
>
> > Now, we can do this optimization if we want but I am not sure if
> > origin_drop would be a frequent enough operation that we add such an
> > optimization. For now, I have added a note in the comments
On 2021-Feb-09, Amit Kapila wrote:
> > IIUC, you are suggesting to use lock for the particular origin instead
> > of locking the corresponding catalog table in functions
> > pg_replication_origin_advance and replorigin_drop_by_name.
Right.
> I think it won't be that straightforward as we don't h
On Tue, Feb 9, 2021 at 9:27 AM Amit Kapila wrote:
>
> On Mon, Feb 8, 2021 at 11:30 PM Alvaro Herrera
> wrote:
> >
> > > +void
> > > +replorigin_drop_by_name(char *name, bool missing_ok, bool nowait)
> > > +{
> > > + RepOriginId roident;
> > > + Relationrel;
> > > +
> > > + As
On Mon, Feb 8, 2021 at 11:30 PM Alvaro Herrera wrote:
>
> > +void
> > +replorigin_drop_by_name(char *name, bool missing_ok, bool nowait)
> > +{
> > + RepOriginId roident;
> > + Relationrel;
> > +
> > + Assert(IsTransactionState());
> > +
> > + /*
> > + * To interlock a
> +void
> +replorigin_drop_by_name(char *name, bool missing_ok, bool nowait)
> +{
> + RepOriginId roident;
> + Relationrel;
> +
> + Assert(IsTransactionState());
> +
> + /*
> + * To interlock against concurrent drops, we hold ExclusiveLock on
> + * pg_replication_o
On Mon, Feb 8, 2021, at 3:23 AM, Amit Kapila wrote:
> Fixed the problem as mentioned above in the attached.
This new version looks good to me.
--
Euler Taveira
EDB https://www.enterprisedb.com/
On Sat, Feb 6, 2021 at 5:47 PM Amit Kapila wrote:
>
> On Sat, Feb 6, 2021 at 3:26 PM Petr Jelinek wrote:
> >
> > On 06/02/2021 07:29, Amit Kapila wrote:
> > > On Fri, Feb 5, 2021 at 6:45 PM Euler Taveira wrote:
> > >> - replorigin_drop(roident, true);
> > >> + replorigin_drop_by_name(name, false
On Sat, Feb 6, 2021 at 3:26 PM Petr Jelinek wrote:
>
> On 06/02/2021 07:29, Amit Kapila wrote:
> > On Fri, Feb 5, 2021 at 6:45 PM Euler Taveira wrote:
> >> - replorigin_drop(roident, true);
> >> + replorigin_drop_by_name(name, false /* missing_ok */ , true /* nowait */
> >> );
> >>
> >> A modern
On 06/02/2021 07:29, Amit Kapila wrote:
On Fri, Feb 5, 2021 at 6:45 PM Euler Taveira wrote:
On Fri, Feb 5, 2021, at 4:01 AM, Amit Kapila wrote:
I am not completely whether we should retire replorigin_drop or just
keep it for backward compatibility? What do you think? Anybody else
has any opini
On Fri, Feb 5, 2021 at 6:45 PM Euler Taveira wrote:
>
> On Fri, Feb 5, 2021, at 4:01 AM, Amit Kapila wrote:
>
> I am not completely whether we should retire replorigin_drop or just
> keep it for backward compatibility? What do you think? Anybody else
> has any opinion?
>
> We could certainly keep
On Fri, Feb 5, 2021, at 4:01 AM, Amit Kapila wrote:
> I am not completely whether we should retire replorigin_drop or just
> keep it for backward compatibility? What do you think? Anybody else
> has any opinion?
We could certainly keep some code for backward compatibility, however, we have
to consi
On Fri, Feb 5, 2021 at 1:50 PM Peter Smith wrote:
>
> On Fri, Feb 5, 2021 at 6:02 PM Amit Kapila wrote:
> >
> > On Fri, Feb 5, 2021 at 9:46 AM Peter Smith wrote:
> > >
> > > PSA patch updated per above suggestions.
> > >
> >
> > Thanks, I have tested your patch and before the patch, I was gettin
On Fri, Feb 5, 2021 at 6:02 PM Amit Kapila wrote:
>
> On Fri, Feb 5, 2021 at 9:46 AM Peter Smith wrote:
> >
> > PSA patch updated per above suggestions.
> >
>
> Thanks, I have tested your patch and before the patch, I was getting
> errors like "tuple concurrently deleted" or "cache lookup failed
On Fri, Feb 5, 2021 at 9:46 AM Peter Smith wrote:
>
> PSA patch updated per above suggestions.
>
Thanks, I have tested your patch and before the patch, I was getting
errors like "tuple concurrently deleted" or "cache lookup failed for
replication origin with oid 1" and after the patch, I am getti
On Thu, Feb 4, 2021 at 9:20 PM Amit Kapila wrote:
>
> On Thu, Feb 4, 2021 at 1:31 PM Peter Smith wrote:
> >
> > PSA a patch which I think implements what we are talking about.
> >
>
> This doesn't seem correct to me. Have you tested that the patch
> resolves the problem reported originally? Becau
On Thu, Feb 4, 2021 at 1:31 PM Peter Smith wrote:
>
> PSA a patch which I think implements what we are talking about.
>
This doesn't seem correct to me. Have you tested that the patch
resolves the problem reported originally? Because the lockmode
(RowExclusiveLock) you have used in the patch will
On Thu, Feb 4, 2021 at 4:43 PM Amit Kapila wrote:
>
> On Thu, Feb 4, 2021 at 9:57 AM Peter Smith wrote:
> >
> > On Wed, Feb 3, 2021 at 11:17 PM Amit Kapila wrote:
> >
> > >
> > > How about if we call replorigin_by_name() inside replorigin_drop after
> > > acquiring the lock? Wouldn't that close
On Thu, Feb 4, 2021 at 9:57 AM Peter Smith wrote:
>
> On Wed, Feb 3, 2021 at 11:17 PM Amit Kapila wrote:
>
> >
> > How about if we call replorigin_by_name() inside replorigin_drop after
> > acquiring the lock? Wouldn't that close this race condition? We are
> > doing something similar for pg_repl
On Wed, Feb 3, 2021 at 11:17 PM Amit Kapila wrote:
>
> How about if we call replorigin_by_name() inside replorigin_drop after
> acquiring the lock? Wouldn't that close this race condition? We are
> doing something similar for pg_replication_origin_advance().
>
Yes, that seems ok.
I wonder if it
On Wed, Jan 27, 2021 at 4:58 AM Peter Smith wrote:
>
> Hi Hackers.
>
> As discovered elsewhere [ak0125] there is a potential race condition
> in the pg_replication_origin_drop API
>
> The current code of pg_replication_origin_drop looks like:
>
> roident = replorigin_by_name(name, false);
> A
22 matches
Mail list logo