We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
net._http_response
When having a TTL of:
show pg_net.ttl; 6 hours
Doing new requests succeed, but their response rows get deleted quickly(after 1 second):
select net.http_get('https://webhook.site/449fddab-5642-4645-9a5e-6c71f7fe9a8e'); select * from net._http_response; -- 0 rows
This is because the worker inserts rows using a now() default value:
now()
pg_net/src/worker.c
Lines 339 to 340 in 639b049
pg_net/sql/pg_net.sql
Line 41 in 639b049
And this now() is not getting updated. Every new insert uses an "old" now() value.
Use SetCurrentStatementStartTimestamp() before:
SetCurrentStatementStartTimestamp()
Lines 205 to 206 in 639b049
To make now() use the current time.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Problem
When having a TTL of:
Doing new requests succeed, but their response rows get deleted quickly(after 1 second):
This is because the worker inserts rows using a
now()
default value:pg_net/src/worker.c
Lines 339 to 340 in 639b049
pg_net/sql/pg_net.sql
Line 41 in 639b049
And this
now()
is not getting updated. Every new insert uses an "old"now()
value.Solution
Use
SetCurrentStatementStartTimestamp()
before:pg_net/src/worker.c
Lines 205 to 206 in 639b049
To make
now()
use the current time.The text was updated successfully, but these errors were encountered: