Re: Database size different on Primary and Standby?

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Database size different on Primary and Standby?
Дата
Msg-id 1852652390.56939.1674085819457@office.mailbox.org
обсуждение исходный текст
Ответ на Database size different on Primary and Standby?  ("Hilbert, Karin" <ioh1@psu.edu>)
Ответы Re: Database size different on Primary and Standby?  (Ian Lawrence Barwick <barwick@gmail.com>)
Список pgsql-general
> 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.

> I even dropped the database on the Primary & then restored it from a backup.
> Then checked the sizes again & they still showed the difference.
>
> I also found that the template1 database on the Primary was 7821 kB, but on
> the Standbys, it was 7673 kB. Is this normal? Why would the sizes be different?

Is template1 identical (schema and data) on primary and standby?

Could also be different page sizes. But that's a compilation option. What does
SHOW block_size say on those systems?

--
Erik



В списке pgsql-general по дате отправления:

Предыдущее
От: "Hilbert, Karin"
Дата:
Сообщение: Database size different on Primary and Standby?
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: Database size different on Primary and Standby?