public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Koen De Groote <[email protected]>
To: PostgreSQL General <[email protected]>
Subject: Re: Is a VACUUM or ANALYZE necessary after logical replication?
Date: Sat, 15 Jun 2024 16:13:32 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGbX52EwdrpPLyRuRRpnbhUqfQYijVz3cShSMuoXrs2Lgkod5Q@mail.gmail.com>
References: <CAGbX52EwdrpPLyRuRRpnbhUqfQYijVz3cShSMuoXrs2Lgkod5Q@mail.gmail.com>
On 6/15/24 15:55, Koen De Groote wrote:
> I've gone over all of
> https://www.postgresql.org/docs/current/logical-replication.html
> <https://www.postgresql.org/docs/current/logical-replication.html; and
> the only mentions of the word "index" I could find was in relation to
> replica identity and examples of table definitions showing primary key
> indexes.
>
> Nothing is said about indexes. Maybe for good reason, maybe they are
> fully functionality immediately after replication?
>
> So the main question: Once a table is fully replicated, do I need to
> vacuum(analyze) that table, or are the indexes on that table already
> functional?
VACUUM/ANALYZE is not about making the index functional. The VACUUM
marks the space dead tuples occupy in the table and associated indexes
as available for recycling. The ANALYZE updates tables statistics to
help the planner make decisions on what query plan to use. On a fresh
table VACUUM will not be of much value, ANALYZE though will help by
creating up to date table statistics.
>
> Regards,
> Koen De Groote
--
Adrian Klaver
[email protected]
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Is a VACUUM or ANALYZE necessary after logical replication?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox