pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
number of wal file is not reduced.
3+ messages / 2 participants
[nested] [flat]

* number of wal file is not reduced.
@ 2021-07-05 09:48 Atul Kumar <akumar14871@gmail.com>
  2021-07-05 10:51 ` Re: number of wal file is not reduced. hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Atul Kumar @ 2021-07-05 09:48 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

Hi,

I have postgres 9.6 running server on centos 7, the number of wal file
in pg_xlog directory is above 4000 so to save some disk space, I
thought of reducing to 100.

but there is no reduction in numbers.

Please not that there is no replication is configured, the server is
independent.

What I am missing here.

•	max_wal_size = '3GB'
•	checkpoint_timeout = '15min'
•	checkpoint_completion_target=0.8
•	log_checkpoints=on
•	wal_keep_segments=100 (initially it was set to 4000)




Please suggest when the number of wal files will be reduced to approx 100.





regards,
Atul





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: number of wal file is not reduced.
  2021-07-05 09:48 number of wal file is not reduced. Atul Kumar <akumar14871@gmail.com>
@ 2021-07-05 10:51 ` hubert depesz lubaczewski <depesz@depesz.com>
  2021-07-05 11:18   ` Re: number of wal file is not reduced. Atul Kumar <akumar14871@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: hubert depesz lubaczewski @ 2021-07-05 10:51 UTC (permalink / raw)
  To: Atul Kumar <akumar14871@gmail.com>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

On Mon, Jul 05, 2021 at 03:18:14PM +0530, Atul Kumar wrote:
> I have postgres 9.6 running server on centos 7, the number of wal file
> in pg_xlog directory is above 4000 so to save some disk space, I
> thought of reducing to 100.
...
> Please suggest when the number of wal files will be reduced to approx 100.

It's hard to say for sure. There are potential issues that might cause
pg to keep more wal files than configured.

Generally these kinds of things are easier solved in more interactive
medium - like IRC, or Slack.

But, to give you some start, check if:
1. archiving doesn't fail
2. archiving doesn't lag
3. there are no prepared transactions
4. there are no lagging replication slots

Best regards,

depesz






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: number of wal file is not reduced.
  2021-07-05 09:48 number of wal file is not reduced. Atul Kumar <akumar14871@gmail.com>
  2021-07-05 10:51 ` Re: number of wal file is not reduced. hubert depesz lubaczewski <depesz@depesz.com>
@ 2021-07-05 11:18   ` Atul Kumar <akumar14871@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Atul Kumar @ 2021-07-05 11:18 UTC (permalink / raw)
  To: depesz@depesz.com; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

Hi ,

As I mentioned in my mail that there is no replication configured and
no archival is lagging.

my query is simple.

How to to reduce the number of wal file from 4000 to 100 in an
independent server ?



Regards.

On 7/5/21, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> On Mon, Jul 05, 2021 at 03:18:14PM +0530, Atul Kumar wrote:
>> I have postgres 9.6 running server on centos 7, the number of wal file
>> in pg_xlog directory is above 4000 so to save some disk space, I
>> thought of reducing to 100.
> ...
>> Please suggest when the number of wal files will be reduced to approx
>> 100.
>
> It's hard to say for sure. There are potential issues that might cause
> pg to keep more wal files than configured.
>
> Generally these kinds of things are easier solved in more interactive
> medium - like IRC, or Slack.
>
> But, to give you some start, check if:
> 1. archiving doesn't fail
> 2. archiving doesn't lag
> 3. there are no prepared transactions
> 4. there are no lagging replication slots
>
> Best regards,
>
> depesz
>
>





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-07-05 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 09:48 number of wal file is not reduced. Atul Kumar <akumar14871@gmail.com>
2021-07-05 10:51 ` hubert depesz lubaczewski <depesz@depesz.com>
2021-07-05 11:18   ` Atul Kumar <akumar14871@gmail.com>

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