-
Notifications
You must be signed in to change notification settings - Fork 157
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
Upgrade From Postgresql 11 to Postgresql 15 was failed due to prefetch - oid null value. #711
Comments
Your problem report is very confused. You complain about orafce (which is unrelated to oracle_fdw), and you don't even tell me how you tried to upgrade. Please describe what exactly you did, which version of oracle_fdw you have before and after the upgrade (use Yes, the limit for the Still, my recommendation is to lower |
Hi Laurenz, Sorry for the confusion let me summarize the step by step what we did. last week we tried upgrade as below.
then we started dry run it was success. /usr/pgsql-15/bin/pg_upgrade --old-bindir /usr/pgsql-11/bin --new-bindir /usr/pgsql-15/bin --old-datadir /pgDATA/data --new-datadir /pgDATA/15/data --link --check
|
We used latest development version of oracle_fdw, |
Could you please share inputs on this issue? |
We used latest development version of oracle_fdw - 2.7.0 |
select oracle_diag();
|
I understand the problem now, thanks. The The error about The solution is to use the latest development version. That is not 2.7.0, but this. |
Thanks for the quick reply. alter extension orafce update; --- failed to update on PostgreSQL V11 can we ignore above ERROR and proceed for the upgrade-15 please advise. |
I don't know, and I won't investigate an orafce error. I have nothing to do with orafce. |
Could you please advise who can help us on the orafce update issue? |
Sure, that project is here. You can open an issue there. |
Thank you so much. Opened an issue. |
Please let me know when we can close this issue. |
Could you please give me some time till this weekend? |
Sure, no problem at all. |
Hi Laurenz As per your advise we updated oracle fdw before the PostgreSQL, Post that upgrade was completed successfully. On the PostgreSQL 15 we have updated oracle fdw and orafce extension with same level extensions aswell. Just to verify the oracle fdw and orafce ran below select queries there were no output. That means extension having any issues? Please share your inputs. select orafce.rownum from my_foreign_table; select orafce.to_char(current_date,'YYYY-MM-DD'); select * from my_foreign_tables limit 10; |
select oracle_diag();
|
select * from pg_extension; |
Hi |
Can you please advise how to validate extension is working or not as expected after the upgrade? |
If you get the error "relation X does not exist", that may mean that the table actually does not exist, but also that it could not be found on your You can look for the schema as follows: BEGIN;
SET LOCAL search_path = '';
SELECT oid::regclass
FROM pg_class
WHERE lower(relname) = 'my_foreign_table';
ROLLBACK; That should show you where the foreign table really is. |
That means PostgreSQL upgrade went fine? |
if i run the "select * from pg_foreign_table" it is listing the output of the foreign tables. |
If it is visible in Run If that works, I'd say that everything is fine. If you didn't get errors during the upgrade process, it should be fine. |
Thanks for the quick reply. |
Let me try that. |
Can share you view on below scenario On PostgreSQL 11 oracle fdw update to 2.8 then after upgrade to PostgreSQL 15. Stating that it already updated. In case if we plan make && make install on PostgreSQL 15 for oracle fdw before upgrade what will happen is it same output (or) different while update the extension? what is your approach on this? kindly share you inputs |
That's the way you should do it: install the latest oracle_fdw version on both v11 and v15. PATH=/usr/pgsql-11/bin:$PATH make clean
PATH=/usr/pgsql-11/bin:$PATH make
PATH=/usr/pgsql-11/bin:$PATH make install
PATH=/usr/pgsql-15/bin:$PATH make clean
PATH=/usr/pgsql-15/bin:$PATH make
PATH=/usr/pgsql-15/bin:$PATH make install |
can we restore v11 specific database backup on the v15? |
You should be able to. For best results, dump the v11 database with Anyway, is the issue solved? |
==> You should be able to. For best results, dump the v11 database with pg_dump from v15. Are you referring below way to restore v11 specific database on v15? Please review and suggest. On v11:pg_dump -U postgres -F c test_db > test_db.tar On v15:pg_dump -h v11 -U postgres -Ft test_db1 < test_db.tar |
Getting below error when i tried to restore the v11 database dump on v15. Please review and advise. (orafce extension version is 4.13 on v15). nohup: ignoring input pg_restore: error: could not execute query: ERROR: function to_char(integer) does not exist |
Please stop asking about unrelated extensions like pg_hint_plan. Either install it in the new system too, or drop it in the old system before upgrading. The second error smells of orafce. Nothing of that has anything to do with oracle_fdw. |
Before closing this issue could you please review and advise. ==> You should be able to. For best results, dump the v11 database with pg_dump from v15. Are you referring below way to restore v11 specific database on v15? Please review and suggest. On v11: On v15: |
We have updated below extension on PostgreSQL 11 before proceeding the PostgreSQL 15 upgrade.
On PostgreSQL 11
Oracle FDW - 1.1 To 1.2
orafce - 3.7 To 4.9
While updating the orafce for one B-database getting below error. For other A-database it was updated successfully.
A - Database:
orafce - 4.9
B-database
orafce - 3.7 <<<<<<<< Unable to update the extension.
alter extension orafce update;
ERROR: type "oracle.date" does not exist
drop extension orafce;
ERROR: cache lookup failed for type XXXXXXX
drop extension orafce restrict;
ERROR: cache lookup failed for type XXXXXXX
drop extension orafce cascade;
ERROR: cache lookup failed for type XXXXXX
Since there was no update on the extension we took once to initialize the upgrade with dry run it went fine there was no issue with dry run.
When we start the actual upgrade it got failed with below error.
pg_restore: error: could not execute query: ERROR: invalid value for option "prefetch"
HINT: Valid values in this context are integers between 1 and 1000.
CREATE FOREIGN TABLE XXXXXX()server "server_name"
OPTIONS (
"prefetch" '10000',
When we checked "prefetch" value form pg_type it was null
select oid,typname from pg_type where typname='prefetch';
oid | typname
-----+---------
(0 rows)
_Can you please advise since prefetch value was null our upgrade was failed (or) orafce version 3.7 incompatible to the PG15 which is on B-database creating this problem?
Can we try as per the HINT to update the binary upgrade set values as below?_
-- For binary upgrade, must preserve pg_type oid
SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('14535618'::pg_catalog.oid);
-- For binary upgrade, must preserve pg_type array oid
SELECT pg_catalog.binary_upgrade_set_next_array_pg_type_oid('14535617'::pg_catalog.oid);
-- For binary upgrade, must preserve pg_class oids and relfilenodes
SELECT pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('14535616'::pg_catalog.oid);
SELECT pg_catalog.binary_upgrade_set_next_heap_relfilenode('14535616'::pg_catalog.oid);
The text was updated successfully, but these errors were encountered: