Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Restarting openerp enough number of times causes postgres to throw 'reached max column limit error'

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
errorpospostgresqlcolumnlimitmaxerr
5 Odpowiedzi
7401 Widoki
Awatar
indraneel

Here's the scenario - Lets say I install a module which changes the column type of a table. And this module changes the type of the date_order field in sale_order table from date to datetime. Now what happens is everytime I restart openerp with updateall modules flag, it drops the original date_order column (with type date)  in the table and adds a new column date_order with type datetime. 

Now postgres maintains a reference to all of its columns per table in pg_attribute table, which doesnt get cleared even when you drop the columns. Because of this every drop-column-add-column cycle that occurs when you restart openerp increments the column count for the table and in this case its the sale_order table. But the problem is postgres has a column limit of 1600 per table which will be reached if you restart openerp 800 times. And then openerp fails to start. 

This is only in case of 1 column. If modules override multiple columns in the table, this limit will be reached sooner. 

So the question is, is there a well known way to solve this problem with openerp?

My guess is this is not a very rare case scenario and some people may have already faced this problem. Are there any recommended solutions or conventions or best practices ?

 

 

 

1
Awatar
Odrzuć
tim diamond

HELP! This is also affecting me. Has anyone found a way to solve this problem???

Awatar
indraneel
Autor Najlepsza odpowiedź

This is how we solved the problem: 

Lets say there are two modules  sale_order, my_sale_order. Suppose my_sale_order extends the functionality of the sale_order.

And in my_sale_order you want to change the column type of a field in sale_order, lets say, change the type of column order_date from date to datetime. Now, instead of changing the type of order_date to datetime in my_sale_order, what you can do is add a new column called order_datetime  whose type is datetime in my_sale_order  and change all the references in UI markup(and any other references required for proper functioning) from order_date to order_datetime. You can also keep the order_date and order_datetime in sync in your code.

The rationale behind not going with the db restore method suggested by Tim is because that's not a permanent solution and it requires periodic intervention by the support staff to fix this issue, when it reappears.

0
Awatar
Odrzuć
Awatar
tim diamond
Najlepsza odpowiedź

Ok community.  I have found a work around that i DO NOT consider a viable option for the long run.  But to help anyone in need:

This problem occurs due to the fact that over the course of time, enough add/drop sequences in postgres will cause the system to hit the hard limit of 1600 columns.  (EVEN IF WHEN VIEWED IN POSTGRES, YOU ONLY SEE MINIMAL COLUMNS).  When you drop a column, it is taken out of the table, but the reference to that column lives on, and stays consuming the 1600 column limit.

My temporary solution:

pg_dump -t table_name_with_issue --inserts -f file_name_for_sql_output.sql database_name

Now you have the sql to recreate the problematic table in file_name_for_sql_output.sql

Enter into psql terminal:  psql -d database_name
Drop the problematic table: drop table table_name_with_issue cascade;
Exit psql:  ctrl+d
Restore the table from the generated .sql:  psql -f file_name_for_sql_output.sql database_name
 

And with that, you should have a re-created table that has a reset column limit.

This problem is pretty much unsolvable without an experienced database administrator, and because of that, I consider this a bug in Odoo.

Maybe someone else has a better workaround?

 

 

 

 

 

2
Awatar
Odrzuć
indraneel
Autor

This is how we solved the problem: - make sure the column types are same in both the modules - when ever you want to change a column type, add a new column in the sub module to suit your needs. (we added a new column of type datetime and left the original date column in sale_order intact) - use this newly added column everywhere in your views

tim diamond

Could you elaborate on this a little more? I don't really understand the mentality behind this?

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Odoo 18.0 pos techical error on pos payment validation out of the box
error pos
Awatar
0
sty 25
2669
Validation error in PoS "Another model requires the record"
error pos
Awatar
Awatar
2
maj 23
4068
Posted journal entry must have an unique sequence number per company
error pos
Awatar
Awatar
Awatar
2
lip 22
4182
ERROR USER Account 500000 Cost of Goods Sold WHEN TRY CLOSE POS ODOO 15
error pos
Awatar
0
sty 22
1894
POS error ! after attempting to create new POS
error pos
Awatar
Awatar
1
maj 18
4701
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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