ERROR: could not find segment file to use for inserting into relation <schema>.<tablename> (appendonlywriter.c:1226)
Run "VACUUM FULL" on the table reported in the error message.The VACUUM FULL may report the same error, re-try the VACUUM FULL.
It may take a number of attempts to run the VACUUM FULL if the table is heavily accessed by others running INSERT/UPDATE/DELETE against the table.