Skip to main content

pg_command_with_db_config

Function pg_command_with_db_config 

Source
fn pg_command_with_db_config(program: &str, db_url: &str) -> Result<Command>
Expand description

pg_dump 模式:子进程生成完整备份(含 schema),前置签名头。

--clean --if-exists 生成幂等的删后重建脚本;--no-owner --no-privileges 去掉集群角色元数据,使备份可恢复到使用不同数据库角色的环境。详见 run_restore

成功返回 SQL 文件名(最终「完成」进度由调用方统一上报)。