Re: db size difference on primary and standby

2023-11-15 Thread Laurenz Albe
On Thu, 2023-11-16 at 14:49 +0800, Eric Wong wrote: > We discovered a disk usage difference between our primary and standby node. > > After much investigation, the disk usage difference is caused by some > extra files within the database directory 16432. The extra files are > only found on the st

Re: DB size

2021-04-27 Thread luis . roberto
- Mensagem original - > De: "Magnus Hagander" > Para: "Laurenz Albe" > Cc: "Alvaro Herrera" , "luis.roberto" > , "pgsql-general" > > Enviadas: Terça-feira, 27 de abril de 2021 4:05:42 > Assunto: Re: DB size

Re: DB size

2021-04-27 Thread Magnus Hagander
On Tue, Apr 27, 2021 at 8:59 AM Laurenz Albe wrote: > > On Mon, 2021-04-26 at 16:45 -0400, Alvaro Herrera wrote: > > I would guess that there are leftover files because of those crashes you > > mentioned. You can probably look for files in the database subdir in > > the data directory that do not

Re: DB size

2021-04-26 Thread Laurenz Albe
On Mon, 2021-04-26 at 16:45 -0400, Alvaro Herrera wrote: > I would guess that there are leftover files because of those crashes you > mentioned. You can probably look for files in the database subdir in > the data directory that do not appear in the pg_class.relfilenode > listing for the database.

Re: DB size

2021-04-26 Thread Guillaume Lelarge
Hi, Le lun. 26 avr. 2021 à 22:59, a écrit : > > - Mensagem original - > > De: "Alvaro Herrera" > > Para: "luis.roberto" > > Cc: "pgsql-general" > > Enviadas: Segunda-feira, 26 de abril de 2021 17:45:34 > > Assunto: Re:

Re: DB size

2021-04-26 Thread luis . roberto
- Mensagem original - > De: "Alvaro Herrera" > Para: "luis.roberto" > Cc: "pgsql-general" > Enviadas: Segunda-feira, 26 de abril de 2021 17:45:34 > Assunto: Re: DB size > I would guess that there are leftover files because of those cr

Re: DB size

2021-04-26 Thread luis . roberto
- Mensagem original - > De: "Josef Šimánek" > Para: "luis.roberto" > Cc: "pgsql-general" > Enviadas: Segunda-feira, 26 de abril de 2021 17:40:05 > Assunto: Re: DB size > Do you have any indexes in mydb database? Yes, I do. I believe

Re: DB size

2021-04-26 Thread Alvaro Herrera
On 2021-Apr-26, luis.robe...@siscobra.com.br wrote: > SELECT sum(pg_total_relation_size(relid)), > pg_size_pretty(sum(pg_total_relation_size(relid))) > FROM pg_catalog.pg_stat_all_tables > > > sum |pg_size_pretty| > +--+ > 518549716992|483 GB

Re: DB size

2021-04-26 Thread Josef Šimánek
po 26. 4. 2021 v 22:25 odesílatel napsal: > > Hi! > > I've looked around, but could only find very old answers to this question, > and maybe it changed since then... > > I'm struggling to identify the cause of the difference in size between the > sum of all relations (via pg_total_relation_size

Re: DB size difference after restore

2018-10-03 Thread Chris Travers
On Wed, Oct 3, 2018 at 2:59 PM Sonam Sharma wrote: > > > On Wed, Oct 3, 2018 at 6:21 PM Sonam Sharma wrote: > >> Hello Ben, >> >> When we do \l+ , it is different than source, when we load backup from >> target server. >> >Backup is taken using pg_dump and its loaded as psql db name > It'

Re: DB size difference after restore

2018-10-03 Thread Sonam Sharma
On Wed, Oct 3, 2018 at 6:21 PM Sonam Sharma wrote: > Hello Ben, > > When we do \l+ , it is different than source, when we load backup from > target server. > Backup is taken using pg_dump and its loaded as psql db name > > Regards, > > Sonam > > > > > > > On Wed, Oct 3, 2018 at 6:17 PM Benj

Re: DB size difference after restore

2018-10-03 Thread Fabio Pardi
Hi Sonam, it is common that after an export (pg_dump) and a consecutive import, the new database uses less space than the old one. Under some circumstances, indexes can become unbalancedor bloated, and tables bloated. And that uses more space than it should. for the sake of trying it out: If y

Re: DB size difference after restore

2018-10-03 Thread Sonam Sharma
Hello Ben, When we do \l+ , it is different than source, when we load backup from target server Regards, Sonam On Wed, Oct 3, 2018 at 6:17 PM Benjamin Scherrey wrote: > If you're talking about space on drive then you can expect the new one to > be smaller generally as it has been straig

Re: DB size difference after restore

2018-10-03 Thread Benjamin Scherrey
If you're talking about space on drive then you can expect the new one to be smaller generally as it has been straight efficient writes rather than a bunch of updates and deletes which create "holes" in the physical file space. It helps if you are more detailed as to what you've observed if you wa

Re: DB size growing exponentially when materialized view refreshed concurrently (postgres 9.6)

2018-06-25 Thread Jeff Janes
On Mon, Jun 25, 2018 at 1:21 PM, Vikas Sharma wrote: > Hi All, > > I am looking for advice in a issue where two materialized views are being > refreshed concurrently and dbsize has grown to 150gb from 4gb in two days. > > We use two materialized views to keep processed data for faster query > res

Re: DB size growing exponentially when materialized view refreshed concurrently (postgres 9.6)

2018-06-25 Thread Vikas Sharma
Hi Alban, I haven't disabled autovacuum task, it's running fine for other objects. I was also getting "Error: cancelling autovacuum task" on the materialized view when concurrently refreshed so decided to write a script and run vacuum (full, analyze) the MV immediately after concurrent refresh but

Re: DB size growing exponentially when materialized view refreshed concurrently (postgres 9.6)

2018-06-25 Thread Alban Hertroys
> On 25 Jun 2018, at 19:21, Vikas Sharma wrote: > > I am looking for advice in a issue where two materialized views are being > refreshed concurrently and dbsize has grown to 150gb from 4gb in two days. > > We use two materialized views to keep processed data for faster query results > for a