public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: How does this FK constraint error happen?
Date: Mon, 15 Jul 2024 09:47:28 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANzqJaCyPpUReKCy7G8mVczApoKq73-zfzbSOvpgpCGJ86igVg@mail.gmail.com>
References: <CANzqJaBF6mnUy1ZfBbySzSr1AfErnrMEGJaUvdSA1H9ZXkTbEw@mail.gmail.com>
<[email protected]>
<CANzqJaCZkwRon9xDOeFaTd05KZM--Eei1SAiattJXurx_8n0bQ@mail.gmail.com>
<[email protected]>
<CANzqJaC0EYvpD-452JVS4UNH8D0qFaXygBR5je=_zK2pDziM5w@mail.gmail.com>
<[email protected]>
<CANzqJaCyPpUReKCy7G8mVczApoKq73-zfzbSOvpgpCGJ86igVg@mail.gmail.com>
On 7/15/24 09:21, Ron Johnson wrote:
> On Mon, Jul 15, 2024 at 11:37 AM Adrian Klaver
> <[email protected] <mailto:[email protected]>> wrote:
>
> I don't think it is entirely coincidental that 1210 is the only shown
> user_id with a modified_on value that is in proximity to the delete
> error.
>
>
> I don't think so either.
>
> My suspicion is that actions are not happening in the exact order
> you think they are.
>
>
> modified_on is CURRENT_TIMESTAMP or NOW() or somesuch. I'm not sure,
> because I'm not privy to the code.
>
> But I'm printing the system time in bash before every statement.
That is why I wrote 'Time travel?'.
I suspect the modified_on time in the table is not accurately
representing when the row is modified.
>
> I would think that combining DELETE FROM
> rel_group_user; and DELETE FROM public.access_user; in a single
> transaction would be a good start to fixing this.
>
>
> That is in fact what I'm working on now. There are 26 tables, and they
> must be done in a specific order when deleting, and the reverse while
> inserting.
>
> postgres_fdw would make this easier...
It can't be installed?
--
Adrian Klaver
[email protected]
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: How does this FK constraint error happen?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox