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 1 if the connection is busy πŸ”₯
  • returns 0 if it is not busy 🌈
and here's the part that actually matters: if this function returns 0, it is guaranteed that dblink_get_result will 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 πŸ«ΆπŸ’–βœ¨