-
Notifications
You must be signed in to change notification settings - Fork 67
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
yamltodb fails on Postgres 13 due to removal of pg_pltemplate catalog #226
Comments
The PR didn't work (see Travis logs). I think two things are needed. First, your mod ought to be tested against PG 13. Did you run any of the tests locally, in particular the extensions tests? Anyway we need to change .travis.yml to add that version (we should probably remove versions 9.4 and 9.5 as they're no longer supported). And then we need to investigate the errors and fix them. They all appear to be the same error in |
Thanks for the quick reply!
I didn't run the tests locally, just ran it as part of the script we use.
The fix doesn't work at all since the languages don't show up in
`pg_available_extensions()` until `CREATE EXTENSION` has run.
I'll look again tomorrow and the few other tests that started to fail on 13.
…On Wed, Apr 7, 2021, 3:03 PM Joe Abbate ***@***.***> wrote:
The PR didn't work (see Travis logs). I think two things are needed.
First, your mod ought to be tested against PG 13. Did you run any of the
tests locally, in particular the extensions tests? Anyway we need to change
.travis.yml to add that version (we should probably remove versions 9.4 and
9.5 as they're no longer supported). And then we need to investigate the
errors and fix them. They all appear to be the same error in
test_create_lang_extension in tests/dbobject/test_extension.py.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#226 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABA6HRTA3JSWKYY5VECGT63THTJE5ANCNFSM42RQ4FWA>
.
|
I just got really excited about using Pyrseas but the dbtoyaml function erred immediately and I am pretty sure it is this same bug. Its hitting issues with my extensions, which I have several. I dropped one, and it just errors at the next. So yes, I think this is still a bug. I am probably not suited to help with the python, but I can certainly help with generating pg_* queries to get the right info as per the above? If I can help in that way, give me some specs to work towards. |
@alexitheodore Could you please first show the |
@jmafc Sure, here are two different ones: First error (seemingly from pg_cron extension)
Then I tried dropping that and running again. So the second error looks like it is to do with JSONB - hard to tell if that is extension related or not since it is native...
As for |
Yes, I wasn't expecting you to create a test in |
@jmafc Ok, that I can do. So, for pg_cron, I did the most remedial test first: fresh cluster/database and adding the pg_cron extension. Steps to recreate:
Then you will get the error:
For what it is worth, |
And here is another test, this time starting from a totally clean slate:
This doesn't cause any errors.
But when I create the corresponding aggregate function, then the error happens:
My guess is that the aggregate function is being regarded as a normal function/procedure - which it isn't. |
One last thing: please confirm that you're using the 0.9.1 version of Pyrseas. Josh Curtis (the OP) submitted a PR but it was only committed to |
Confirmed.
|
I've been out of the game for too long it seems. Travis-ci.org doesn't work anymore and travis-ci.com wants me to sign up for a plan and provide a bunch of info, instead of just an email. It also refuses for some strange reason to map |
For the record, once I installed |
If you have access to a database running under PG earlier than 13, then it may be helpful if you ran the test against that. If you don't have access, that's OK. I'll have to download pg_cron and I'll install it on both PG 11 and 13. |
FYI, I tried to install postgresql-11-cron and postgresql-13-cron from the PGDG repositories onto Debian butster, and both failed as "not found". I'm going to try the GH local build instructions. |
@alexitheodore I was able to make pg_cron locally (after installing postgresql-server-{11,13}-dev, which are not mentioned as requirements). The instructions mention |
I don't have pg11 handy to test anything with. I can only add that installation was easy for me on EC2 Ubuntu via:
Not sure if that helps - but I completely understand if you don't want to spend all day and muddy your system just to get pg_cron loaded. I also agree, its probably more unique to pg_cron than pg13. Does pyrseas currently support C language functions? |
I had forgotten to do an If you'd like to help, you can take a look at the The simple answer to your last question is yes, but it may depend on what you think "support" means. |
If you change the WHERE NOT tgisinternal
AND (nspname != 'pg_catalog' AND nspname != 'information_schema')
AND t.tgfoid NOT IN (
SELECT objid FROM pg_depend WHERE deptype = 'e'
AND classid = 'pg_proc'::regclass) then |
@alexitheodore Did you get a chance to test my suggestion above? |
@jmafc Sorry not yet - almost got around to it last night. I will soon, just got swamped. |
Opened new issue (#236) to deal with |
As posted in #236, the updated SQL fixes the pg_cron bug, though the second error persists: |
The discussion from 2 to 13 Nov 2021 is not relevant to the basic issue of |
For PG 13, the pg_pltemplate catalog has been removed. Use a hard coded version of the queried catalog contents (language names) instead of using a substitute query that only gives the installed languages. Also fix some extension-related tests.
Turned out |
pg_pltemplate was removed in postgres 13 causing yamltodb to fail when this statement runs.
My understanding (based on #39) is that Pyrseas needs a way to distinguish language extensions and other extensions. If so, I think joining
pg_language
withpg_available_extensions()
gives the same result but am not 100% sure.The text was updated successfully, but these errors were encountered: