prestodb/presto · error · OrcCorruptionException
Invalid postscript
Error message
Invalid postscript
What it means
ORC metadata-reading error in ExceptionWrappingMetadataReader.readPostScript: parsing the postscript protobuf failed (InvalidProtocolBufferException), wrapped as 'Invalid postscript'. The postscript is the file's trailing metadata block, so this almost always means a truncated, corrupted, or non-ORC file.
Source
Thrown at presto-orc/src/main/java/com/facebook/presto/orc/metadata/ExceptionWrappingMetadataReader.java:55
private final OrcDataSourceId orcDataSourceId;
private final MetadataReader delegate;
public ExceptionWrappingMetadataReader(OrcDataSourceId orcDataSourceId, MetadataReader delegate)
{
this.orcDataSourceId = requireNonNull(orcDataSourceId, "orcDataSourceId is null");
this.delegate = requireNonNull(delegate, "delegate is null");
checkArgument(!(delegate instanceof ExceptionWrappingMetadataReader), "ExceptionWrappingMetadataReader can not wrap a ExceptionWrappingMetadataReader");
}
@Override
public PostScript readPostScript(byte[] data, int offset, int length)
throws OrcCorruptionException, IOException
{
try {
return delegate.readPostScript(data, offset, length);
}
catch (InvalidProtocolBufferException e) {
throw new OrcCorruptionException(e, orcDataSourceId, "Invalid postscript");
}
}
@Override
public Metadata readMetadata(HiveWriterVersion hiveWriterVersion, InputStream inputStream)
throws OrcCorruptionException, IOException
{
try {
return delegate.readMetadata(hiveWriterVersion, inputStream);
}
catch (InvalidProtocolBufferException e) {
throw new OrcCorruptionException(e, orcDataSourceId, "Invalid file metadata");
}
}
@Override
public Footer readFooter(HiveWriterVersion hiveWriterVersion,
InputStream inputStream,View on GitHub (pinned to 55bb57d202)
Solutions
- Confirm the file is a complete ORC file (not truncated by a failed write)
- Verify HDFS/S3 object size matches expectations
- Recover from the original data source
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-orc/src/main/java/com/facebook/presto/orc/metadata/ExceptionWrappingMetadataReader.java:55 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/8d424dbaed3d0a16.
Report an issue: GitHub.