Re: pgarchives: Bug report + Patches: loader can't handle message in multiple lists

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
Cc: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: pgarchives: Bug report + Patches: loader can't handle message in multiple lists
Date: 2023-06-07 16:52:12
Message-ID: CABUevEy0vF9MLo0S_HPvwF8U=dZkM3Ob_QK_-X+=pN4e7uimJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Mon, Jun 5, 2023 at 3:39 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> wrote:
>
> > How does it even get that far? The code on line 32 of storage.py will
> > check if the message is already in the archives. How does it even get
> > to the point of trying to insert the message again?
>
> Because my patch bypasses this by checking whether the message exists *in the given list*
>
> This was the beginning of an attempt to fix a crash I had. As far as I remember, the crash was that the message already existed.
>
> But as said in previous email, this was not sufficient to solve the issue.

OK, I think I need to take a step back to try to figure out what's
actually wrong here.

What is it you are actually trying to accomplish? Are you trying to
remove the single-store functionality for emails? As mentioned, the
whole design of the system is done around that a single email should
only be stored once - but it sounds like you're removing that for some
reason? Or am I misunderstanding?

It sounds to me like your patch that bypasses the check is either
broken or misguided, since that's what actually causes the problem?

> > I'm not sure I like the idea of committing after every message and
> > then rolling back in the event of an error. If nothing else, this
> > should be done using a savepoint instead of a complete transaction.
>
> Attached

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Magnus Hagander 2023-06-07 17:20:33 Re: Regarding development of testcases for PGweb Testing Harness
Previous Message Joe Conway 2023-06-07 12:43:26 Re: Need Editor Access