BUG #17024: ERROR: column c.relhasoids does not exist at character 245

Started by PG Bug reporting formalmost 5 years ago4 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17024
Logged by: Daniel Prince
Email address: infotodaniel@gmail.com
PostgreSQL version: 12.5
Operating system: CENT OS - 7
Description:

Hi Folks,

I have setup DB Link from Postgres 12.5 Version (EC2 instances) to Oracle
DB.
isql is working fine,

oracle(DEVDB)- LOOBI)> /ora/dev/postgres/unixodbc/2.3.9/bin/isql -v
hopsd_link
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> SELECT count(1) from pg_tables;
+---------------------+
| count               |
+---------------------+
| 130                 |
+---------------------+
SQLRowCount returns 1
1 rows fetched

But when I connect from Oracle DB and trying to query PostgrSQL tables
am getting below error :

SQL> SELECT DISTINCT "table_catalog", "table_schema" FROM
"information_schema"."tables"@hopsd_link.MYGROUP.COM;
SELECT DISTINCT "table_catalog", "table_schema" FROM
"information_schema"."tables"@hopsd_link.MYGROUP.COM

*
ERROR at line 1:
ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost)(PORT=1530))(CONNECT_DATA=(SID=hopsd_link)))
ORA-02063: preceding line from HOPSD_LINK
Process ID: 12230
Session ID: 44 Serial number: 42705

FROM PostgrSQL DB logs am getting below error :

2021-05-18 08:04:33 EDT:192.16.8.11(43364):hgappotu@hopsd:[5312]:ERROR:
column c.relhasoids does not exist at character 245
2021-05-18 08:04:33 EDT:192.16.8.11(43364):hgappotu@hopsd:[5312]:STATEMENT:
select n.nspname, c.relname, a.attname, a.atttypid,
t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules,
c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid),
case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod,
c.relhasoids from (((pg_catalog.pg_class c inner
join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.relname like
'thgotu_order_entry' and n.nspname like 'hgappotu')
inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum >
0 and a.attrelid = c.oid) inner join pg_catalog.pg_type
t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and
d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname,
c.relname, attnum

Any idea how to resolve this issue ?
Thanks in Advance.

#2Daniel Gustafsson
daniel@yesql.se
In reply to: PG Bug reporting form (#1)
Re: BUG #17024: ERROR: column c.relhasoids does not exist at character 245

On 19 May 2021, at 12:48, PG Bug reporting form <noreply@postgresql.org> wrote:

Any idea how to resolve this issue ?

Sounds like a version mismatch between whatever is generating the above query
and your server, PostgreSQL 12 (and later) doesn't have pg_class.relhasoids.

Is there an updated version of the software setting up the link?

--
Daniel Gustafsson https://vmware.com/

#3Daniel Gustafsson
daniel@yesql.se
In reply to: PG Bug reporting form (#1)
Re: BUG #17024: ERROR: column c.relhasoids does not exist at character 245

On 19 May 2021, at 13:23, Danny <infotodaniel@gmail.com> wrote:

It seems here on this server , am not seeing any version mismatch

[postgres@ip-10-184-11-220 ~]$ psql -h localhost
Password for user postgres:
psql (12.5)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=#

Then still why am getting Error ?

No idea, but that server too doesn't have pg_class.relhasoids so the query in
your report wouldn't work there either. Are you able to set up a link to that
server with the same version of the link software and it works there?

--
Daniel Gustafsson https://vmware.com/

#4Daniel Gustafsson
daniel@yesql.se
In reply to: PG Bug reporting form (#1)
Re: BUG #17024: ERROR: column c.relhasoids does not exist at character 245

On 19 May 2021, at 13:48, Danny <infotodaniel@gmail.com> wrote:

First time I am setting up the DB link for 12+ version, for Version 10.10 version it is working fine.

10.10 has the pg_class.relhasoids column so that makes sense, you need a
version of the software creating the link which has support for PostgreSQL 12.

--
Daniel Gustafsson https://vmware.com/