Skip to content

Ankus 0.2.29

Choose a tag to compare

@willibrandon willibrandon released this 13 Nov 06:09
75d5ae4

Ankus 0.2.29 fixes a PostgreSQL server that could fail to start on a busy machine with NativeAOT fork support: host service threads did not detach. when shared_preload_libraries loads an Ankus extension on Linux or macOS. Before the postmaster forks, Ankus's runtime waits for its own service threads, such as a replacement finalizer, to finish. Each of those waits gave up after about 10 seconds, but a new thread on a loaded machine can wait longer than that for its first turn on a CPU. The runtime now waits until the thread finishes, and after 10 seconds, and then every minute, it writes what it is waiting for and each attached thread's ID and role to the server log. The same release fixes a rarer startup hang under server GC with fixed heap counts, where a finalizer exiting during that wait could block on a collection that never ran.

An extension that leaves its own thread running when a preload callback returns now delays startup until that thread ends, with the same report naming it as other. It used to stop the server after about 10 seconds. Finish explicitly created threads before a preload callback returns.

The runtime and compiler packages are now 10.0.15-ankus.2 and 11.0.0-ankus.2. To update, run dotnet tool update --global Ankus.Tool --version 0.2.29, then ankus upgrade in your solution, and rebuild and redeploy your extensions. Native AOT embeds the runtime in each published library, so an extension picks up the fix only when it is rebuilt.