public inbox for [email protected]
help / color / mirror / Atom feedRe: How does this FK constraint error happen?
3+ messages / 2 participants
[nested] [flat]
* Re: How does this FK constraint error happen?
@ 2024-07-15 16:47 Adrian Klaver <[email protected]>
2024-07-15 17:14 ` Re: How does this FK constraint error happen? Ron Johnson <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Klaver @ 2024-07-15 16:47 UTC (permalink / raw)
To: Ron Johnson <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
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]
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How does this FK constraint error happen?
2024-07-15 16:47 Re: How does this FK constraint error happen? Adrian Klaver <[email protected]>
@ 2024-07-15 17:14 ` Ron Johnson <[email protected]>
2024-07-15 17:48 ` Re: How does this FK constraint error happen? Adrian Klaver <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Ron Johnson @ 2024-07-15 17:14 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <[email protected]>
On Mon, Jul 15, 2024 at 12:47 PM Adrian Klaver <[email protected]>
wrote:
> 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.
>
That JBDC code is pretty slow...
>
> >
> > 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?
>
Less bureaucratic overhead to write a script.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How does this FK constraint error happen?
2024-07-15 16:47 Re: How does this FK constraint error happen? Adrian Klaver <[email protected]>
2024-07-15 17:14 ` Re: How does this FK constraint error happen? Ron Johnson <[email protected]>
@ 2024-07-15 17:48 ` Adrian Klaver <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Klaver @ 2024-07-15 17:48 UTC (permalink / raw)
To: Ron Johnson <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>
On 7/15/24 10:14 AM, Ron Johnson wrote:
> It can't be installed?
>
>
> Less bureaucratic overhead to write a script.
>
But potentially fewer errors.
Also if the current process allows for connecting to one database and
transferring from it to another, I'm not sure how using postgres_fdw
really changes anything?
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-07-15 17:48 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-15 16:47 Re: How does this FK constraint error happen? Adrian Klaver <[email protected]>
2024-07-15 17:14 ` Ron Johnson <[email protected]>
2024-07-15 17:48 ` Adrian Klaver <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox