Postgres suggests "Truncate table ... at the same time"

  1. What does it mean to truncate a table at the same time?

It means with the same statement. You can truncate more than one tables:

TRUNCATE xxxxx, yyyyy RESTART IDENTITY ;

More details in Postgres docs: TRUNCATE.


1) Cascaded truncates can be dangerous. If you have a lookup table (in this case, I believe XXXX), kiss it good-bye because it's going to be truncated and you'll lose all that data.

For example, you have a table of Customers (YYYY) with a FK to Orders (XXXX). When you truncate YYYY using a cascaded truncate, it would truncate YYYY. If not, it would display the truncate error you are seeing.

2) Truncate table 'XXXX' at the same time means that its suggesting you truncate your lookup/reference table as well.