Ok. Here is the problem and the recommended solution.
My recommended solution is:
BEGIN;
LOCK customer IN EXCLUSIVE MODE;
ALTER TABLE customer ADD COLUMN new_id INT;
UPDATE customer SET new_id = nextval('id');
UPDATE ar SET customer_id = (select new_id FROM customer WHERE
customer.id = customer_id);
UPDATE project SET customer_id = (select new_id FROM customer WHERE
customer.id = customer_id);
UPDATE shipto SET trans_id = (select new_id FROM customer where
customer.id = trans_id);
UPDATE customer SET id = new_id;
ALTER TABLE customer DROP COLUMN new_id;
COMMIT;
Do the same for vendor id, updating the vendor_id field in ap and the
trans_id field in shipto.
The server encountered an internal error or misconfiguration and was unable to complete your request
and the error log shows