Skip to content

syntax error with kv_store plugin.publickeys #52

@headyj

Description

@headyj

Hello,

I'm trying to migrate from SQLite to Postgres using this tool, but I have the following error:

INFO[2024-02-06T11:49:48+01:00] ✅ hex-encoded data values wrapped for insertion 
FATAL[2024-02-06T12:56:45+01:00] ❌ pq: syntax error at or near ")" INSERT INTO "kv_store" VALUES(22,0,'plugin.publickeys','key-********',replace(replace('-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nVersion: OpenPGP.js v4.10.1\r\nComment: https://openpgpjs.org*********==\r\n=DNbR\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n','\r',char(13)),'\n',chr(10)),'2023-08-28 07:39:10','2023-08-28 07:39:20.062750226+00:00') - failed to import dump file to Postgres. 

I checked the dump done by the tool, and it seems that there's in fact a syntax error at this line

I think in theory I could just remove this entry but I guess the tool is doing some other logic and not only loading the sql file into postgres as I have an error at Grafana startup if I just remove this line from the sql and import the rest manually using psql:

grafana Error: ✗ Datasource provisioning error: pq: invalid input syntax for type integer: "false"

I'm using the latest version of the tool with Grafana v10.3.1 on Kubernetes v1.27 (AWS)

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