drizzle-team / drizzle-team/drizzle-orm

[BUG]: `drizzle-kit push` with PostgreSQL leaves behind long-lived connections

Open
#2,845 0 comments 0 reactions 0 assignees View on GitHub
bug db/postgres drizzle/kit priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.33.0

### What version of `drizzle-kit` are you using?

0.24.1

### Describe the Bug

Using `drizzle-kit push` wastefully leaves behind long-lived connections with PostgreSQL (`16.4`).

```ts
import type { Config } from "drizzle-kit"

import { env } from "~/env"

export default {
schema: "./src/db/schema.ts",
dialect: "postgresql",
dbCredentials: { url: env.PSQL_URL },
schemaFilter: [env.PSQL_SCHEMA],
} satisfies Config
```

### Expected behavior

Allow a way to configure the client to disconnect after some idle time, or allow more custom code so that the user can manually disconnect the client.

### Environment & setup

- MacOS (`14.6.1`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.