cancel
Showing results for 
Search instead for 
Did you mean: 

pg_upgrade failed with error" Pg_class heap OID value not set when in binary upgrade mode "

Level 2 Adventurer

pg_upgrade failed with error" Pg_class heap OID value not set when in binary upgrade mode "

Hi All

 

During the pg_upgrade from PPAS 9.3 to PPAS 10.0, the error ”could not execute query: ERROR:  pg_class heap OID value not set when in binary upgrade mode happened”, The upgrade failed. The error detail is as below:
 
<pg_upgrade log>

pg_restore: creating TABLE "test"
pg_restore: [archiver (db)] Error while PROCESSING TOC:

pg_restore: [archiver (db)] Error from TOC entry 390022; 6619 888032 TABLE test

pg_restore: [archiver (db)] could not execute query: ERROR:  pg_class heap OID value not set when in binary upgrade mode

 Command was :

-- For binary upgrade, must preserve pg_type oid

SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('888034':Smiley Tongueg_catalog.oid);

 

-- For binary upgrade, must preserve pg_type array oid

SELECT pg_catalog.binary_upgrade_set_next_array_pg_type_oid('888033':Smiley Tongueg_catalog.oid);

 

-- For binary upgrade, must preserve pg_class oids

SELECT pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('888032':Smiley Tongueg_catalog.oid);

 

CREATE TABLE "test" (---omit--);

-- For binary upgrade, set heap's relfrozenxid and relminmxid

UPDATE pg_catalog.pg_class

SET relfrozenxid = '6693788', relminmxid = '1'

WHERE oid = '" test "':Smiley Tongueg_catalog.regclass;

 

pg_upgrade is in copy mode.

Is this a bug?

2 REPLIES
Moderator

Re: pg_upgrade failed with error" Pg_class heap OID value not set when in binary upgrade mode &

Hi  Roger ,
 
Hope you are doing good !
 
Could you please share below information for further analysis,
 
1> Complete upgrade logs,
 You can upload the logs on the "http://uploads.enterprisedb.com/" and share the download link with us.
 
2> Also could you please share the complete structure of the table "test".

 

3> Exact command used for upgrade.

 

4> OS version

 

Highlighted
Moderator

Re: pg_upgrade failed with error" Pg_class heap OID value not set when in binary upgrade mode &

Hi Roger,

 

Are you still experiencing issues with this?  I recently came across a similar scenario as yours (9.3 -> 10 upgrade) -- do you happen to be using partitioned and/or subpartitioned tables?