`graphql.resolve` crashes backend process on invalid `BigInt` filter value (`signal 6`, Postgres enters recovery)
@olirice ci sta già lavorando.
Dal 14/5/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
pg_graphql crashes a PostgreSQL backend process (SIGABRT / signal 6) when a GraphQL filter passes a non-numeric string to a BigInt field.
Instead of returning a GraphQL validation/coercion error, the backend process is terminated while running:
SELECT graphql.resolve($1, $2, $3)
After that, Postgres restarts and clients see recovery/pool errors
To Reproduce
- Ensure a GraphQL-exposed type has a
BIGINTcolumn (in our case this isversion). - Run this GraphQL operation through
graphql.resolve:
query GetJobDetails($definitionFilter: jobDefinitionViewFilter, $runtimeFilter: jobsViewFilter) {
jobDefinitionViewCollection(filter: $definitionFilter) {
edges {
node {
id
version
displayName
}
}
}
jobsViewCollection(filter: $runtimeFilter, first: 1) {
edges {
node {
state
}
}
}
}
- Use variables where the
BigInt-typed filter value is not numeric:
{
"definitionFilter": {
"environment": { "eq": "dev" },
"name": { "eq": "job-name" },
"version": { "eq": "not-an-int" }
},
"runtimeFilter": {
"environment": { "eq": "dev" },
"name": { "eq": "job-name" }
}
}
- Observe PostgreSQL logs:
client backend ... was terminated by signal 6: AbortedFailed process was running: SELECT graphql.resolve($1, $2, $3)- followed by recovery mode and pooler login failures.
Expected behavior
A clear and concise description of what you expected to happen.
The invalid BigInt input should return a normal GraphQL/SQL error (similar to invalid input syntax for type bigint) and should not crash the backend process.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions:
- PostgreSQL:
PostgreSQL 18.1 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 15.2.0) 15.2.0, 64-bit - pg_graphql commit ref: unknown in packaged build (extension version is
1.5.12)
Additional context
- Plain Postgres cast handles this correctly without crashing:
SELECT 'not-an-int'::bigint;->ERROR: invalid input syntax for type bigint: "not-an-int"
- The crash appears specific to the
graphql.resolvepath. - Observed app-side error after crash:
Lost connection to the database server.
Security
If you beleive you have identified a security vulnerability in pg_graphql, please follow the instructions at security.txt and wait for a response before opening a GitHub issue.
- Lingua principale
- Rust
- Stelle
- 3.4k
- Fork
- 143
- Merge medio
- 4h 47m
- PR unite (30g)
- 2
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di supabase/pg_graphql
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
supabase/pg_graphql#646 ·
-
service_role treated as anon, by GraphiQLForse già presa @olirice l’ha presa 145 giorni fa. Apertatriage-required
supabase/pg_graphql#642 · 1 assegnatario ·
-
specifiedByURL field on __Type is declared in the schema but not handled by the resolverForse di nuovo libera @olirice l’ha presa 161 giorni fa e non c’è nessuna pull request aperta. Apertatriage-required
supabase/pg_graphql#629 · 1 assegnatario ·
-
Inconsistent handling of optional filter variables for `SETOF SQL` functions gives "Encountered Absent value" errorForse di nuovo libera @olirice l’ha presa 299 giorni fa e non c’è nessuna pull request aperta. Apertatriage-required
supabase/pg_graphql#617 · 1 commento · 1 assegnatario ·
-
Documentation lists Aggregate, but feature not released in pg_graphqlForse di nuovo libera @olirice l’ha presa 403 giorni fa e non c’è nessuna pull request aperta. Apertaquestion
supabase/pg_graphql#602 · 12 commenti · 1 reazione · 1 assegnatario ·
Tutte le issue di supabase/pg_graphql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
bmander/geomsolver#118 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Three Windows builds are keyed on a later release than their layoutForse già presa @ero-qt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
priority:P3 type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
sebastian-software/ferroni#253 ·
I maintainer di solito rispondono entro 1 giorno