pub async fn unpack_postgres(
zip_file_path: &Path,
cache_dir: &Path,
) -> Result<()>Expand description
Unpacks the PostgreSQL binaries ZIP/JAR into cache_dir.
Spawns a blocking task that opens zip_file_path, finds the .txz entry
(XZ-compressed tarball), decompresses it, and extracts the tar archive into
cache_dir.
§Arguments
zip_file_path— Path to the downloaded JAR file.cache_dir— Destination directory for the extracted binaries.
§Errors
Returns Error::ReadFileError if the ZIP file cannot be opened.
Returns Error::InvalidPgPackage if the archive is malformed or an
entry cannot be read.
Returns Error::UnpackFailure if XZ decompression or tar extraction
fails.
Returns Error::PgError if the blocking task panics or cannot be joined.