Обсуждение: Wal file increase
Dears,
Appreciate your usual support that we facing an issue when take pg_basebackup for 4 TB database in standby server and when backup finished we face huge number of wal file with huge size generated for 6 hours the cause replication interruption.
Thanks
On Sun, 2025-12-14 at 17:30 +0200, kasem adel wrote: > Appreciate your usual support that we facing an issue when take pg_basebackup for 4 TB > database in standby server and when backup finished we face huge number of wal file > with huge size generated for 6 hours the cause replication interruption. If you want help with that, you will have to give us enough information to explain what happened. - What exactly is a "replication interruption", and how do you diagnose it? - Are you using streaming replication or logical replication? - If it is streaming replication, are you using a replication slot? - It is expected that if you suspend replication and have a replication slot, WAL will pile up on the primary. But what is the connection with pg_basebackup? Yours, Laurenz Albe
Dear @Laurenz Albe,
Thanks for your support We have physical replication connection with Postgres node standby and have another replication slot with logical replication with another node and every day after run pg_basebackup we face huge number of file created and size per every hour is 23GB and in normal size is 0.8 GB and in logical replication we see in logs it’s in same checkpoint but baseline change and we run pg_basebackup with -X fetch -C fast.
Thanks
من: Laurenz Albe <laurenz.albe@cybertec.at>
تم الإرسال: Monday, December 15, 2025 8:31:05 AM
إلى: kasem adel <kasemadel8@gmail.com>; pgsql-admin <pgsql-admin@postgresql.org>
الموضوع: Re: Wal file increase
تم الإرسال: Monday, December 15, 2025 8:31:05 AM
إلى: kasem adel <kasemadel8@gmail.com>; pgsql-admin <pgsql-admin@postgresql.org>
الموضوع: Re: Wal file increase
On Sun, 2025-12-14 at 17:30 +0200, kasem adel wrote:
> Appreciate your usual support that we facing an issue when take pg_basebackup for 4 TB
> database in standby server and when backup finished we face huge number of wal file
> with huge size generated for 6 hours the cause replication interruption.
If you want help with that, you will have to give us enough information to explain what
happened.
- What exactly is a "replication interruption", and how do you diagnose it?
- Are you using streaming replication or logical replication?
- If it is streaming replication, are you using a replication slot?
- It is expected that if you suspend replication and have a replication slot, WAL will
pile up on the primary. But what is the connection with pg_basebackup?
Yours,
Laurenz Albe
> Appreciate your usual support that we facing an issue when take pg_basebackup for 4 TB
> database in standby server and when backup finished we face huge number of wal file
> with huge size generated for 6 hours the cause replication interruption.
If you want help with that, you will have to give us enough information to explain what
happened.
- What exactly is a "replication interruption", and how do you diagnose it?
- Are you using streaming replication or logical replication?
- If it is streaming replication, are you using a replication slot?
- It is expected that if you suspend replication and have a replication slot, WAL will
pile up on the primary. But what is the connection with pg_basebackup?
Yours,
Laurenz Albe
On Mon, 2025-12-15 at 07:25 +0000, kasem adel wrote: > Thanks for your support We have physical replication connection with Postgres node standby > and have another replication slot with logical replication with another node and every day > after run pg_basebackup we face huge number of file created and size per every hour is 23GB > and in normal size is 0.8 GB and in logical replication we see in logs it’s in same > checkpoint but baseline change and we run pg_basebackup with -X fetch -C fast. pg_basebackup does not increase the WAL volume, except by the full-page images that get written after any checkpoint. So you'd need to find an explanation for that. "-X fetch" is not a good choice. Use "-X stream". Anyway, you didn't answer all my questions. Yours, Laurenz Albe
Dear @Laurenz Albe,
-What exactly is a "replication interruption", and how do you diagnose it?
We see replication slot restart every time in these period
- Are you using streaming replication or logical replication?
I have streaming replication for one node and another logical replication
- If it is streaming replication, are you using a replication slot?
Yes have replication slot
- It is expected that if you suspend replication and have a replication slot, WAL will
pile up on the primary. But what is the connection with pg_basebackup?
We see replication slot restart every time in these period
- Are you using streaming replication or logical replication?
I have streaming replication for one node and another logical replication
- If it is streaming replication, are you using a replication slot?
Yes have replication slot
- It is expected that if you suspend replication and have a replication slot, WAL will
pile up on the primary. But what is the connection with pg_basebackup?
Yes still exist.
احصل على Outlook لـ iOS
من: Laurenz Albe <laurenz.albe@cybertec.at>
تم الإرسال: Monday, December 15, 2025 10:09:00 AM
إلى: kasem adel <kasemadel8@gmail.com>; pgsql-admin <pgsql-admin@postgresql.org>
الموضوع: Re: Wal file increase
تم الإرسال: Monday, December 15, 2025 10:09:00 AM
إلى: kasem adel <kasemadel8@gmail.com>; pgsql-admin <pgsql-admin@postgresql.org>
الموضوع: Re: Wal file increase
On Mon, 2025-12-15 at 07:25 +0000, kasem adel wrote:
> Thanks for your support We have physical replication connection with Postgres node standby
> and have another replication slot with logical replication with another node and every day
> after run pg_basebackup we face huge number of file created and size per every hour is 23GB
> and in normal size is 0.8 GB and in logical replication we see in logs it’s in same
> checkpoint but baseline change and we run pg_basebackup with -X fetch -C fast.
pg_basebackup does not increase the WAL volume, except by the full-page images that get
written after any checkpoint. So you'd need to find an explanation for that.
"-X fetch" is not a good choice. Use "-X stream".
Anyway, you didn't answer all my questions.
Yours,
Laurenz Albe
> Thanks for your support We have physical replication connection with Postgres node standby
> and have another replication slot with logical replication with another node and every day
> after run pg_basebackup we face huge number of file created and size per every hour is 23GB
> and in normal size is 0.8 GB and in logical replication we see in logs it’s in same
> checkpoint but baseline change and we run pg_basebackup with -X fetch -C fast.
pg_basebackup does not increase the WAL volume, except by the full-page images that get
written after any checkpoint. So you'd need to find an explanation for that.
"-X fetch" is not a good choice. Use "-X stream".
Anyway, you didn't answer all my questions.
Yours,
Laurenz Albe
On Mon, 2025-12-15 at 08:19 +0000, kasem adel wrote: > > -What exactly is a "replication interruption", and how do you diagnose it? > We see replication slot restart every time in these period I have never heard of a "replication slot restart"... > > - Are you using streaming replication or logical replication? > I have streaming replication for one node and another logical replication > > - If it is streaming replication, are you using a replication slot? > Yes have replication slot > > - It is expected that if you suspend replication and have a replication slot, WAL will > > pile up on the primary. But what is the connection with pg_basebackup? > Yes still exist. You probably need to hire an expert to have a look at your system and find out what *really* is going on there. Yours, Laurenz Albe