Re: db maintanance problem VACUUM FULL

2025-06-12 Thread Ron Johnson
On Thu, Jun 12, 2025 at 9:24 AM Laurenz Albe wrote: > On Thu, 2025-06-12 at 15:14 +0200, Pavol Sekeres wrote: > > We recently updated our production database to PostgreSQL 12.22 from the > 9.6.24 version. > > We didn't want to make a big jump. > > But you should have. v12 is out of support. > T

Re: db maintanance problem VACUUM FULL

2025-06-12 Thread Ron Johnson
TB in size with one stand-by replica of equal size. > The database is more than 5 years old. > > We do run AUTOVACUUM processes on all tables periodically. > We have never run VACUUM FULL on any table. > This is because we can't afford to lock out tables for a long time. > &g

Re: db maintanance problem VACUUM FULL

2025-06-12 Thread Laurenz Albe
replica of equal size. > > We do run AUTOVACUUM processes on all tables periodically. > We have never run VACUUM FULL on any table. > This is because we can't afford to lock out tables for a long time. > > Tables can be more than 100GB in size. > They are being updated d

db maintanance problem VACUUM FULL

2025-06-12 Thread Pavol Sekeres
y. We have never run VACUUM FULL on any table. This is because we can't afford to lock out tables for a long time. Tables can be more than 100GB in size. They are being updated daily. Also due to GDPR old data is erased on a daily basis. We think these tables might get eventually bloated. Can

Re: VACUUM FULL, power failure results in unrecoverable space

2024-12-02 Thread Guillaume Lelarge
loat.sql > indicated > approximately 600GB of bloat in the table. > > I initiated a VACUUM FULL operation to reclaim this space, but during > execution, the server experienced a power failure. > > > After server recovery: > > 1. The database came back online successfully > 2.

VACUUM FULL, power failure results in unrecoverable space

2024-12-02 Thread Pierre Barre
Hello, I encountered an issue while attempting to reclaim space from a heavily bloated table: Initial analysis using https://github.com/ioguix/pgsql-bloat-estimation/blob/master/table/table_bloat.sql indicated approximately 600GB of bloat in the table. I initiated a VACUUM FULL operation to

Re: Vacuum full connection exhaustion

2024-08-09 Thread Costa Alexoglou
On Fri, Aug 9, 2024 at 1:02 AM David Rowley wrote: > On Fri, 9 Aug 2024 at 02:12, Christophe Pettus wrote: > > VACUUM FULL takes an exclusive lock on the table that it is operating > on. It's possible that a connection becomes blocked on that exclusive lock > waiting fo

Re: Vacuum full connection exhaustion

2024-08-08 Thread Christophe Pettus
> On Aug 8, 2024, at 21:15, Ron Johnson wrote: > > "I see a lock, so let's cause another one!" That's crazy. It's more "Oh, look, I need a connection to service this web request, but my pool is empty, so I'll just fire up a new connection to the server," lather, rinse, repeat. Pretty comm

Re: Vacuum full connection exhaustion

2024-08-08 Thread Ron Johnson
t; So I am running Benchbase (a benchmark framework) with 50 terminals (50 > concurrent connections). > > There are 2-3 additional connections, one for a postgres-exporter > container for example. > > > > So far so good, and with a `max_connections` at 100 there is

Re: Vacuum full connection exhaustion

2024-08-08 Thread David Rowley
On Fri, 9 Aug 2024 at 02:12, Christophe Pettus wrote: > VACUUM FULL takes an exclusive lock on the table that it is operating on. > It's possible that a connection becomes blocked on that exclusive lock > waiting for the VACUUM FULL to finish, the application sees the connection

Re: Vacuum full connection exhaustion

2024-08-08 Thread Christophe Pettus
nnections). > There are 2-3 additional connections, one for a postgres-exporter container > for example. > > So far so good, and with a `max_connections` at 100 there is no problem. What > happens is that if I execute manually `VACUUM FULL` the connections are > exhausted. VAC

Re: Vacuum full connection exhaustion

2024-08-08 Thread Francisco Olarte
ood, and with a `max_connections` at 100 there is no problem. What > happens is that if I execute manually `VACUUM FULL` the connections are > exhausted. > Also tried this with 150 `max_connections` to see if it just “doubles” the > current connections, but as it turned out, it still exhausted a

Re: Vacuum full connection exhaustion

2024-08-08 Thread Ron Johnson
ons). > There are 2-3 additional connections, one for a postgres-exporter > container for example. > > So far so good, and with a `max_connections` at 100 there is no problem. > What happens is that if I execute manually `VACUUM FULL` > Off-topic, but... *WHY?? *It almost certa

Vacuum full connection exhaustion

2024-08-08 Thread Costa Alexoglou
far so good, and with a `max_connections` at 100 there is no problem. What happens is that if I execute manually `VACUUM FULL` the connections are exhausted. Also tried this with 150 `max_connections` to see if it just “doubles” the current connections, but as it turned out, it still exhausted all

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Ron Johnson
On Mon, Apr 22, 2024 at 5:56 PM Adrian Klaver wrote: > On 4/22/24 14:35, Ron Johnson wrote: > > > > > > > On Stack Exchange, I've got a question on how to determine when > > to run > > > CLUSTER. It ties in strongly with this thread.. > > > > > > > And the link is? >

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Adrian Klaver
On 4/22/24 14:35, Ron Johnson wrote: > > On Stack Exchange, I've got a question on how to determine when to run > CLUSTER.  It ties in strongly with this thread.. > And the link is? It should have been the initial question of this thread and it explains what you a

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Ron Johnson
This is a case specific to you and this particular circumstance, not > a > > general rule for VACUUM FULL. If for no other reason then it might > make > > more sense for the application that the CLUSTER be done on some other > > index then the PK. > > &

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Adrian Klaver
if the PK is a sequence (whether that be an actual sequence, or a timestamp or something else that grows monotonically)." This is a case specific to you and this particular circumstance, not a general rule for VACUUM FULL. If for no other reason then it might make more sense for the

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Ron Johnson
p or something else that grows monotonically)." > > This is a case specific to you and this particular circumstance, not a > general rule for VACUUM FULL. If for no other reason then it might make > more sense for the application that the CLUSTER be done on some other > index then

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Adrian Klaver
On 4/22/24 12:51, Ron Johnson wrote: On Mon, Apr 22, 2024 at 3:14 PM Adrian Klaver <mailto:adrian.kla...@aklaver.com>> wrote: 1) If they are already in enough of a PK order that the CLUSTER time vs VACUUM FULL time would not be material as there is not much or any s

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Ron Johnson
, 2024, 08:37 Ron Johnson > <mailto:ronljohnso...@gmail.com>> wrote: > > > > On Mon, Apr 22, 2024 at 10:25 AM Tom Lane > <mailto:t...@sss.pgh.pa.us>> wrote: > > > > Marcos Pegoraro > <mailt

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Adrian Klaver
ane mailto:t...@sss.pgh.pa.us>> wrote: Marcos Pegoraro mailto:mar...@f10.com.br>> writes: > But wouldn't it be good that VACUUM FULL uses that index defined by > Cluster, if it exists ? No ... what would be the difference

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Ron Johnson
On Mon, Apr 22, 2024 at 12:29 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > > On Mon, Apr 22, 2024, 08:37 Ron Johnson wrote: > >> On Mon, Apr 22, 2024 at 10:25 AM Tom Lane wrote: >> >>> Marcos Pegoraro writes: >>> > But w

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Marcos Pegoraro
Em seg., 22 de abr. de 2024 às 11:25, Tom Lane escreveu: > No ... what would be the difference then Well, I think if a cluster index was defined sometime in a table, it should be respected for next commands, including VACUUM FULL. If I want to come back to PK or any other index I would

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread David G. Johnston
On Mon, Apr 22, 2024, 08:37 Ron Johnson wrote: > On Mon, Apr 22, 2024 at 10:25 AM Tom Lane wrote: > >> Marcos Pegoraro writes: >> > But wouldn't it be good that VACUUM FULL uses that index defined by >> > Cluster, if it exists ? >> >> No ... wha

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Adrian Klaver
On 4/22/24 08:37, Ron Johnson wrote: On Mon, Apr 22, 2024 at 10:25 AM Tom Lane <mailto:t...@sss.pgh.pa.us>> wrote: Marcos Pegoraro mailto:mar...@f10.com.br>> writes: > But wouldn't it be good that VACUUM FULL uses that index defined by > Cluster, if it

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Ron Johnson
On Mon, Apr 22, 2024 at 10:25 AM Tom Lane wrote: > Marcos Pegoraro writes: > > But wouldn't it be good that VACUUM FULL uses that index defined by > > Cluster, if it exists ? > > No ... what would be the difference then? > What the VACUUM docs "should"

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Tom Lane
Marcos Pegoraro writes: > But wouldn't it be good that VACUUM FULL uses that index defined by > Cluster, if it exists ? No ... what would be the difference then? regards, tom lane

Re: CLUSTER vs. VACUUM FULL

2024-04-22 Thread Marcos Pegoraro
Em dom., 21 de abr. de 2024 às 22:35, David Rowley escreveu: > > Both VACUUM FULL and CLUSTER go through a very similar code path. Both > use cluster_rel(). VACUUM FULL just won't make use of an existing > index to provide presorted input or perform a sort, whereas CLUSTER

Re: CLUSTER vs. VACUUM FULL

2024-04-21 Thread Ron Johnson
On Sun, Apr 21, 2024 at 9:35 PM David Rowley wrote: > On Mon, 22 Apr 2024 at 12:16, Ron Johnson wrote: > > > > On Sun, Apr 21, 2024 at 6:45 PM Tom Lane wrote: > >> > >> Ron Johnson writes: > >> > Why is VACUUM FULL recommended for compressing a tab

Re: CLUSTER vs. VACUUM FULL

2024-04-21 Thread David Rowley
On Mon, 22 Apr 2024 at 12:16, Ron Johnson wrote: > > On Sun, Apr 21, 2024 at 6:45 PM Tom Lane wrote: >> >> Ron Johnson writes: >> > Why is VACUUM FULL recommended for compressing a table, when CLUSTER does >> > the same thing (similarly doubling disk

Re: CLUSTER vs. VACUUM FULL

2024-04-21 Thread Ron Johnson
On Sun, Apr 21, 2024 at 6:45 PM Tom Lane wrote: > Ron Johnson writes: > > Why is VACUUM FULL recommended for compressing a table, when CLUSTER does > > the same thing (similarly doubling disk space), and apparently runs just > as > > fast? > > CLUSTER makes the

Re: CLUSTER vs. VACUUM FULL

2024-04-21 Thread Ron Johnson
On Sun, Apr 21, 2024 at 6:45 PM Tom Lane wrote: > Ron Johnson writes: > > Why is VACUUM FULL recommended for compressing a table, when CLUSTER does > > the same thing (similarly doubling disk space), and apparently runs just > as > > fast? > > CLUSTER makes the

Re: CLUSTER vs. VACUUM FULL

2024-04-21 Thread Tom Lane
Ron Johnson writes: > Why is VACUUM FULL recommended for compressing a table, when CLUSTER does > the same thing (similarly doubling disk space), and apparently runs just as > fast? CLUSTER makes the additional effort to sort the data per the ordering of the specified index. I&#x

CLUSTER vs. VACUUM FULL

2024-04-21 Thread Ron Johnson
PG 14.11 on RHEL8 Why is VACUUM FULL recommended for compressing a table, when CLUSTER does the same thing (similarly doubling disk space), and apparently runs just as fast? My tests: Table: CDSLBXW.public.log Time 1 Time 2 Time 3 secssecssecs VACUUM FULL 44.2

Cancelling "vacuum full" in single user mode?

2023-10-03 Thread Colin 't Hart
Hi, I have a customer approaching transaction wraparound, about 3million transaction IDs away at the moment. Postgres 9.5 (yes, I know...) Somewhat mislead by the message to vacuum the database in single user mode, they are now in single user mode and are running "vacuum full" on

Re: Cancelling "vacuum full" in single user mode?

2023-10-02 Thread Laurenz Albe
; mode, they are now in single user mode and are running "vacuum full" > on the "worst" database, which has 18.5 million tables, and is about > 350GB on disk. > > Now we want to cancel the "vacuum full" and run a "vacuum freeze" > instead... or pr

Cancelling "vacuum full" in single user mode?

2023-10-02 Thread Colin 't Hart
Hi, I have a customer approaching transaction wraparound, about 3million transaction IDs away at the moment. Postgres 9.5 (yes, I know...) Somewhat mislead by the message to vacuum the database in single user mode, they are now in single user mode and are running "vacuum full" on

Re: Vacuum full issue

2023-02-16 Thread Adrian Klaver
On 2/16/23 05:18, Rama Krishnan wrote: Hi All, One of my friend project they did vacuum full  last week since one of the table column data type were CLOB after that activity the dev team found out some of the data were missing or corrupt (XML) , please explain me will vacuum full have any

Re: Vacuum full issue

2023-02-16 Thread David G. Johnston
On Thu, Feb 16, 2023 at 12:24 PM Rama Krishnan wrote: > One of my friend project they did vacuum full last week since one of the > table column data type were CLOB after that activity the dev team found out > some of the data were missing or corrupt (XML) , please explain me will >

Vacuum full issue

2023-02-16 Thread Rama Krishnan
Hi All, One of my friend project they did vacuum full last week since one of the table column data type were CLOB after that activity the dev team found out some of the data were missing or corrupt (XML) , please explain me will vacuum full have any limitation like that? Thanks Ramakrishnan

Re: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)

2023-02-01 Thread Tom Lane
Christophe Pettus writes: >> On Feb 1, 2023, at 10:45, David G. Johnston >> wrote: >> The system just isn't that intelligent for "sequential scan", instead it >> does literally what the label says, goes through the table one page at a >> time and returns any live rows it finds. > Although th

Re: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)

2023-02-01 Thread Christophe Pettus
> On Feb 1, 2023, at 10:45, David G. Johnston > wrote: > The system just isn't that intelligent for "sequential scan", instead it does > literally what the label says, goes through the table one page at a time and > returns any live rows it finds. Although this does raise a question: Could

Re: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)

2023-02-01 Thread David G. Johnston
On Wed, Feb 1, 2023 at 11:27 AM Dimitrios Apostolou wrote: > I have now run simple VACUUM but it didn't change anything, the simple > SELECT is still slow. > > My understanding by reading the docs is that it should reclaim all unused > space, just not return it to the OS. Which is fine by me. Any

VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)

2023-02-01 Thread Dimitrios Apostolou
m the space in my case? I'm now running VACUUM FULL as everyone suggested. I just tried plain VACUUM as I was curious if it would work and because it doesn't lock the table with an operation that takes hours for my setup. Thanks, Dimitris

Re: Vacuum Full is not returning space to OS

2022-09-01 Thread Ron
On 9/1/22 07:01, Daniel Gustafsson wrote: On 1 Sep 2022, at 13:57, Ron wrote: On 9/1/22 04:47, Sushant Postgres wrote: I am running Azure PostgreSQL database version 11 with replication enabled. Azure Postgresql is sufficiently different from Vanilla that the standard answer is "ask AWS". It

Re: Vacuum Full is not returning space to OS

2022-09-01 Thread Daniel Gustafsson
> On 1 Sep 2022, at 13:57, Ron wrote: > On 9/1/22 04:47, Sushant Postgres wrote: >> I am running Azure PostgreSQL database version 11 with replication enabled. > > Azure Postgresql is sufficiently different from Vanilla that the standard > answer is "ask AWS". It will most likely be more helpf

Re: Vacuum Full is not returning space to OS

2022-09-01 Thread Ron
On 9/1/22 04:47, Sushant Postgres wrote: Hi All, I am running Azure PostgreSQL database version 11 with replication enabled. Azure Postgresql is sufficiently different from Vanilla that the standard answer is "ask AWS". But the autovacuum is not happening. Even Vacuum full i

Vacuum Full is not returning space to OS

2022-09-01 Thread Sushant Postgres
Hi All, I am running Azure PostgreSQL database version 11 with replication enabled. But the autovacuum is not happening. Even Vacuum full is also not reclaiming the space and returning back to OS. when, I disable to replication then only Full Vacuum is working as expected but vacuum isn&#

Re: VACUUM FULL missing chunk number 0 for toast value

2022-01-03 Thread Tom Lane
Yi Sun writes: > Once we tried to vacuum full a table, got the error msg "ERROR: missing > chunk number 0 for toast value", there is a doc as below for the select > issue, but for our case select is no issue, Hmm, "SELECT *" doesn't throw any error? That su

VACUUM FULL missing chunk number 0 for toast value

2022-01-03 Thread Yi Sun
Hi All, OS: CentOS 7.6 PG: 11.11 Once we tried to vacuum full a table, got the error msg "ERROR: missing chunk number 0 for toast value", there is a doc as below for the select issue, but for our case select is no issue, what's the reason caused and how to fix this please

RE: vacuum full

2021-09-05 Thread Ian Dauncey
Morning. Thanks for all the replies. What I did to remove these files was to backup of the DB, drop the DB and then I restored the DB. Regards Ian From: Vijaykumar Jain Sent: Monday, 30 August 2021 20:06 To: pgsql-general Subject: Re: vacuum full External email - treat with caution On Mon

Re: vacuum full

2021-08-30 Thread Vijaykumar Jain
On Mon, 30 Aug 2021 at 23:12, Vijaykumar Jain < vijaykumarjain.git...@gmail.com> wrote: > Just keeping it in a separate email, incase this is thrashed down. > vacuum full has a lot of problem stories, not just because the db gets > locked, but also because it is mostly (mis)used

vacuum full

2021-08-30 Thread Vijaykumar Jain
Just keeping it in a separate email, incase this is thrashed down. vacuum full has a lot of problem stories, not just because the db gets locked, but also because it is mostly (mis)used when there are space issues. of course, there are strong warnings in docs and wiki about using a vacuum full

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-26 Thread Marcin Barczynski
On Fri, Jul 23, 2021 at 4:46 PM Ninad Shah wrote: > Question 1 : What's a need to perform a VACUUM FULL operation on pg_class? > Workload requires many temp tables which cause huge bloat on pg_class - it sometimes has more than 2 GB. > Question 2 : Ideally, a VACUUM FULL oper

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-23 Thread Ninad Shah
Question 1 : What's a need to perform a VACUUM FULL operation on pg_class? Question 2 : Ideally, a VACUUM FULL operation seeks an exclusive lock on a table, while I can see it waiting for a shared lock here. Why? (Not asking you) Additionally, The situation you have described should be ter

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Marcin Barczynski
saction consisting of two queries: > > > > > > CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view; > > > INSERT INTO xyz_table SELECT * FROM abc; > > > > > > When I ran VACUUM FULL pg_class, it waited for ShareLock on that > transaction: > > >

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Marcin Barczynski
TO xyz_table SELECT * FROM abc; > > > > When I ran VACUUM FULL pg_class, it waited for ShareLock on that transaction: > > There must have been something else using "pg_class", since the above > won't take any permament locks on "pg_class", nor should it

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Laurenz Albe
On Thu, 2021-07-22 at 12:55 +0200, Marcin Barczynski wrote: > There was a long-running transaction consisting of two queries: > > CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view; > INSERT INTO xyz_table SELECT * FROM abc; > > When I ran VACUUM FULL pg_cl

Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Marcin Barczynski
There was a long-running transaction consisting of two queries: CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view; INSERT INTO xyz_table SELECT * FROM abc; When I ran VACUUM FULL pg_class, it waited for ShareLock on that transaction: postgres=# select * from pg_locks where pid

Re: pg_stat_progress_vacuum empty when running vacuum full

2021-02-12 Thread luis . roberto
> De: "Luca Ferrari" > Para: "pgsql-general" > Enviadas: Sexta-feira, 12 de fevereiro de 2021 8:00:46 > Assunto: pg_stat_progress_vacuum empty when running vacuum full > Hi all, > I'm running 11.5 and I'm monitoring pg_stat_progress_vac

Re: pg_stat_progress_vacuum empty when running vacuum full

2021-02-12 Thread Ian Lawrence Barwick
stat_progress_vacuum, but nothing appears if the vacuum is > full. I suspect this is due to vacuum full performing a side-by-side > table rewriting, rather than in-place actions against the original > table, but I'm not sure if this is real reason or if I'm missing > something. >

pg_stat_progress_vacuum empty when running vacuum full

2021-02-12 Thread Luca Ferrari
I suspect this is due to vacuum full performing a side-by-side table rewriting, rather than in-place actions against the original table, but I'm not sure if this is real reason or if I'm missing something. Thanks, Luca

Re: curious vacuum full behavior

2021-02-04 Thread Laurenz Albe
On Thu, 2021-02-04 at 10:03 +, Zwettler Markus (OIZ) wrote: > I have 2 identical systems A + B. > B being a clone of A. > > The table pg_catalog.pg_largeobject was identical on both systems: 300GB in > total size; 100GB bloated. > > I did following o

curious vacuum full behavior

2021-02-04 Thread Zwettler Markus (OIZ)
I have 2 identical systems A + B. B being a clone of A. The table pg_catalog.pg_largeobject was identical on both systems: 300GB in total size; 100GB bloated. I did following on A: ? vacuum full pg_catalog.pg_largeobject; (using the default maintenance_work_mem of 64MB) It took around 45

Re: vacuum vs vacuum full

2020-11-18 Thread Ron
On 11/18/20 6:02 AM, Laurenz Albe wrote: On Wed, 2020-11-18 at 10:57 +0100, Thomas Kellerer wrote: No matter how long it takes, this is an excellent argument for partitioning Very Large Tables: many maintenance tasks are made *much* easier. The problem is, you can't partition every table as lon

Re: vacuum vs vacuum full

2020-11-18 Thread David G. Johnston
table Vacuum or Vacuum full ? > You should be vacuuming that table constantly, so why is the particular vacuum special? What are the "last vacuum" related statistics for this table? There is "vacuum" and there is "rebuilding the whole table from scratch", the late

Re: vacuum vs vacuum full

2020-11-18 Thread Paul Förster
Hi Ravi, > On 18. Nov, 2020, at 15:30, Ravi Krishna wrote: > > ALTER TABLE TABLE_NAME DROP PARTITION PARTITION_NAME UPDATE INDEXES; IIRC the statement is alter table drop partition update *GLOBAL* indexes; But we experienced big problems in the past which is why we changed all to local ind

Re: vacuum vs vacuum full

2020-11-18 Thread Ravi Krishna
> > Experience shows that global index in Oracle lead to problems when dropping a > partition. rebuilding an index, or other such nice administrative stuff, > often leading to unnecessarily long downtimes. > > I think Oracle fixed it later by allowing asynchronous update of global index afte

Re: vacuum vs vacuum full

2020-11-18 Thread Paul Förster
Hi Laurenz, > On 18. Nov, 2020, at 13:02, Laurenz Albe wrote: > > I personally hope that we will never have global indexes. > I am not looking forward to helping customers with the problems that > they create (long duration of ATTACH/DETACH PARTITION, index fragmentation). +1. Experience shows

Re: vacuum vs vacuum full

2020-11-18 Thread Laurenz Albe
On Wed, 2020-11-18 at 10:57 +0100, Thomas Kellerer wrote: > > No matter how long it takes, this is an excellent argument for > > partitioning Very Large Tables: many maintenance tasks are made > > *much* easier. > > The problem is, you can't partition every table as long as Postgres > does not sup

Re: vacuum vs vacuum full

2020-11-18 Thread Olivier Gautherot
On Wed, Nov 18, 2020 at 10:45 AM Ron wrote: > On 11/18/20 3:41 AM, Olivier Gautherot wrote: > > Hi Atul, > > On Wed, Nov 18, 2020 at 9:33 AM Atul Kumar wrote: > >> Hi, >> >> We have a table of 3113GB, and we are planning to vacuum it in non >> business hours i.e. 12AM to 4AM, So my queries are:

Re: vacuum vs vacuum full

2020-11-18 Thread Thomas Kellerer
Ron schrieb am 18.11.2020 um 10:44: > No matter how long it takes, this is an excellent argument for > partitioning Very Large Tables: many maintenance tasks are made > *much* easier. The problem is, you can't partition every table as long as Postgres does not support a primary key that is indepen

Re: vacuum vs vacuum full

2020-11-18 Thread Ron
On 11/18/20 3:41 AM, Olivier Gautherot wrote: Hi Atul, On Wed, Nov 18, 2020 at 9:33 AM Atul Kumar > wrote: Hi, We have a table of 3113GB, and we are planning to vacuum it in non business hours i.e. 12AM to 4AM, So my queries are: [snip] 3. Wil

Re: vacuum vs vacuum full

2020-11-18 Thread Olivier Gautherot
Hi Atul, On Wed, Nov 18, 2020 at 9:33 AM Atul Kumar wrote: > Hi, > > We have a table of 3113GB, and we are planning to vacuum it in non > business hours i.e. 12AM to 4AM, So my queries are: > > 1. What should be perform on the table Vacuum or Vacuum full ? > Vacuum fu

Re: vacuum vs vacuum full

2020-11-18 Thread Ron
On 11/18/20 2:33 AM, Atul Kumar wrote: Hi, We have a table of 3113GB, and we are planning to vacuum it in non business hours i.e. 12AM to 4AM, So my queries are: 1. What should be perform on the table Vacuum or Vacuum full ? The documentation *clearly states* the difference between VACUUM

vacuum vs vacuum full

2020-11-18 Thread Atul Kumar
Hi, We have a table of 3113GB, and we are planning to vacuum it in non business hours i.e. 12AM to 4AM, So my queries are: 1. What should be perform on the table Vacuum or Vacuum full ? 2. Do we need to perform Analyze also? 3. Will the operation be completed in the given time frame? how to

Re: Cluster and Vacuum Full

2020-10-05 Thread Guillaume Lelarge
I > can load less records to Shared Buffers because all detaild records are on > sequencial pages, that´s fine. > > I know that to have this working I have to periodically run CLUSTER, ok > too. > > But today instead of CLUSTER I just ran VACUUM FULL. How vacuum full >

Cluster and Vacuum Full

2020-10-05 Thread PegoraroF10
on sequencial pages, that´s fine. I know that to have this working I have to periodically run CLUSTER, ok too. But today instead of CLUSTER I just ran VACUUM FULL. How vacuum full recreates entirelly that table, like cluster does, I thought it would use that index too, but didn´t. I didn´t see

Re: vacuum full doubled database size

2020-03-13 Thread Ron
On 3/13/20 10:32 AM, Fabio Ugo Venchiarutti wrote: On 13/03/2020 15:15, Ron wrote: This is why I'd VACUUM FULL in a planned manner, one or two tables at a time, and *locally* from crontab. That's not really viable on any remotely busy system: VACUUM FULL claims exclusive table lock

RE: vacuum full doubled database size

2020-03-13 Thread Kevin Brannen
>Fabio Ugo Venchiarutti wrote: >On 13/03/2020 15:15, Ron wrote: >> This is why I'd VACUUM FULL in a planned manner, one or two tables at >> a time, and *locally* from crontab. > >That's not really viable on any remotely busy system: VACUUM FULL claims >excl

Re: vacuum full doubled database size

2020-03-13 Thread Fabio Ugo Venchiarutti
On 13/03/2020 15:15, Ron wrote: This is why I'd VACUUM FULL in a planned manner, one or two tables at a time, and *locally* from crontab. That's not really viable on any remotely busy system: VACUUM FULL claims exclusive table locks, causing queries to hang (https://www.postgresq

Re: vacuum full doubled database size

2020-03-13 Thread Ron
This is why I'd VACUUM FULL in a planned manner, one or two tables at a time, and *locally* from crontab. On 3/13/20 8:41 AM, Zwettler Markus (OIZ) wrote: We did a "vacuum full" on a database which had been interrupted by a network outage. We found the database size dou

AW: vacuum full doubled database size

2020-03-13 Thread Zwettler Markus (OIZ)
Thanks. How to get rid of it. New vacuum full? Von: Michael Loftis Gesendet: Freitag, 13. März 2020 14:48 An: Zwettler Markus (OIZ) Cc: pgsql-general Betreff: Re: vacuum full doubled database size A vacuum full rebuilds the tables, so yeah if it didn’t successfully complete I would expect

Re: vacuum full doubled database size

2020-03-13 Thread Michael Loftis
A vacuum full rebuilds the tables, so yeah if it didn’t successfully complete I would expect a lot of dead data. On Fri, Mar 13, 2020 at 07:41 Zwettler Markus (OIZ) < markus.zwett...@zuerich.ch> wrote: > We did a "vacuum full" on a database which had been interrupted by

vacuum full doubled database size

2020-03-13 Thread Zwettler Markus (OIZ)
We did a "vacuum full" on a database which had been interrupted by a network outage. We found the database size doubled afterwards. Autovacuum also found a lot of orphaned tables afterwards. The ophan temp objects went away after a cluster restart while the db size remained doubled.

Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619

2019-08-30 Thread Justin Pryzby
2369261203 in pg_toast_2619 query | CLUSTER pg_statistic USING pg_statistic_relid_att_inh_index application_name | psql Note that my original report was for "missing" chunk during "VACUUM FULL", and the current error is "unexpected chunk" dur

Re: Linked data from upgrade after VACUUM FULL not deleted.

2019-05-11 Thread Bruce Momjian
On Sat, May 11, 2019 at 07:04:32PM +0200, Josef Šimánek wrote: > Hello. > > Few months ago we did successful pg_upgrade --link from 9.6 to 10. I did a > VACUUM FULL of all database this weekend and data from 9.6 directory were not > released. > > I have tablespace w

Linked data from upgrade after VACUUM FULL not deleted.

2019-05-11 Thread Josef Šimánek
Hello. Few months ago we did successful pg_upgrade --link from 9.6 to 10. I did a VACUUM FULL of all database this weekend and data from 9.6 directory were not released. I have tablespace with only one database. PostgreSQL 10 folder has similar size to actual database size (by https

Re: Recommendation to run vacuum FULL in parallel

2019-04-11 Thread Ron
uestion : Do we need to consider  Table dependencies while preparing script in order to avoid table locks during vacuum full ? We have a small bash script (see below) that get the list of tables and their sizes, sorted smallest to largest, and do “vacuum full” one at a time because (

Re: Recommendation to run vacuum FULL in parallel

2019-04-10 Thread Perumal Raj
ly way to parallelism is multiple > script. And no need to do REINDEX exclusively. > > Question : Do we need to consider Table dependencies while preparing > script in order to avoid table locks during vacuum full ? > > > > We have a small bash script (see below) that get the

Re: Recommendation to run vacuum FULL in parallel

2019-04-05 Thread Peter J. Holzer
On 2019-04-03 19:42:03 +0400, rihad wrote: > > And future updates can reuse it, too (an update is very similar to an > > insert+delete). > > Hm, then it's strange our DB takes 6 times as much space compared to freshly > restored one (only public schema is considered). This is indeed strange if yo

RE: Recommendation to run vacuum FULL in parallel

2019-04-04 Thread Kevin Brannen
From: Perumal Raj So conclude the requirement here , The only way to parallelism is multiple script. And no need to do REINDEX exclusively. Question : Do we need to consider Table dependencies while preparing script in order to avoid table locks during vacuum full ? We have a small bash

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread Ron
On 4/3/19 3:45 PM, Perumal Raj wrote: Hi Stephen Thanks for the response , Version : 9.2 We never ran VACUUM FULL in the past, All we are doing just manual vacuum ( Weekly ) . Based on the Observation ( test run ) , we were able to reclaim 150 GB out of 500 GB . We are heading to a planned

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread Perumal Raj
Hi Stephen Thanks for the response , Version : 9.2 We never ran VACUUM FULL in the past, All we are doing just manual vacuum ( Weekly ) . Based on the Observation ( test run ) , we were able to reclaim 150 GB out of 500 GB . We are heading to a planned down time soon , So thinking to run FULL

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread Stephen Eilert
> Ideally VACUUM FULL should not require a giant lock on the table. It is a massively expensive operation, regardless. Not sure if it is something you want to run in production outside a maintenance window. I would argue that frequent vacuum full is an antipattern. This will become a matter

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread Perumal Raj
? So conclude the requirement here , The only way to parallelism is multiple script. And no need to do REINDEX exclusively. Question : Do we need to consider Table dependencies while preparing script in order to avoid table locks during vacuum full ? At present Maintenance work memory set to 20 GB

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread rihad
And future updates can reuse it, too (an update is very similar to an insert+delete). Hm, then it's strange our DB takes 6 times as much space compared to freshly restored one (only public schema is considered). Not if autovacuum has a chance to run between updates. Ours is run regularly,

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread Peter J. Holzer
and plain autovacuuming doesn't return it to the > > OS." > > > > Can you expound on that? I thought that was exactly what autovacuum did > > for old versions of rows whether dead because of delete or update, so I > > am surprised by this statement. I thought va

Re: Recommendation to run vacuum FULL in parallel

2019-04-03 Thread rihad
d on that? I thought that was exactly what autovacuum did for old versions of rows whether dead because of delete or update, so I am surprised by this statement. I thought vacuum full was only ever needed if storage space is an issue and the table is not expect to quickly re-expand to current s

  1   2   >