Re: BUG #18084: Count Mismatch Challenges During PostgreSQL Database Migration: Causes and Solutions

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Git Queries <gitqueries0(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18084: Count Mismatch Challenges During PostgreSQL Database Migration: Causes and Solutions
Date: 2023-09-07 00:26:53
Message-ID: CAApHDvqUPNknOz1FELujUFxys67r6eLLH=y-HQf-F=Ni+8e1gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 7 Sept 2023 at 11:17, Bruce Momjian <bruce(at)momjian(dot)us> 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.

David

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2023-09-07 01:00:15 Re: BUG #18084: Count Mismatch Challenges During PostgreSQL Database Migration: Causes and Solutions
Previous Message Bruce Momjian 2023-09-06 18:02:19 Re: BUG #18084: Count Mismatch Challenges During PostgreSQL Database Migration: Causes and Solutions