Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
6 Trả lời
3688 Lượt xem

At our company we had a DB crash a few days ago due to hardware reasons. We recovered from that but since then we're having this following error every time we try to back up our DB.

pg_dump: ERROR:  timestamp out of range
pg_dump: SQL command to dump the contents of table "account_bank_statement_line"

The error is in "account_bank_statement_line" table, where we have 5 rows created with only the 'create_date' column has a date of year 4855(!!!!), the rest of the columns have null value, even the id (primary key). We can't even delete or update those rows using pgAdmin 4.

We're in a very risky stage right now with no back up of few days of retail sales. Any hints at least would be very highly appreciated.
Ảnh đại diện
Huỷ bỏ

Did you try to update / delete those records using query from postgres command line?

Tác giả

Already tried that, didn't work either.

Tác giả

Any other solutions, please?

Are you getting similar error while doing this from command line?

May be you can try to migrate the whole database to new database, not sure how. May be with the script or something else.

Please explain, how you are taking backup? using PSQL Query or From ODOO UI or by any third party APPS

Tác giả Câu trả lời hay nhất

Thank you all for the hints. 

What we did was:

  • migrated all the data to a new table (account_bank_statement_line2), this transferred all the rows that had valid data. 

  • Then we deleted the "account_bank_statement_line" table and 

  • renamed the new table to "account_bank_statement_line". 

  • After that we could DROP the table. 

Then the db backup ran smoothly like always.

Hope this helps anyone who's in deep trouble like us. Cheers!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 23
2152
3
thg 8 19
7432
0
thg 6 24
1565
problem backup Đã xử lý
3
thg 6 24
6575
0
thg 5 24
1198