Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uPhlr-00E1DE-If for pgsql-general@arkaria.postgresql.org; Thu, 12 Jun 2025 13:15:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uPhlp-00CPe8-Mh for pgsql-general@arkaria.postgresql.org; Thu, 12 Jun 2025 13:15:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uPhlK-00CLaf-MJ for pgsql-general@lists.postgresql.org; Thu, 12 Jun 2025 13:14:35 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uPhlJ-001blq-1w for pgsql-general@lists.postgresql.org; Thu, 12 Jun 2025 13:14:34 +0000 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-4a5851764e1so17349271cf.2 for ; Thu, 12 Jun 2025 06:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749734073; x=1750338873; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=gGJd7f8d/wzCtO++bp+b6IJk8bpUT4cm8Szx0zjMlYc=; b=kptBTYVQu1SGK9rI9j/oDF5HRtzBg/a4k6aKIE6Fqzkf0wauMih8mfWYmO3+HZBPWD fOXIM4/cxHwo4HXqLtylEtwA0FCo8DUcMA0kjG9E5ig0PoFc0R9EdkfVSWTO70wHLLqZ bcJljE9oLofpf3QWxMzaqNZqgOZjsOqi8i6SoQPGlDH17RZBSedp8UUItFc6iwIwVtJw S+1Drku98SLI65mAuZbWJHseL0x8553Tof/U1fJuJP4zGituLzCcRQPmkSUktjGTYvUA IVeit2eThZBE0IY0lvv8ydt2nu9HYqJiyH2KGfEOhyrzcTWDSTbg87ePz6ECLyzCiyTA Dydw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749734073; x=1750338873; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gGJd7f8d/wzCtO++bp+b6IJk8bpUT4cm8Szx0zjMlYc=; b=Yg6TmUXRjINLSHZhcUizNJ07Lph7RykBb6zMJU3fzv2hlA3t11asZ1JzObDolKVEus DizDhDgBt7DInxmDnm3aH8Q6OXaM86QSiX+cSMatow7LsRs/Xr5Q0bc7aluIJSMTpY3Q CnDUjXIApQHR6YEuYDupGuST8+sAKvB5QrLtZKZZoYqrB8f7zoY6vEQE7bURzY4FZOfy 0Q05FWDFTsb7oP+glYJmuiun50RsBdmAzJQvdHS3EWTmoQM5FlxUm2ZYNgkvxYc4gVHc qLUkfv8Ju2quFMMmhlzPIYluu7HhBcXY6QsWZ+ZSHyevZv93D5iBuQPya0QcMxTTekJO xOpg== X-Gm-Message-State: AOJu0Yz0ySj0sgycKszp9gOmle3hb+I+x+Xe+m3eVLVLT4RTDxtGRxAx 6oMhmRDuVbk0KeECWcJQHQSPFfpLb53llpuY7o9GQsZ/0JnOmf5fy9JqC6I9z7GC9GxjmxTCDF5 HV2GEP+U3phYj4kpjxqMmT1MvMhb5PVsqcDH5 X-Gm-Gg: ASbGncvo161uZw7jxOT3LaR6/Ridpzlx5xHTIr6oXktk7JtirZS8WWtA/nkOFZt6ZAU z/dDVhcxk8LZZLgI9KP7VX2TC9Zq8bvdjk0APxHdzNogUiJ0YD6r2rS0fUek1Rr1Ituzigyizee 6LeQXdPZCBgtXgV71MxpHWGVk8pvtqGQVt6MPk597A11fWMDm5l26o0A== X-Google-Smtp-Source: AGHT+IGzgbEDbCaaGo9GpQKWkVMnnaNWHe+3N/rxVHZT0SxYMGWnbgjcOzHm1iof+Sgh6UNItNE/DO1OeWdqbjQ3vPE= X-Received: by 2002:a05:622a:a18f:b0:4a5:8b39:626b with SMTP id d75a77b69052e-4a7229efcbamr50510601cf.27.1749734072578; Thu, 12 Jun 2025 06:14:32 -0700 (PDT) MIME-Version: 1.0 From: Pavol Sekeres Date: Thu, 12 Jun 2025 15:14:22 +0200 X-Gm-Features: AX0GCFvQNhrdzL4AUMXLHy6WToomNLTEiJ49TsB2T_unDXB1bZ7l-qlV6GORkHw Message-ID: Subject: db maintanance problem VACUUM FULL To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d8f95206375fb544" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d8f95206375fb544 Content-Type: text/plain; charset="UTF-8" Hi, 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. It is around 2 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. 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 this be a problem? If yes, is there any other solution outside locking the database? Should we try to solve this problem by creating a logical replica of the database? We would then promote the replica to primary. After that, we would drop the old database. Is this possible without a big downtime? Is this even a good idea? Our database uses a wal_level 'replica'. As I understand it, this setting would first have to be switched to 'logical'. Thank you for your answer, Best regards, Pavol Sekeres --000000000000d8f95206375fb544 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

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.
It is around 2 TB in size with one st= and-by replica of equal size.
The database is more than 5 years o= ld.

We do run AUTOVACUUM processes on a= ll tables periodically.
We have never run VACUUM FULL on any tabl= e.
This is because we can't afford to lock out tables for a l= ong 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 event= ually bloated.

Can this be a problem?
If yes, is there any other solution outside locking the databa= se?
Should we try to solve this problem by creating a logical rep= lica of the database?
We would then promote the replica to primar= y.
After that, we would drop the old database.
Is = this possible without a big downtime?
Is this even a good idea?

Our database uses a wal_level 'replica= 9;.
As I understand it, this setting would first have to be switc= hed to 'logical'.

Thank you for= your answer,
Best regards,
Pavol Sekeres
--000000000000d8f95206375fb544--