Skip to content

[BUG]: Database fails to init after update #932

@GyulaSipos

Description

@GyulaSipos

To Reproduce
I updated my dependencies from pglite 0.3.15 and pglite-sync 0.4.0 to pglite 0.4.1 and pglite-sync 0.5.1.
No other modifications where made in the project. Run it in debug. Chrome dev console is filled with errors, database fails to init.
I even tried deleting my idb (where pglite persists), did not help.

Logs

tec: shmctl: no such segment 666
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.813 UTC [42] DEBUG:  invoking IpcMemoryCreate(size=3981312)
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.815 UTC [42] DEBUG:  dynamic shared memory system will support 304 segments
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.815 UTC [42] DEBUG:  created dynamic shared memory control segment 1049979052 (7308 bytes)
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.816 UTC [42] DEBUG:  InitPostgres
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.817 UTC [42] LOG:  database system was interrupted; last known up at 2026-03-22 07:41:16 UTC
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.817 UTC [42] DEBUG:  removing all temporary WAL segments
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  checkpoint record is at 0/3FA0760
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  redo record is at 0/3FA0760; shutdown true
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  next transaction ID: 757; next OID: 40960
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  next MultiXactId: 1; next MultiXactOffset: 0
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  oldest unfrozen transaction ID: 730, in database 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  oldest MultiXactId: 1, in database 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  commit timestamp Xid oldest/newest: 0/0
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] LOG:  database system was not properly shut down; automatic recovery in progress
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  transaction ID wrap limit is 2147484377, limited by database with OID 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  MultiXactId wrap limit is 2147483648, limited by database with OID 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  starting up replication slots
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  xmin required by slots: data 0, catalog 0
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  starting up replication origin progress state
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  didn't need to unlink permanent stats file "pg_stat/pgstat.stat" - didn't exist
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.818 UTC [42] DEBUG:  resetting unlogged relations: cleanup 1 init 0
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.819 UTC [42] LOG:  redo starts at 0/3FA07D8
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.822 UTC [42] LOG:  invalid record length at 0/3FCE1C8: expected at least 24, got 0
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.822 UTC [42] LOG:  redo done at 0/3FCDED8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.822 UTC [42] DEBUG:  resetting unlogged relations: cleanup 0 init 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.823 UTC [42] DEBUG:  MultiXactId wrap limit is 2147483648, limited by database with OID 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.823 UTC [42] DEBUG:  MultiXact member stop limit is now 4294914944 based on MultiXact 1
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.823 UTC [42] DEBUG:  performing replication slot checkpoint
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.824 UTC [42] DEBUG:  attempting to remove WAL segments older than log file 00000000000000000000003E
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.825 UTC [42] DEBUG:  cache state reset
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.827 UTC [42] FATAL:  role "web_user" does not exist
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.827 UTC [42] DEBUG:  shmem_exit(1): 6 before_shmem_exit callbacks to make
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.827 UTC [42] NOTICE:  shutting down
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.827 UTC [42] DEBUG:  performing replication slot checkpoint
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  attempting to remove WAL segments older than log file 00000000000000000000003E
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  SlruScanDirectory invoking callback on pg_subtrans/0000
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  shmem_exit(1): 12 on_shmem_exit callbacks to make
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  cleaning up orphaned dynamic shared memory with ID 3330523956
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  cleaning up dynamic shared memory control segment with ID 1049979052
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  proc_exit(1): 2 callbacks to make
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] NOTICE:  database system is shut down
et @ index.js?v=3d727c28:3
index.js?v=3d727c28:3 2026-03-22 07:44:11.828 UTC [42] DEBUG:  exit(1)
et @ index.js?v=3d727c28:3
138index.js?v=3d727c28:3 Uncaught (in promise) Error: PGlite failed to initialize properly
    at q.nt (index.js?v=3d727c28:3:283062)
    at q.tt (index.js?v=3d727c28:3:280141)
    at async q.create (index.js?v=3d727c28:3:272661)
    at async init (db_worker.ts:22:20)
5318index.js?v=3d727c28:1 Uncaught (in promise) Error: PGlite failed to initialize properly
    at q.nt (index.js?v=3d727c28:3:283062)
    at q.tt (index.js?v=3d727c28:3:280141)
    at async q.create (index.js?v=3d727c28:3:272661)
    at async init

Details

  • PGlite version: 0.4.1
  • using any extensions? pglite-sync 0.5.1
  • OS version mac
  • up to date Arc browser (chromium)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions