Skip to content

grafbase start: use a postgres connection pool instead of a single connection#1771

Merged
tomhoule merged 1 commit intomainfrom
gb-6874-re-use-connections-in-self-hosted-postgres-connector
Jun 12, 2024
Merged

grafbase start: use a postgres connection pool instead of a single connection#1771
tomhoule merged 1 commit intomainfrom
gb-6874-re-use-connections-in-self-hosted-postgres-connector

Conversation

@tomhoule
Copy link
Copy Markdown
Contributor

This is a problem as soon as concurrent requests are involved.

We defer the size of the pool to the pooling library (deadpool). It defaults to cpu_count * 4 (source).

closes GB-6874

…nnection

This is a problem as soon as concurrent requests are involved.

We defer the size of the pool to the pooling library (deadpool). It defaults
to  cpu_count * 4 ([source](https://docs.rs/deadpool/latest/deadpool/managed/struct.PoolConfig.html#structfield.max_size)).

closes GB-6874
@linear
Copy link
Copy Markdown

linear bot commented Jun 12, 2024

@tomhoule tomhoule marked this pull request as ready for review June 12, 2024 14:23
@tomhoule tomhoule requested a review from a team as a code owner June 12, 2024 14:23
@tomhoule tomhoule requested a review from jakubadamw June 12, 2024 14:23
@tomhoule tomhoule merged commit af810da into main Jun 12, 2024
@tomhoule tomhoule deleted the gb-6874-re-use-connections-in-self-hosted-postgres-connector branch June 12, 2024 14:55
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the postgres connector (https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two tables. See the pull request (#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for federated graphs. #1766
@tomhoule tomhoule mentioned this pull request Jun 13, 2024
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the postgres connector (https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two tables. See the pull request (#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for federated graphs. #1766
- Expand the scope of files watched for changes in `grafbase dev`. #1774
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the postgres connector (https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two tables. See the pull request (#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for federated graphs. #1766
- Expand the scope of files watched for changes in `grafbase dev`. #1774
tomhoule added a commit that referenced this pull request Jun 13, 2024
Features

- You can now filter on text columns with the LIKE operator on the
postgres connector
(https://www.postgresql.org/docs/current/functions-matching.html). #1764
- The postgres connector now uses a connection pool instead of a single
connection in `grafbase start`. #1771
- The postgres connector now supports multiple relations between two
tables. See the pull request
(#1770) for an example.
- Fixed a bug with enum values sent to subgraphs in `grafbase dev` for
federated graphs. #1766
- Expand the scope of files watched for changes in `grafbase dev`. #1774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants