ankane/pgsync · error · Error
No destination
Error message
No destination
What it means
Error "No destination" thrown in ankane/pgsync.
Source
Thrown at lib/pgsync/sync.rb:31
args = @arguments
opts = @options
# only resolve commands from config, not CLI arguments
[:to, :from].each do |opt|
opts[opt] ||= resolve_source(config[opt.to_s])
end
# merge other config
[:to_safe, :exclude, :schemas].each do |opt|
opts[opt] ||= config[opt.to_s]
end
if args.size > 2
raise Error, "Usage:\n pgsync [options]"
end
raise Error, "No source" unless source.exists?
raise Error, "No destination" unless destination.exists?
unless opts[:to_safe] || destination.local?
raise Error, "Danger! Add `to_safe: true` to `.pgsync.yml` if the destination is not localhost or 127.0.0.1"
end
print_description("From", source)
print_description("To", destination)
if (opts[:preserve] || opts[:overwrite]) && destination.server_version_num < 90500
raise Error, "Postgres 9.5+ is required for --preserve and --overwrite"
end
resolver = TaskResolver.new(args: args, opts: opts, source: source, destination: destination, config: config, first_schema: first_schema)
tasks =
resolver.tasks.map do |task|
Task.new(source: source, destination: destination, config: config, table: task[:table], opts: opts.merge(sql: task[:sql]))
end
View on GitHub (pinned to 57bdddf5db)
When it happens
Trigger: Thrown at lib/pgsync/sync.rb:31 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ankane/pgsync@57bdddf5db (2026-08-23).
Data as JSON: /api/errors/ddde7c2853408596.
Report an issue: GitHub.