pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Free disk space decreasing after running Vaccum Full
9+ messages / 5 participants
[nested] [flat]

* Free disk space decreasing after running Vaccum Full
@ 2024-06-28 13:58  Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  0 siblings, 3 replies; 9+ messages in thread

From: Sabyasachi Mukherjee @ 2024-06-28 13:58 UTC (permalink / raw)
  To: pgsql-admin; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

Hello All,
The disk space is decreasing drastically after running "Vaccum Full".
I was expecting increase of free disk space after running those commands. I am on Postgresql 16.1
Any guidance/advise?

Sabyasachi Mukherjee

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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 14:43  Idelette Tchakounte <itchakounte@acttoday.com>
  parent: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  2 siblings, 0 replies; 9+ messages in thread

From: Idelette Tchakounte @ 2024-06-28 14:43 UTC (permalink / raw)
  To: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>; pgsql-admin; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

Yes it will decrease as it removes the fragmentation and dirty from existing table.

If you're in cloud environment, it can be done easily from cloud console

[ACT]   Idelette Tchakounte
Sr Database Administrator
Advanced Call Center Technologies, LLC
itchakounte@acttoday.com<mailto:itchakounte@acttoday.com>

________________________________
From: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
Sent: Friday, June 28, 2024 9:58:34 AM
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Free disk space decreasing after running Vaccum Full

CAUTION

This is an external email originating from outside of ACT; do not click links or open attachments unless you know the content is safe.

Hello All,
The disk space is decreasing drastically after running "Vaccum Full".
I was expecting increase of free disk space after running those commands. I am on Postgresql 16.1
Any guidance/advise?

Sabyasachi Mukherjee

Attachments:

  [image/png] Image.png (3.4K, ../../PH0PR15MB529592D8CDB125C80BBA535FDDD02@PH0PR15MB5295.namprd15.prod.outlook.com/3-Image.png)
  download | view image

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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 14:51  Ron Johnson <ronljohnsonjr@gmail.com>
  parent: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  2 siblings, 0 replies; 9+ messages in thread

From: Ron Johnson @ 2024-06-28 14:51 UTC (permalink / raw)
  To: pgsql-admin

On Fri, Jun 28, 2024 at 9:58 AM Sabyasachi Mukherjee <
mukherjee.sabyasachi@outlook.com> wrote:

> Hello All,
> The disk space is decreasing drastically after running "Vaccum Full".
> I was expecting increase of free disk space after running those commands.
> I am on Postgresql 16.1
> Any guidance/advise?
>

1. Tell us *the exact command(s)* that you ran.
2. Why 16.1 instead of 16.3?

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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 14:53  Ron Johnson <ronljohnsonjr@gmail.com>
  parent: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  2 siblings, 1 reply; 9+ messages in thread

From: Ron Johnson @ 2024-06-28 14:53 UTC (permalink / raw)
  To: Pgsql-admin <pgsql-admin@lists.postgresql.org>

On Fri, Jun 28, 2024 at 9:58 AM Sabyasachi Mukherjee <
mukherjee.sabyasachi@outlook.com> wrote:

> Hello All,
> The disk space is decreasing drastically after running "Vaccum Full".
> I was expecting increase of free disk space after running those commands.
> I am on Postgresql 16.1
> Any guidance/advise?
>

3. VACUUM FULL should only be run after deleting or updating a
*significant* portion
of a table.

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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 15:57  Wells Oliver <wells.oliver@gmail.com>
  parent: Ron Johnson <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Wells Oliver @ 2024-06-28 15:57 UTC (permalink / raw)
  To: Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

VACUUM FULL is designed to release disk space back to the OS by rebuilding
the table. Unless I misunderstand, this is the effect and desired intent.

On Fri, Jun 28, 2024 at 7:53 AM Ron Johnson <ronljohnsonjr@gmail.com> wrote:

> On Fri, Jun 28, 2024 at 9:58 AM Sabyasachi Mukherjee <
> mukherjee.sabyasachi@outlook.com> wrote:
>
>> Hello All,
>> The disk space is decreasing drastically after running "Vaccum Full".
>> I was expecting increase of free disk space after running those commands.
>> I am on Postgresql 16.1
>> Any guidance/advise?
>>
>
> 3. VACUUM FULL should only be run after deleting or updating a
> *significant* portion of a table.
>


-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 16:07  Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  parent: Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Sabyasachi Mukherjee @ 2024-06-28 16:07 UTC (permalink / raw)
  To: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Hello ,
Thanks for your response. I am running vacuum full schema_name.table_name.
And after each table run - the amount of free space in the disk in decreasing.
Though I am not deleting any rows from the table.

Sabyasachi Mukherjee
Press Alt+Down for more options
Send

To:


________________________________
From: Wells Oliver <wells.oliver@gmail.com>
Sent: 28 June 2024 17:57
To: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Free disk space decreasing after running Vaccum Full

VACUUM FULL is designed to release disk space back to the OS by rebuilding the table. Unless I misunderstand, this is the effect and desired intent.

On Fri, Jun 28, 2024 at 7:53 AM Ron Johnson <ronljohnsonjr@gmail.com<mailto:ronljohnsonjr@gmail.com>> wrote:
On Fri, Jun 28, 2024 at 9:58 AM Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com<mailto:mukherjee.sabyasachi@outlook.com>> wrote:
Hello All,
The disk space is decreasing drastically after running "Vaccum Full".
I was expecting increase of free disk space after running those commands. I am on Postgresql 16.1
Any guidance/advise?

3. VACUUM FULL should only be run after deleting or updating a significant portion of a table.


--
Wells Oliver
wells.oliver@gmail.com<mailto:wellsoliver@gmail.com>


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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 16:14  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Scott Ribe @ 2024-06-28 16:14 UTC (permalink / raw)
  To: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>; +Cc: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

Perhaps WAL is accumulating from those table rewrites. Could be your WAL settings, and that the WAL will get reused eventually, which is no problem. Could be you have WAL archiving or replication slots, and archiving or replication is broken, and WAL will accumulate until it fills the disk.

That needs to be looked at. But the question still remains as to why you are running VACUUM FULL?




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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 16:23  Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Sabyasachi Mukherjee @ 2024-06-28 16:23 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

I think Scott has a point. I do have a broken logical replication. And the replication is done on the same physical server. I will try to stop that replication.

________________________________
From: Scott Ribe <scott_ribe@elevated-dev.com>
Sent: 28 June 2024 18:14
To: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
Cc: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Free disk space decreasing after running Vaccum Full

Perhaps WAL is accumulating from those table rewrites. Could be your WAL settings, and that the WAL will get reused eventually, which is no problem. Could be you have WAL archiving or replication slots, and archiving or replication is broken, and WAL will accumulate until it fills the disk.

That needs to be looked at. But the question still remains as to why you are running VACUUM FULL?

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

* Re: Free disk space decreasing after running Vaccum Full
@ 2024-06-28 16:53  Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  parent: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Sabyasachi Mukherjee @ 2024-06-28 16:53 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

Or I have to find a way to fix that replication. May be you can help me with that as well -
One error is as follows
2024-06-28 18:44:38.296 CEST [10000] STATEMENT:  CREATE_REPLICATION_SLOT "pg_23568_sync_22182_7319873232440752272" LOGICAL pgoutput (SNAPSHOT 'use')
2024-06-28 18:44:38.318 CEST [11428] ERROR:  duplicate key value violates unique constraint "bgw_job_stat_pkey"
2024-06-28 18:44:38.318 CEST [11428] DETAIL:  Key (job_id)=(1) already exists.

The second error is -
2024-06-28 18:44:38.318 CEST [11428] CONTEXT:  COPY bgw_job_stat, line 1
2024-06-28 18:44:38.337 CEST [4324] LOG:  logical decoding found consistent point at 9D/AE199788
2024-06-28 18:44:38.337 CEST [4324] DETAIL:  There are no running transactions.
2024-06-28 18:44:38.337 CEST [4324] STATEMENT:  CREATE_REPLICATION_SLOT "pg_23568_sync_22389_7319873232440752272" LOGICAL pgoutput (SNAPSHOT 'use')
2024-06-28 18:44:38.355 CEST [4324] ERROR:  syntax error at or near ")" at character 46
2024-06-28 18:44:38.355 CEST [4324] STATEMENT:  COPY _timescaledb_cache.cache_inval_bgw_job () TO STDOUT
2024-06-28 18:44:38.355 CEST [10676] ERROR:  could not start initial contents copy for table "_timescaledb_cache.cache_inval_bgw_job": ERROR:  syntax error at or near ")"
      LINE 1: COPY _timescaledb_cache.cache_inval_bgw_job () TO STDOUT

Note I have timescale DB installed in the DB as well.

Some pointers would be helpful.

Sabyasachi Mukherjee
________________________________
From: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
Sent: 28 June 2024 18:23
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Free disk space decreasing after running Vaccum Full

I think Scott has a point. I do have a broken logical replication. And the replication is done on the same physical server. I will try to stop that replication.

________________________________
From: Scott Ribe <scott_ribe@elevated-dev.com>
Sent: 28 June 2024 18:14
To: Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
Cc: Wells Oliver <wells.oliver@gmail.com>; Ron Johnson <ronljohnsonjr@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Free disk space decreasing after running Vaccum Full

Perhaps WAL is accumulating from those table rewrites. Could be your WAL settings, and that the WAL will get reused eventually, which is no problem. Could be you have WAL archiving or replication slots, and archiving or replication is broken, and WAL will accumulate until it fills the disk.

That needs to be looked at. But the question still remains as to why you are running VACUUM FULL?


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


end of thread, other threads:[~2024-06-28 16:53 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-06-28 13:58 Free disk space decreasing after running Vaccum Full Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
2024-06-28 14:43 ` Idelette Tchakounte <itchakounte@acttoday.com>
2024-06-28 14:51 ` Ron Johnson <ronljohnsonjr@gmail.com>
2024-06-28 14:53 ` Ron Johnson <ronljohnsonjr@gmail.com>
2024-06-28 15:57   ` Wells Oliver <wells.oliver@gmail.com>
2024-06-28 16:07     ` Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
2024-06-28 16:14       ` Scott Ribe <scott_ribe@elevated-dev.com>
2024-06-28 16:23         ` Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.com>
2024-06-28 16:53           ` Sabyasachi Mukherjee <mukherjee.sabyasachi@outlook.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