Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Odoo database grows quickly

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
databasepostgresqllogfileSize
7 Besvarelser
14478 Visninger
Avatar
Thicham

Hi everyone,

My odoo postgresql database size starts to grow in a fast way. today it is up to 12Gb.
Is it normal or there are some log files i have to remove or clear from time to time and which keep my database so huge.
I'm using Odoo under Ubuntu.

0
Avatar
Kassér
Avatar
Yvan
Bedste svar

Hi Thicham,


I had a similar issue some months ago. The problem was located in an module that stored big binary files in the database.

I would suggest that you analyse your database to find out you which tables store a big amount of data. To do this, you can run follow query on you database:

SELECT nspname || '.' || relname AS "relation",    pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"  FROM pg_class C  LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)  WHERE nspname NOT IN ('pg_catalog', 'information_schema')    AND C.relkind <> 'i'    AND nspname !~ '^pg_toast'  ORDER BY pg_total_relation_size(C.oid) DESC  LIMIT 20;

The result of this query will show the name of the table and its disk usage for the 20 biggest tables. Once you know which tables are growing very fast you can focus the analysis on the corresponding module.

You can find useful information about disk usage under: https://wiki.postgresql.org/wiki/Disk_Usage


Best regards

Yvan

2
Avatar
Kassér
Thicham
Forfatter

Thank you Yvan, you saved the day ;). It seems that product_template table that has the most data in it (11Gb out of total 12Gb). Actually i was attching the logos of the main suppliers to the corresponding products as binary files and this was the reason.

Thicham
Forfatter

I did an update query on the product_template table in order to erase the value of "image_medium" and "image_small" columns, however the size of the table still not decreased.

How can i effectivelly delete those binary images from the database or from /var/lib/postgresql/9.4/main/base/my_db/ ?

Yvan

Hi Thicham, i'm glad to hear that you were able to find the source of the problem.

Now that you have deleted the a huge amount of data, you need to perform a vacuum on the database using following command:

$ vacuumdb -d <name of your database> -t product_template

After that, you database should be a few GB smaller.

If you need further information about database vacuum, try this link:

https://www.postgresql.org/docs/8.4/static/sql-vacuum.html

Avatar
Mahmoud Abdelwahid
Bedste svar

Also review your attachment , May be attachment store internally as binary files

0
Avatar
Kassér
Avatar
Thicham
Forfatter Bedste svar

That works just fine Yvan. Thanks a lot.

0
Avatar
Kassér
Avatar
ECODIGITUS SAINS TEKNOVASI
Bedste svar

For vacuum db, so All Log Note (history message) in each module will be delete too?
I Have same problem, public mail message reach 370 GB, my odoo server cannot online again.

How about this?

Thank you

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Database Migration
database postgresql
Avatar
Avatar
1
jul. 23
6703
How to save the column of the database when deleting the module?
database postgresql
Avatar
Avatar
1
mar. 15
6346
When should Database be separated on Separate Server. Løst
server database postgresql
Avatar
Avatar
1
jul. 25
4469
Incremental backup in 2024 ? (self hosted)
database postgresql backup
Avatar
0
jun. 24
2454
Odoo Internal Server Error
database postgresql server500
Avatar
0
maj 24
1880
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now