public inbox for [email protected]  
help / color / mirror / Atom feed
Pg dump of parent table instead of taking child table
7+ messages / 4 participants
[nested] [flat]

* Pg dump of parent table instead of taking child table
@ 2024-09-13 11:30  Sathish Reddy <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Sathish Reddy @ 2024-09-13 11:30 UTC (permalink / raw)
  To: [email protected]; Keith Fiske <[email protected]>; Crunchy Bridge Support <[email protected]>

Hi
  We are trying to take parent table backup included all child tables data
into dump plan format.but we are getting failed to achieve.

Please help me on these.

Thanks
Sathishreddy


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

* Re: Pg dump of parent table instead of taking child table
@ 2024-09-13 12:54  Erik Wienhold <[email protected]>
  parent: Sathish Reddy <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Erik Wienhold @ 2024-09-13 12:54 UTC (permalink / raw)
  To: Sathish Reddy <[email protected]>; +Cc: [email protected]; Keith Fiske <[email protected]>; Crunchy Bridge Support <[email protected]>

On 2024-09-13 13:30 +0200, Sathish Reddy wrote:
> We are trying to take parent table backup included all child tables data
> into dump plan format.but we are getting failed to achieve.

1) Which Postgres version?

2) What pg_dump options did you use?

3) What output/error do you get?

4) What does the database schema look like?  Are you using table
   inheritance or foreign keys for the parent-child relationship?

-- 
Erik





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

* Re: Pg dump of parent table instead of taking child table
@ 2024-09-13 13:11  Sathish Reddy <[email protected]>
  parent: Erik Wienhold <[email protected]>
  0 siblings, 2 replies; 7+ messages in thread

From: Sathish Reddy @ 2024-09-13 13:11 UTC (permalink / raw)
  To: Erik Wienhold <[email protected]>; +Cc: [email protected]; Keith Fiske <[email protected]>; Crunchy Bridge Support <[email protected]>

We are using 14 version
Pg_dump with  -Fp and --loading-via-parent-root option



Database name is better and schema is better. ..



Thanks

Sathishreddy

On Fri, Sep 13, 2024, 6:24 PM Erik Wienhold <[email protected]> wrote:

> On 2024-09-13 13:30 +0200, Sathish Reddy wrote:
> > We are trying to take parent table backup included all child tables data
> > into dump plan format.but we are getting failed to achieve.
>
> 1) Which Postgres version?
>
> 2) What pg_dump options did you use?
>
> 3) What output/error do you get?
>
> 4) What does the database schema look like?  Are you using table
>    inheritance or foreign keys for the parent-child relationship?
>
> --
> Erik
>


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

* Re: Pg dump of parent table instead of taking child table
@ 2024-09-13 14:09  Holger Jakobs <[email protected]>
  parent: Sathish Reddy <[email protected]>
  1 sibling, 1 reply; 7+ messages in thread

From: Holger Jakobs @ 2024-09-13 14:09 UTC (permalink / raw)
  To: [email protected]

There is no such option "--loading-via-parent-root"

Check for existing options here: 

https://www.postgresql.org/docs/14/app-pgdump.html
-- 
Holger Jakobs, Bergisch Gladbach 
Tel. +49 178 9759012

Am 13. September 2024 15:11:59 MESZ schrieb Sathish Reddy <[email protected]>:
>We are using 14 version
>Pg_dump with  -Fp and --loading-via-parent-root option
>
>
>
>Database name is better and schema is better. ..
>
>
>
>Thanks
>
>Sathishreddy
>
>On Fri, Sep 13, 2024, 6:24 PM Erik Wienhold <[email protected]> wrote:
>
>> On 2024-09-13 13:30 +0200, Sathish Reddy wrote:
>> > We are trying to take parent table backup included all child tables data
>> > into dump plan format.but we are getting failed to achieve.
>>
>> 1) Which Postgres version?
>>
>> 2) What pg_dump options did you use?
>>
>> 3) What output/error do you get?
>>
>> 4) What does the database schema look like?  Are you using table
>>    inheritance or foreign keys for the parent-child relationship?
>>
>> --
>> Erik
>>


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

* Re: Pg dump of parent table instead of taking child table
@ 2024-09-13 14:16  David G. Johnston <[email protected]>
  parent: Holger Jakobs <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: David G. Johnston @ 2024-09-13 14:16 UTC (permalink / raw)
  To: Holger Jakobs <[email protected]>; +Cc: [email protected] <[email protected]>

On Friday, September 13, 2024, Holger Jakobs <[email protected]> wrote:

> There is no such option "--loading-via-parent-root"
>
> Check for existing options here:
>
> https://www.postgresql.org/docs/14/app-pgdump.html
>
>
It’s actually named —load-via-partition-root ; close enough if going from
memory I’d say…but better still to copy and paste real commands or
reproducible scripts.

David J.


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

* Re: Pg dump of parent table instead of taking child table
@ 2024-09-13 16:24  Erik Wienhold <[email protected]>
  parent: Sathish Reddy <[email protected]>
  1 sibling, 1 reply; 7+ messages in thread

From: Erik Wienhold @ 2024-09-13 16:24 UTC (permalink / raw)
  To: Sathish Reddy <[email protected]>; +Cc: [email protected]; Keith Fiske <[email protected]>; Crunchy Bridge Support <[email protected]>

On 2024-09-13 15:11 +0200, Sathish Reddy wrote:
> We are using 14 version
> Pg_dump with  -Fp and --loading-via-parent-root option
> 
> 
> 
> Database name is better and schema is better. ..

But how are the tables defined, i.e., the CREATE TABLE statements?

Are we talking about table partitions when you're possibly using
--load-via-partition-root (as noted downthread)?

> On Fri, Sep 13, 2024, 6:24 PM Erik Wienhold <[email protected]> wrote:
> 
> > On 2024-09-13 13:30 +0200, Sathish Reddy wrote:
> > > We are trying to take parent table backup included all child tables data
> > > into dump plan format.but we are getting failed to achieve.
> >
> > 1) Which Postgres version?
> >
> > 2) What pg_dump options did you use?
> >
> > 3) What output/error do you get?
> >
> > 4) What does the database schema look like?  Are you using table
> >    inheritance or foreign keys for the parent-child relationship?

-- 
Erik





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

* Re: Pg dump of parent table instead of taking child table
@ 2024-09-13 17:38  Sathish Reddy <[email protected]>
  parent: Erik Wienhold <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Sathish Reddy @ 2024-09-13 17:38 UTC (permalink / raw)
  To: Erik Wienhold <[email protected]>; +Cc: [email protected]; Keith Fiske <[email protected]>; Crunchy Bridge Support <[email protected]>

Thanks we got solution for these

pg_dump -h
ppbet-betplacement-prod-db-00.chllgfpshkd5.eu-west-1.rds.amazonaws.com -U
postgres -d betplacement -t betplacement.bet --data-only --format=custom
--load-via-partition-root > bet.sql

On Fri, Sep 13, 2024, 9:54 PM Erik Wienhold <[email protected]> wrote:

> On 2024-09-13 15:11 +0200, Sathish Reddy wrote:
> > We are using 14 version
> > Pg_dump with  -Fp and --loading-via-parent-root option
> >
> >
> >
> > Database name is better and schema is better. ..
>
> But how are the tables defined, i.e., the CREATE TABLE statements?
>
> Are we talking about table partitions when you're possibly using
> --load-via-partition-root (as noted downthread)?
>
> > On Fri, Sep 13, 2024, 6:24 PM Erik Wienhold <[email protected]> wrote:
> >
> > > On 2024-09-13 13:30 +0200, Sathish Reddy wrote:
> > > > We are trying to take parent table backup included all child tables
> data
> > > > into dump plan format.but we are getting failed to achieve.
> > >
> > > 1) Which Postgres version?
> > >
> > > 2) What pg_dump options did you use?
> > >
> > > 3) What output/error do you get?
> > >
> > > 4) What does the database schema look like?  Are you using table
> > >    inheritance or foreign keys for the parent-child relationship?
>
> --
> Erik
>


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


end of thread, other threads:[~2024-09-13 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-13 11:30 Pg dump of parent table instead of taking child table Sathish Reddy <[email protected]>
2024-09-13 12:54 ` Erik Wienhold <[email protected]>
2024-09-13 13:11   ` Sathish Reddy <[email protected]>
2024-09-13 14:09     ` Holger Jakobs <[email protected]>
2024-09-13 14:16       ` David G. Johnston <[email protected]>
2024-09-13 16:24     ` Erik Wienhold <[email protected]>
2024-09-13 17:38       ` Sathish Reddy <[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