Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upclient.release and pitfall with client.end are not documented in pg.Client’s API #2101
Comments
I agree this is confusing. I waffled back and forth internally on monkey-patching over |
The API documentation for
pg.Client
does not documentclient.release
. The method is documented elsewhere in the overview of pooling and the API documentation forpg.Pool
(see #1302 (comment)), but, due to my inattentive blindness, I had missed that the examples usedclient.release
, notclient.end
. It would be good ifclient.release
itself was documented as a method on the API documentation forpg.Client
, with its own section—even if it simply referred to the section aboutreleaseCallback
on the API documentation forpg.Pool
.I ran into this when I had assumed that I could call
client.end
to release a pool’s connection back to the pool, before I even had realized thatclient.release
existed. Callingpool.end
after callingclient.end
will hang the process (see #1414 (comment)). It would be good if this pitfall was also documented forpg.Client
inclient.end
’s section: