If you encounter the following error in Greenplum 6.28, this is due to a recent change in how gpload executes:
2025-05-25 12:25:25|ERROR|could not execute SQL in sql:after "VACUUM ANALYZE TABLE_NAME;": ERROR: VACUUM cannot run inside a transaction block
As of Greenplum 6.28, a BEGIN statement is now used when executing gpload statements, of which VACUUM ANALYZE is a part of, and this begins a transaction block. In previous versions this may still work without the need for any additional steps, but as of 6.28 this is no longer supported as mentioned in the following document: Greenplum VACUUM documentation:
Notes
VACUUM cannot be run inside a transaction block.
To workaround this issue you can use the following setting to prevent gpload from being wrapped in a transaction block:
--no_auto_trans
--no_auto_trans
Specify --no_auto_trans to deactivate processing the load operation as a single transaction if you are performing a single load operation on the target table.
By default, gpload processes each load operation as a single transaction to prevent inconsistent data when performing multiple, simultaneous operations on a target table.