From: | Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com> |
---|---|
To: | Benjamin Acquaye <benjaminacquaye2(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: vacuuming postgresql15 issues |
Date: | 2023-11-08 14:50:56 |
Message-ID: | CAODZiv6nSX13MyGkWxaHtWhGEhVr1j5RnPR2LxV2TdTivOvwmA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Wed, Nov 8, 2023 at 9:18 AM Benjamin Acquaye <benjaminacquaye2(at)gmail(dot)com>
wrote:
> Hi all,
> I am trying to clean our database tuples with a manual vacuum but it's not
> working any help
>
> "n_dead_tup" 74 17 1 1 6 8 6 8 16 9
>
> thanks
> Ben
>
Check for long running transactions. Vacuum can only clean up dead rows if
there are no transactions running that could possibly need to see those old
rows. The following query will show all currently running transactions, in
order of transaction age along with an additional column to show their
runtime.
SELECT *, now() - xact_start AS xact_runtime FROM pg_stat_activity WHERE
state <> 'idle' ORDER BY xact_start;
--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Fiske | 2023-11-08 14:52:50 | Re: Operating system upgrades on PostgreSQL nodes using streaming replication |
Previous Message | SAS | 2023-11-08 14:35:31 | Re: Not able to connect specific database |