Understanding PGLite and PostgreSQL adapters in the SQL plugin
BaseDrizzleAdapter
:
BaseDrizzleAdapter
, which implements the IDatabaseAdapter
interface from @elizaos/core
. The adapters handle:
PgliteDatabaseAdapter
uses an embedded PostgreSQL instance that runs entirely in Node.js.
PGliteClientManager
handles:
PgDatabaseAdapter
connects to a full PostgreSQL database using connection pooling.
PostgresConnectionManager
provides:
DatabaseMigrationService
. The adapters themselves do not run migrations directly.
POSTGRES_URL
is set → Uses PostgreSQL adapterPOSTGRES_URL
is not set → Uses PGLite adapter
PGLITE_DATA_DIR
if specified./.eliza/.elizadb