-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Schema reloading via notice not working(Windows) #2524
Comments
I should also add I copied the automatic schema refresh functions from the documentation and these also did not work to resolve the issue. |
When you do the schema reload via notify - can you see the "schema reloaded" message on the postgrest cli output? |
No, I do not get that notification. I also do not see any updates to the CLI when I successfully request data from the API |
What does |
Please see below
|
Does anyone have any ideas? |
How exactly do you |
I have tried |
Does anyone have any further ideas on this issue? Also should I raise the lack of logging as a separate issue? |
The problem is that it's hard for us maintainers to reproduce since we don't use Windows. Pinging @majkinetor which has helped us before with packaging for Windows. |
@steve-chavez, I am on vacation, but I could look into it in April. I am not using currently postgrest but I would like to help it spread. It would be good to assign me this ticket so not to forget. |
I have the same problem (also on Windows). Is there any progress on this issue ? |
@benoit-penelle it seems the issue is in |
…pushes the solution proposed in PostgREST#2906 upstream (diogob/hasql-notifications#18)
The issue was fixed in #2909. |
It worked correctly with releases 12.0.2 and 12.0.3. Since the release 12.2.0 it doesn't work anymore. |
@bepenelle Is there any error message? |
No error message is displayed. Also, no info message is displayed indicating that the schema has been reloaded. Here is my config :
When I execute
Since release 12.2.0, no message appears when I run the notify command and the schema is not reloaded in cache. Here is the message I receive when I request http://localhost:3000/rpc/test just after having added a new function test and executed the notify :
I've tested versions 12.2.0, 12.2.3, 12.2.4 and 12.2.5 on Windows 11 and the problem is the same. |
@diogob in diogob/hasql-notifications@243f01b you added a conditional for windows, which fixed this problem. But in diogob/hasql-notifications@769ca47 it seems this conditional was lost and the old behavior restored. Was this by accident? |
It does look odd, I'm checking it now. |
@wolfgangwalther my mistake. That conditional was removed by accident. I have reintroduced it and published a version 0.2.3.2. I'm still waiting the hackage update to test the PostgREST build. In case it breaks some dependency I'll publish a fix for the 0.2.2.0. |
Cool, thanks for the quick fix. I'm pretty sure we can't move to 0.2.3.2, yet, because it will conflict with hasql dependencies. I tried in https://github.com/PostgREST/postgrest/pull/3866/files#diff-2b83012b070c2bc79ae40e1e4bc9a229f65e046225e8276281b96f37ee80a3ea. So we probably need a 0.2.2.1. |
@wolfgangwalther just published 0.2.2.1 that will probably compile seamlessly. |
This seems to have odd bounds for hasql-pool. 0.2.2.0 had |
unfortunately the old bounds are producing a compilation error. You will find a new version 0.2.2.2 with bounds closer to the original |
…indows specific code. Update hasql-notifications to newly fixed version
…indows specific code. Update hasql-notifications to newly fixed version
…indows specific code. Update hasql-notifications to newly fixed version
…indows specific code. Update hasql-notifications to newly fixed version
…indows specific code. Update hasql-notifications to newly fixed version
Upstream accidentally removed the fix, which was introduced for #2524. Fixed again.
Upstream accidentally removed the fix, which was introduced for PostgREST#2524. Fixed again. (cherry picked from commit b285f5f)
Environment
Description of issue
When I make schema changes and execute a notice to pgrst I expect the schema to reload an the new function to work. However it remains not working until I stop and restart PostgREST.
For any new function added to my api schema and after a notice is raised I still get the below error
"code": "PGRST202",
"details": null,
"hint": "If a new function was created in the database with this name and parameters, try reloading the schema cache.",
"message": "Could not find the api.test_funct2(srid, x1, x2, y1, y2) function or the api.test_funct2 function with a single unnamed json or jsonb parameter in the schema cache"
The text was updated successfully, but these errors were encountered: