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 1sLGO7-00E8kZ-Q5 for pgsql-general@arkaria.postgresql.org; Sun, 23 Jun 2024 06:07:43 +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 1sLGO6-005Gcy-3Z for pgsql-general@arkaria.postgresql.org; Sun, 23 Jun 2024 06:07:42 +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 1sLGO5-005Gcq-OM for pgsql-general@lists.postgresql.org; Sun, 23 Jun 2024 06:07:42 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sLGO4-0035uF-59 for pgsql-general@lists.postgresql.org; Sun, 23 Jun 2024 06:07:41 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-250ca14422aso1757498fac.0 for ; Sat, 22 Jun 2024 23:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719122858; x=1719727658; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VnzAsrgsLsI+4Jij0eu5aKCYukh0NIzwpk6gFa5Hwvw=; b=SWtM+/uPpJ6/j5JVYjCC9W+rKbPxi+2wKWHdalUqaE1fnJJ69RdIrEu3dAepJYtBJn DMjt4pDYBkhAMtwuoQHunuAnVKmxopI5aprZcEyyjDcf3mjlol9AudNhf9ihzrPkSIsb XOSa0pARIGRx/WBNBEEfortIyZbBoDuJLTKRJsMdci6cSZ4I9FIkLHCaWAOFJXgpeXLX b2uPWohuQ63jCfPJTxFintDSrOgKrND3nuGxTRBimWYQy89dA8ocbR1xdrhZeeLAWJpl oocD4YsfbaNwJ2s55QQrihovfH8e+0qcfFRQPjWJyae3HkVy1yS6F6Mhj1d5QjgUHD0S LiTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719122858; x=1719727658; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VnzAsrgsLsI+4Jij0eu5aKCYukh0NIzwpk6gFa5Hwvw=; b=Ud1TnGaN70EBdwSIiBmODiHZ2EbDcN/FjpZRIdccl3x/KJS2Hr/t/kVzqWjezfBgDR CRJ2nQEZHexWEDPeJubX2380TVprmSYfg5MPy1jDa3ALl391ZWmxR2uLN/i4mTsrImdC uXo9lmA1PtGRigS+lBrHsHk2FUJothB8dx1knZ5JQ3dHmr6gfnM+2YQtqBcTmBl3BExK fC/mCKjcKTa0Ko2bWas8S3dR13kBsBnArNmjWRvBryHOzk+m2odonHpDLRfZ/312Jd11 4S78b2mSiZAsqDJBnLhN6Bl9RK0zGfx0o9hJdo2zCEiobsDDu3uxtLPdo82b5f8RcLJ8 HT3Q== X-Gm-Message-State: AOJu0YxuZlXXqmXkb1YJ9t41ezETrDfPUDpbZkyToQqqWuDVa/bnwNvv cubjkICzjTWhW/+0c0Fyi6u0wH5kYm46NEdw9Cr2VGt+tcaW6RhL2+oqxAwhvV4uuI3wlduCFqH KF7VFQr4+QdfEUXhbdOMV3Q1m6ox1MA== X-Google-Smtp-Source: AGHT+IGW6FqWttusX3dfdFRWtnCAj5dhWBd4g9SY+axlFBu+Vtu6OnTYi4LEnB3WdUObIxnyppE8KuaOnE+SfOku74s= X-Received: by 2002:a05:6870:89aa:b0:24f:dad3:97c with SMTP id 586e51a60fabf-25d06e57b0bmr1642450fac.46.1719122858182; Sat, 22 Jun 2024 23:07:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:4688:0:b0:539:aa10:6c7 with HTTP; Sat, 22 Jun 2024 23:07:37 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Sat, 22 Jun 2024 23:07:37 -0700 Message-ID: Subject: Re: pg_dump restores as expected on some machines and reports duplicate keys on others To: Shaheed Haque Cc: pgsql-general list Content-Type: multipart/alternative; boundary="000000000000498ffd061b887beb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000498ffd061b887beb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Saturday, June 22, 2024, David G. Johnston wrote: > On Saturday, June 22, 2024, Shaheed Haque wrote: >> >> >> - The one difference I can think of between deployment pairs which >> work ok, and those which fail is that the logic VM (i.e. where the ps= ql >> client script runs) is the use of a standard AWS ubuntu image for the= OK >> case, versus a custom AWS image for the failing case. >> - The custom image is a saved snapshot of one created using the >> standard image. >> >> Why should the use of one type of VM image versus another cause >> pg_restore to hallucinate the duplicate records? >> > > To tie the other comments to your description: you took/have a snapshot o= f > the base image after you created the database and added some records to > it. Nothing wrong here - you just need to decide how you want to deal wi= th > the situation. > Sorry, but to be clear/clarify - you must be using an RDS snapshot as well as an EC2 snapshot, a fresh built RDS cluster isn=E2=80=99t going to be com= plaining about things (especially the database) existing. David J. --000000000000498ffd061b887beb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Saturday, June 22, 2024, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Saturday, June 22, 2024, Shaheed Haque <shaheedhaque@gmail.com= > wrote:
    The one difference I can think of between deployment pairs which work ok, = and those which fail is that the logic VM (i.e. where the psql client scrip= t runs) is the use of a standard AWS ubuntu image for the OK case, versus a= custom AWS image for the failing case.
    • The custom image is a s= aved snapshot of one created using the standard image.
Why should the use of one type of VM image versus another cause pg_resto= re to hallucinate the duplicate records?

To tie the other comments to your description: you took/hav= e a snapshot of the base image after you created the database and added som= e records to it.=C2=A0 Nothing wrong here - you just need to decide how you= want to deal with the situation.

Sor= ry, but to be clear/clarify - you must be using an RDS snapshot as well as = an EC2 snapshot, a fresh built RDS cluster isn=E2=80=99t going to be compla= ining about things (especially the database) existing.

=
David J.
--000000000000498ffd061b887beb--