Hi, I tested the patch by reproducing the issue before and after applying the changes. Before applying the patch, I was able to reproduce the issue by setting shared_buffers = 128kB and running pgbench with 16 clients and 16 threads. The server reported no unpinned buffers available with SQLSTATE XX000. After applying the patch, I repeated the same test and confirmed that the error was reported with SQLSTATE 53000 (insufficient resources), as expected. I also ran the regression tests, and all tests passed. git diff --check reported no issues. The patch looks good to me. It reports the error with the appropriate SQLSTATE while keeping the existing error message unchanged.
Thanks for the patch. Regards, solai
