Re: Increased work_mem for "logical replication tablesync worker" only? - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Increased work_mem for "logical replication tablesync worker" only?
Date
Msg-id CAA4eK1Lqjrt1s2Dm+yqO4dzwNUA7ixRCLFYF5Rtk_+dj4q-E8Q@mail.gmail.com
Whole thread Raw
In response to Re: Increased work_mem for "logical replication tablesync worker" only?  (Dmitry Koterov <dmitry.koterov@gmail.com>)
List pgsql-hackers
On Mon, Feb 3, 2025 at 6:19 PM Dmitry Koterov <dmitry.koterov@gmail.com> wrote:
>
> What's also suspicious is that on the destination node, after copying finishes,
>
> # explain select 1 from mytable;
>  Seq Scan on mytable (cost=0.00..6821514.12 rows=250410012 width=4)
>
> # SELECT relname, n_live_tup FROM pg_stat_user_tables WHERE relname = 'mytable';
>    relname   | estimated_rows
> -------------+----------------
>  mytable     |      150342468
>
> Notice the discrepancy between how many rows EXPLAIN thinks there is in the table, and how many rows
pg_stat_user_tablesthinks about it (250M vs. 150M). 
>

Is it possible that analyze has not yet run on the table on
subscribers? Can you try running the Analyze command on the subscriber
before trying the above two statements?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Increased work_mem for "logical replication tablesync worker" only?
Next
From: vignesh C
Date:
Subject: Re: Avoid updating inactive_since for invalid replication slots