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 1qe3Nf-005asb-91 for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Sep 2023 01:00:23 +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 1qe3Nc-00EE2v-R7 for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Sep 2023 01:00:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qe3Nc-00EE2c-A2 for pgsql-bugs@lists.postgresql.org; Thu, 07 Sep 2023 01:00:20 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qe3NY-0039nZ-QA for pgsql-bugs@lists.postgresql.org; Thu, 07 Sep 2023 01:00:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=VWjjsfcNQzmlkP86NuG1c38M45psqneuCfE/8rQ0MqA=; b=SL6Ox UmVQJfnB+8rW0/VKuKVhp2/6xcpvotUJQz8isSjo0HxdYOSu3bHyUdVGo0cfWlWt8/sRTCDeG46wo Wrw2+cNn+UEi0optCMxnIP5SGNsm+4BH41zrLzKqPZNNydDe8d2JE38K/FQah7qgBIt4rZzkO56NI 9X+3dLGpPji4Wr6iscyH+vzeYiPc4emXsKQMrSrh15xaADJ+SxNPo7ywkKRZTg6mPI/B5dDlFHS0j lhoYSAsUfld0vN+qKQUpD8XPGeDBCJ2Rh3yPl3IYLXYK11gVD6HEEvRr2JQXxWIoylaAe2Yq5vvjR ZvD8kgrGlHG7DAjyqzewecgNqem8w==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qe3NX-006E5K-1h; Wed, 06 Sep 2023 21:00:15 -0400 Date: Wed, 6 Sep 2023 21:00:15 -0400 From: Bruce Momjian To: David Rowley Cc: Git Queries , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18084: Count Mismatch Challenges During PostgreSQL Database Migration: Causes and Solutions Message-ID: References: <18084-f96f8e0e21fc3bea@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Sep 7, 2023 at 12:26:53PM +1200, David Rowley wrote: > On Thu, 7 Sept 2023 at 11:17, Bruce Momjian wrote: > > > > On Wed, Sep 6, 2023 at 11:11:05PM +0530, Git Queries wrote: > > > Migration was performed using pg_dump. > > > > Uh, that is kind of a surprise since pg_dump/restore does a logical dump > > --- none of the binary files are transfered, so it should always be > > accurate. > > I can't be certain, but I think the likely reason here is that the > newly restored instance is fine and all indexes match the heap, but > it's the source instance that has indexes with missing entries. Since > the pg_dump queries are most likely to result in seqscans, then all > rows will be returned and the new instance has no missing rows. Yes, very good point. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.