Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange database retention error #12

Open
opsecx opened this issue Oct 15, 2024 · 0 comments
Open

Strange database retention error #12

opsecx opened this issue Oct 15, 2024 · 0 comments
Labels
bug Something isn't working component:db problems with the database needs repro

Comments

@opsecx
Copy link

opsecx commented Oct 15, 2024

Came across what seems to be some artifact error in the configs. This is the situation:

I worked previously with another db in my postgres installation. The network upgraded and I switched db to a newly created one in the .env file. No traces of referring the older db (named "undexer" for these purposes). Things also index fine except for the crash mentioned in separate issue. Everything is indexed to the new db (let's call it undexer2). Now, when I delete the former db (undexer), I get the following errors when starting the indexer:

`./undexer index
⏳ Starting @hackbg/undexer�3.0.0...
⏳ Compiling TypeScript...
⌛ Compiled TypeScript in 0.037s

✔ �DB�Creating database "undexer2"...
using deprecated parameters for the initialization f
unction; pass a single object instead
using deprecated parameters for the initialization f
unction; pass a single object instead
× �DB�error: database "undexer" does not exist
����at Parser.parseErrorMessage (/home/(user)/undexe
r/node_modules/.pnpm/[email protected]/node_modules/
pg-protocol/dist/parser.js:283:98)
����at Parser.handlePacket (/home/(user)/undexer/nod
e_modules/.pnpm/[email protected]/node_modules/pg-pr
otocol/dist/parser.js:122:29)
����at Parser.parse (/home/(user)/undexer/node_modul
es/.pnpm/[email protected]/node_modules/pg-protocol/
dist/parser.js:35:38)
����at Socket. (/home/(user)/undexer/node
_modules/.pnpm/[email protected]/node_modules/pg-pro
tocol/dist/index.js:11:42)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:191:23)�{
length: 90,
severity: 'FATAL',
code: '3D000',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'postinit.c',
line: '885',
routine: 'InitPostgres'
}
× �DB�Failed to create database "undexer2". See above for details.`

When I recreate a dummy (empty, no permissions) db "undexer" again, it starts with no issues and indexes to "undexer2" all relevant data. I assume somehow somewhere in the build system, old .env data is retained. The old db is not referenced anywhere in current .env.

@egasimus egasimus added bug Something isn't working component:db problems with the database labels Nov 4, 2024
@egasimus egasimus mentioned this issue Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:db problems with the database needs repro
Projects
None yet
Development

No branches or pull requests

2 participants