public inbox for [email protected]  
help / color / mirror / Atom feed
Re: pg_restore failed on foreign key constraint
3+ messages / 2 participants
[nested] [flat]

* Re: pg_restore failed on foreign key constraint
@ 2026-02-13 16:40 Ron Johnson <[email protected]>
  2026-02-13 17:35 ` Re: pg_restore failed on foreign key constraint Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Ron Johnson @ 2026-02-13 16:40 UTC (permalink / raw)
  To: pgsql-general

On Fri, Feb 13, 2026 at 11:14 AM Adrian Klaver <[email protected]>
wrote:

> On 2/13/26 08:05, Ron Johnson wrote:
> > On Fri, Feb 13, 2026 at 10:55 AM Adrian Klaver
> > <[email protected] <mailto:[email protected]>> wrote:
> >
> >     On 2/13/26 06:18, Ron Johnson wrote:
> >      > On Fri, Feb 13, 2026 at 1:43 AM Laurenz Albe
> >     <[email protected] <mailto:[email protected]>
> >      > <mailto:[email protected]
> >     <mailto:[email protected]>>> wrote:
> >
> >      > Turns out that there's a nightly cron job that dumps this (and
> >     other)
> >      > tables with the "--data-only --disable-triggers" options and then
> >     does
> >      > "psql -Xaf mumble.sql" to load them into this database.
> >      >
> >      > But access_email_id=2073 is in the source access_email, so I've
> >     got to
> >      > figure out why it's not being loaded into the target.
> >
> >     Is it in the dump file from the source?
> >
> >
> > Some tables aren't being dumped at the source;  Thus, the missing
> records.
>
> Un-confuse me, how do the below relate?:
>
> "Turns out that there's a nightly cron job that dumps this (and other)
> tables with the "--data-only --disable-triggers" options and then does
> "psql -Xaf mumble.sql" to load them into this database.
>
> But access_email_id=2073 is in the source access_email, so I've got to
> figure out why it's not being loaded into the target."
>
> and
>
> "Some tables aren't being dumped at the source"
>

Table name            Source Dumped   Target Loaded
public.access_email   No              No
public.rel_user_email Yes             Yes

Thus, while new and modified records are being added to public.access_email
at the source, they are not making it to the Target database.  That plus
"--disable-triggers" lets the public.rel_user_email loads succeed on the
target even though it breaks RI.

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_restore failed on foreign key constraint
  2026-02-13 16:40 Re: pg_restore failed on foreign key constraint Ron Johnson <[email protected]>
@ 2026-02-13 17:35 ` Adrian Klaver <[email protected]>
  2026-02-13 20:17   ` Re: pg_restore failed on foreign key constraint Ron Johnson <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Adrian Klaver @ 2026-02-13 17:35 UTC (permalink / raw)
  To: Ron Johnson <[email protected]>; pgsql-general



On 2/13/26 8:40 AM, Ron Johnson wrote:
> On Fri, Feb 13, 2026 at 11:14 AM Adrian Klaver 

> 
>     Un-confuse me, how do the below relate?:
> 
>     "Turns out that there's a nightly cron job that dumps this (and other)
>     tables with the "--data-only --disable-triggers" options and then does
>     "psql -Xaf mumble.sql" to load them into this database.
> 
>     But access_email_id=2073 is in the source access_email, so I've got to
>     figure out why it's not being loaded into the target."
> 
>     and
> 
>     "Some tables aren't being dumped at the source"
> 
> 
> Table name            Source Dumped   Target Loaded
> public.access_email   No              No
> public.rel_user_email Yes             Yes
> 
> Thus, while new and modified records are being added 
> to public.access_email at the source, they are not making it to the 
> Target database.  That plus "--disable-triggers" lets 
> the public.rel_user_email loads succeed on the target even though it 
> breaks RI.

This means you know what the issue is now?

> 
> -- 
> Death to <Redacted>, and butter sauce.
> Don't boil me, I'm still alive.
> <Redacted> lobster!







^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg_restore failed on foreign key constraint
  2026-02-13 16:40 Re: pg_restore failed on foreign key constraint Ron Johnson <[email protected]>
  2026-02-13 17:35 ` Re: pg_restore failed on foreign key constraint Adrian Klaver <[email protected]>
@ 2026-02-13 20:17   ` Ron Johnson <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Ron Johnson @ 2026-02-13 20:17 UTC (permalink / raw)
  To: pgsql-general

On Fri, Feb 13, 2026 at 12:35 PM Adrian Klaver <[email protected]>
wrote:
[snip]

> >
> > Thus, while new and modified records are being added
> > to public.access_email at the source, they are not making it to the
> > Target database.  That plus "--disable-triggers" lets
> > the public.rel_user_email loads succeed on the target even though it
> > breaks RI.
>
> This means you know what the issue is now?
>

Yes it does. 😀

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-02-13 20:17 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-13 16:40 Re: pg_restore failed on foreign key constraint Ron Johnson <[email protected]>
2026-02-13 17:35 ` Adrian Klaver <[email protected]>
2026-02-13 20:17   ` Ron Johnson <[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