-
-
Notifications
You must be signed in to change notification settings - Fork 199
bump to pg_net 0.19.5 #1728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
bump to pg_net 0.19.5 #1728
Conversation
Please ensure local infra testing is done this time to prevent the mishap in #1704. Our current automated tests are not sufficient. |
@soedirgo Are you sure the manual tests would reproduce the DROP DATABASE problem? From:
It looks like they wouldn't have prevented this case anyway. This happens when DROP DATABASE is done on a different database than the current one being used. |
We need to err on the side of caution and do E2E testing even if it’s manual. It’s clear in hindsight that the blast radius of this change is bigger than initially expected. You can try reproducing the problem on the new AMI through local infra testing - if the same issue doesn’t show up you’re good to go. |
Not sure that supabase/pg_net#217 will help to fix the issue with The command
By default background workers just die if |
@za-arthur Many thanks for your review, this is helpful. I can confirm that prior to the fix (on this previous commit supabase/pg_net@a78be08), the postgres=# drop database foo with (force);
...
2025-07-31 15:26:15.687 -05 [573129] LOG: still waiting for backend with PID 573119 to accept ProcSignalBarrier
2025-07-31 15:26:15.687 -05 [573129] STATEMENT: drop database foo with (force);
2025-07-31 15:26:20.692 -05 [573129] LOG: still waiting for backend with PID 573119 to accept ProcSignalBarrier
2025-07-31 15:26:20.692 -05 [573129] STATEMENT: drop database foo with (force); However this only happens for pg >= 15. Previous pg versions had
So I guess this behavior changed on pg 15 and Edit: added a new test for this supabase/pg_net#219 |
@steve-chavez indeed, I see now that I think if You don't need to define new signal to synchronize between processes. You can assign a worker latch to the shared structure by:
|
@steve-chavez BTW I also noticed that |
@za-arthur It needs a shared latch so other backends can wake the background worker when doing
Btw, UNIX signals could have been used instead of a shared latch but shared latchs are much faster than signals since the communication happens in memory, we needed to make it the fastest to solve supabase/pg_net#175
Thanks, will take a look. Converting the PR to draft until the issue is closed. |
I think The code snippet above for
|
@za-arthur Thanks for the hint! I've addressed that on supabase/pg_net#221. Considering it a |
- No longer executes unnecessary queries, preventing pollution of pg_stat_statements supabase/pg_net#199 - Fixes the memory leak problem with `pg_stat_monitor` supabase/pg_net#199 - Fixes the previous problem on 0.19.3 with DROP DATABASE supabase/pg_net#217 - `http_delete` with request body added in supabase/pg_net#173
06fc658
to
a9c8219
Compare
All feedback from Artur has been solved and I've updated this PR to the new pg_net 0.19.5 patch version. |
pg_stat_monitor
http_delete
with request body added in feat: support net.http_delete with request body pg_net#173Bumping from 0.14 to 0.19.4 might seem like a big change, but many minor versions were bumped just because of the addition of testing utilities (and addition of DEBUG traces, which perhaps were too strict to be minor versions) and pg v18 compatibility. The main changes here are 1 and 3.
Release notes: