{"record":{"id":"afd92d3421f4af83","repo":"ankane/pgsync","slug":"libpq-is-too-old-upgrade-it-and-run-gem-install","errorCode":null,"errorMessage":"libpq is too old. Upgrade it and run `gem install pg`","messagePattern":"libpq is too old\\. Upgrade it and run `gem install pg`","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/pgsync/data_source.rb","lineNumber":192,"sourceCode":"    private\n\n    def concurrent_id\n      [Process.pid, Thread.current.object_id]\n    end\n\n    def reconnect\n      @conn.reset\n      @concurrent_id = concurrent_id\n    end\n\n    def table_set\n      @table_set ||= Set.new(tables)\n    end\n\n    def conninfo\n      @conninfo ||= begin\n        unless conn.respond_to?(:conninfo_hash)\n          raise Error, \"libpq is too old. Upgrade it and run `gem install pg`\"\n        end\n        conn.conninfo_hash\n      end\n    end\n\n    # for pg 1.4.4\n    # https://github.com/ged/ruby-pg/issues/490\n    def dedup_localhost(value)\n      if conninfo[:host] == \"localhost,localhost\" && conninfo[:port].to_s.split(\",\").uniq.size == 1\n        value.split(\",\")[0]\n      else\n        value\n      end\n    end\n  end\nend\n","sourceCodeStart":174,"sourceCodeEnd":209,"githubUrl":"https://github.com/ankane/pgsync/blob/57bdddf5db506d329b51cb3376379dc3a2559010/lib/pgsync/data_source.rb#L174-L209","documentation":"Error \"libpq is too old. Upgrade it and run `gem install pg`\" thrown in ankane/pgsync.","triggerScenarios":"Thrown at lib/pgsync/data_source.rb:192 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"}