From: Erik Wienhold <ewie@ewie.name>
To: Ian Lawrence Barwick <barwick@gmail.com>
Cc: Hilbert, Karin <ioh1@psu.edu>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Database size different on Primary and Standby?
Date: Thu, 19 Jan 2023 01:47:07 +0100 (CET)
Message-ID: <1018934732.57323.1674089227907@office.mailbox.org> (raw)
In-Reply-To: <CAB8KJ=gf6Eb_GcJQAKSMkg0HKL3ggRoj+k8SR3qvBQDrz9HoxA@mail.gmail.com>
References: <MN2PR02MB6829B5EC7F70762F6136DC6789C79@MN2PR02MB6829.namprd02.prod.outlook.com>
<1852652390.56939.1674085819457@office.mailbox.org>
<CAB8KJ=gf6Eb_GcJQAKSMkg0HKL3ggRoj+k8SR3qvBQDrz9HoxA@mail.gmail.com>
> On 19/01/2023 01:23 CET Ian Lawrence Barwick <barwick@gmail.com> wrote:
>
> 2023年1月19日(木) 8:50 Erik Wienhold <ewie@ewie.name>:
> >
> > > On 19/01/2023 00:09 CET Hilbert, Karin <ioh1@psu.edu> wrote:
> > >
> > > I manage some PostgreSQL clusters on Linux. We have a Primary & two Standby
> > > servers & for Production, there is also a DR server. We use repmgr for our HA
> > > solution & the Standbys are cloned from the Primary using the repmgr standby
> > > clone command.
> > >
> > > My manager asked for a report of all the user databases & their sizes for each
> > > server in the cluster. I used the psql "\l+" command & then extracted the
> > > database name & the size from the output. I expected the databases to be the
> > > same size on the Standbys as on the Primary, but I found that some of the
> > > databases were smaller on the Standby servers than on the Primary.
> > >
> > > For example, the output on the Primary for one of the user databases showed
> > > as: 8997 kB, but on the Standbys, it was 8849 kB.
> >
> > The standbys could be missing some indexes because schema changes are not
> > replicated and must be applied manually.
>
> This is incorrect; with streaming replication all changes applied on the primary
> are applied on the standby.
Thanks. I was thinking about logical replication.
> (...)
> > Could also be different page sizes. But that's a compilation option. What does
> > SHOW block_size say on those systems?
>
> It is impossible to start a standby using binaries built with a
> different block size to
> the primary.
Makes sense for streaming replication.
--
Erik
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ewie@ewie.name, barwick@gmail.com, ioh1@psu.edu
Subject: Re: Database size different on Primary and Standby?
In-Reply-To: <1018934732.57323.1674089227907@office.mailbox.org>
References: <MN2PR02MB6829B5EC7F70762F6136DC6789C79@MN2PR02MB6829.namprd02.prod.outlook.com> <1852652390.56939.1674085819457@office.mailbox.org> <CAB8KJ=gf6Eb_GcJQAKSMkg0HKL3ggRoj+k8SR3qvBQDrz9HoxA@mail.gmail.com> <1018934732.57323.1674089227907@office.mailbox.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox