Skip to content

Errors when connection string has searchpath #5

Description

@CheloXL

My connection string looks like: Host=localhost:5433;Database=mydb;SearchPath=preprod,public;Username=theuser;Password=thepassword;Include Error Detail=true, and I'm executing dbpill.exe postgres://theuser:thepassword@localhost:5432/mydb.

DBPill is working correctly as a proxy (queries work), but the web interface it's broken. Queries are shown, but no times, query plan, anything. In the console I see errors like the following:

SELECT d."Id", d."FriendlyName", d."Xml"
FROM "DataProtectionKeys" AS d
[]
Error analyzing query: error: relation "DataProtectionKeys" does not exist
    at ./server.bundle.cjs:52910:21
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async QueryAnalyzer.analyze (./server.bundle.cjs:85670:22)
    at async AdvancedPostgresProxySession.logQuery (./server.bundle.cjs:85899:24) {
  length: 117,
  severity: 'ERROR',
  code: '42P01',
  detail: undefined,
  hint: undefined,
  position: '79',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '1384',
  routine: 'parserOpenTable'
}
Did you try connecting to a database different than the one you are running dbpill on? In that case, proxy may still work, but queries will fail to get analyzed.

Tables are under the preprod search path. Access to public is needed in order for psql extensions to work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions