DBLINK_IS_BUSY(3)
π DBLINK_IS_BUSY(3) π
okay bestie, welcome to the dblink_is_busy page from the PostgreSQL 18.6 Documentation β¨ this is a section 3 manual page and it's literally so short and so useful, we love a low-effort icon π
πΈ NAME πΈ
dblink_is_busy β checks if connection is busy with an async query π
β¨ SYNOPSIS β¨
dblink_is_busy(text connname) returns int
that's it. one argument. one return. no cap. π«Ά
π¦ DESCRIPTION π¦
so like, dblink_is_busy tests whether an async query is in progress π that's the whole job. it peeks at your connection and tells you if it's still out there doing async stuff or if it's free.
π ARGUMENTS π
connnameβ the name of the connection to check π§ you gotta tell it which connection you're asking about, it's not a mind reader bestie.
π RETURN VALUE π
- returns
1if the connection is busy π₯ - returns
0if it is not busy π
and here's the part that actually matters: if this function returns0, it is guaranteed thatdblink_get_resultwill not block π that's the whole point, that's the tea, that's why you're here. no surprise hanging, no mysterious waiting, periodt.
β EXAMPLES β
look at this lil one-liner, it's giving main character energy:
SELECT dblink_is_busy('dtest1');
just call it, get your 1 or your 0, move on with your day π
PostgreSQL 18.6 Β· 2026 β and that's the whole page bestie, mwah, go check if your connection is busy, ily π«Άπβ¨
π¦ where this page comes from
- alpine 3.23: postgresql18-doc 18.6-r0 Β· PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 Β· PostgreSQL
- arch rolling: postgresql 18.6-4 Β· PostgreSQL
- fedora 43: postgresql-contrib 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-contrib 18.6-1.fc44 Β· PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-doc-18 18.6-0ubuntu0.26.04.1 Β· PostgreSQL
- ubuntu stonking: postgresql-doc-18 18.6-3build2 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms