{"record":{"id":"4c20484151696664","repo":"ankane/pgsync","slug":"cannot-use-overwrite-with-in-batches","errorCode":null,"errorMessage":"Cannot use --overwrite with --in-batches","messagePattern":"Cannot use --overwrite with --in-batches","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/pgsync/client.rb","lineNumber":17,"sourceCode":"module PgSync\n  class Client\n    include Utils\n\n    def initialize(args)\n      @args = args\n      output.sync = true\n    end\n\n    def perform\n      result = Slop::Parser.new(slop_options).parse(@args)\n      arguments = result.arguments\n      options = result.to_h\n      options[:defer_constraints_v2] ||= options[:defer_constraints]\n\n      raise Error, \"Specify either --db or --config, not both\" if options[:db] && options[:config]\n      raise Error, \"Cannot use --overwrite with --in-batches\" if options[:overwrite] && options[:in_batches]\n\n      if options[:version]\n        log VERSION\n      elsif options[:help]\n        log slop_options\n      elsif options[:init]\n        Init.new(arguments, options).perform\n      else\n        Sync.new(arguments, options).perform\n      end\n    rescue => e\n      # Error, PG::ConnectionBad, Slop::Error\n      raise e if options && options[:debug]\n      abort colorize(e.message.strip, :red)\n    end\n\n    def self.start\n      new(ARGV).perform","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/ankane/pgsync/blob/57bdddf5db506d329b51cb3376379dc3a2559010/lib/pgsync/client.rb#L1-L35","documentation":"Error \"Cannot use --overwrite with --in-batches\" thrown in ankane/pgsync.","triggerScenarios":"Thrown at lib/pgsync/client.rb:17 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"57bdddf5db506d329b51cb3376379dc3a2559010","analyzedAt":"2026-08-23T11:18:48.887Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}