ERROR: could not find segment file to use for inserting into relation schema.tablename
search cancel

ERROR: could not find segment file to use for inserting into relation schema.tablename

book

Article ID: 296940

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

When inserting or updating an AO/AOCO table Greenplum Database can report the error:
ERROR: could not find segment file to use for inserting into relation <schema>.<tablename> (appendonlywriter.c:1226)


Environment

Product Version: 6.25

Resolution

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.

To avoid this occurring again, ensure the table is VACUUM'ed more often than it is currently.
If it is being VACUUM'ed daily, then it is recommended that a VACUUM FULL is done instead of the standard "VACUUM".