Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spAG3-00H6oT-B6 for pgsql-admin@arkaria.postgresql.org; Fri, 13 Sep 2024 17:39:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1spAG2-008F8U-8L for pgsql-admin@arkaria.postgresql.org; Fri, 13 Sep 2024 17:38:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1spAG1-008F8M-PJ for pgsql-admin@lists.postgresql.org; Fri, 13 Sep 2024 17:38:57 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1spAFt-0011f5-UV for pgsql-admin@lists.postgresql.org; Fri, 13 Sep 2024 17:38:57 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-5e19b1656ddso492824eaf.0 for ; Fri, 13 Sep 2024 10:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726249129; x=1726853929; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=joI05HmgGQ5AF7iukDPEQw08prtxfzsapY9gIDavdz4=; b=kepAyLFxE1VG/wN9q3313qv6amYYZjp/jvDzZSrmV3YwFnHvJIeNPMgvcI9w249gG3 hTt769u8husGcBgHVOLsoTRHmahcQFKeUrKvkP/qE9n6SwwaeluaM2u/Z8jxxUGhnUGO MAvnGWqsankMMewbSFBQE8ZFNFjqGRmobtvb060nVBhbduVD86PMVDgp86AL5J2o03W4 wNHjHwjwhezPmfzFSU/6t6FTrU6IBfDczDEZrEfHzLrCjbLo1nSmYJN4HhMhhh5HO5SA 4qEFCEDlthkOpMj5eXTTFKCzD90SfaX4laFaFHHAHTAvPz9zX6ZYbRte+54I+0VbL42o cqzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726249129; x=1726853929; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=joI05HmgGQ5AF7iukDPEQw08prtxfzsapY9gIDavdz4=; b=nTwD5ulUIVxiYnL7h/c4ceQGy5RUaAGBFIvYrbpIa5UbCwcm2n7sEE1qTyCllqiiQr YdwDyUauZUf6crm8MvfcTC6EATmbOAOdn2e2P9SADLZUiYHnrwO33stEvQ+jKRQ3ZsIJ tgLgrtRCsPYzCcwmnxMrlJENR9grbq1ODqnOpd9BEUwq5yzzo1rKNUxxrmV9EOA5Riqn cPSMIObJs6hSc2m20ctAlQl4wdQ9Bv9t0vTrf7iOz58V88cx9dd1PiBHc1LD1yt0Hje8 biZrNmFmJ8ALxb7LXNdlyKKc1g192/51afbPCpPI1n+2uGIO08EOAOCNTVxVP67dQQXP sDLA== X-Gm-Message-State: AOJu0Yzh9pkPZQBYmOWycuFAymac3RRjK+HPA+Nhms3stDSdsr1dzkTc DPB2owgRfTbOly3PS4UIQH4deSnU5BZn4a6CM72IigJ9deucRiua+QmQU95qjtVkn6+Dfwe4fQK O0OUrnYXB6u/wPrDI1G6JcJIPresCy8+v X-Google-Smtp-Source: AGHT+IFOmPsg8l47hMVfJdZ6Iq/fR2rqwWt3837c0CiYuYn+p/Tx52ptb4D+4+c4goaRBCKw/zXBvJmbdQTuG2SPFc0= X-Received: by 2002:a05:6820:60d:b0:5e1:9741:962c with SMTP id 006d021491bc7-5e20c1f9c69mr1936933eaf.2.1726249129079; Fri, 13 Sep 2024 10:38:49 -0700 (PDT) MIME-Version: 1.0 References: <4996c1e7-2eec-4fae-ad75-b337cfad65de@ewie.name> In-Reply-To: <4996c1e7-2eec-4fae-ad75-b337cfad65de@ewie.name> From: Sathish Reddy Date: Fri, 13 Sep 2024 23:08:36 +0530 Message-ID: Subject: Re: Pg dump of parent table instead of taking child table To: Erik Wienhold Cc: pgsql-admin@lists.postgresql.org, Keith Fiske , Crunchy Bridge Support Content-Type: multipart/alternative; boundary="00000000000021fb9b062203b2c0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000021fb9b062203b2c0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3Dcustom --load-via-partition-root > bet.sql On Fri, Sep 13, 2024, 9:54=E2=80=AFPM Erik Wienhold 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=E2=80=AFPM Erik Wienhold wr= ote: > > > > > 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 > --00000000000021fb9b062203b2c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Thanks we got solution for these

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


On Fri= , Sep 13, 2024, 9:54=E2=80=AFPM Erik Wienhold <ewie@ewie.name> wrote:
On 2024-09-13 15:11 +0200, Sathish Reddy wrote:
> We are using 14 version
> Pg_dump with=C2=A0 -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=E2=80=AFPM Erik Wienhold <ewie@ewie.name= > 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.<= br> > >
> > 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?=C2=A0 Are you using t= able
> >=C2=A0 =C2=A0 inheritance or foreign keys for the parent-child rel= ationship?

--
Erik
--00000000000021fb9b062203b2c0--