Re: When are largobject records TOASTed into pg_toast_2613?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: When are largobject records TOASTed into pg_toast_2613?
Дата
Msg-id 9088d188acebf8fdbd706898fbe27f7ca52507d0.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: When are largobject records TOASTed into pg_toast_2613?  (Thomas Boussekey <thomas.boussekey@gmail.com>)
Ответы Re: When are largobject records TOASTed into pg_toast_2613?  (Thomas Boussekey <thomas.boussekey@gmail.com>)
Список pgsql-general
On Sat, 2020-08-29 at 21:18 +0200, Thomas Boussekey wrote:
> You can find at the end of this email, a new version of the script that I use to remove the TOAST table on
pg_largobjectcatalog table.
 
> I fixed some typos and wrong synthaxes that I had typed too quickly in my first version.
> 
> Thanks to this script, I can migrate successfully the PostgreSQL instance.
> Yet, the `pg_largobject` table is still considered TOASTed.
> 
> I have the following behaviour:
> 
> [...]
> 
> --- But the pg_largeobject table is not accessible:
> SELECT * from pg_largeobject order by loid desc limit 5;
> ERROR:  could not open relation with OID 16619
> 
> --- Same error when using largeobject functions:
> SELECT lo_get(47232219);
> ERROR:  could not open relation with OID 16619
> 
> --- No TOAST reference into pg_depend for pg_largobject
> SELECT * from pg_depend where 2613 in (objsubid, refobjid);
>  classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype 
> ---------+-------+----------+------------+----------+-------------+---------
>        0 |     0 |        0 |       1259 |     2613 |           0 | p
> 
> --- As for OID 16619
> SELECT * from pg_depend where 16619 in (objsubid, refobjid);
>  classid | objid | objsubid | refclassid | refobjid | refobjsubid | deptype 
> ---------+-------+----------+------------+----------+-------------+---------
> ```
> 
> > Is there another catalog table where the TOAST reference can be located?

Yes, in the table itself.  It seems like some values in pg_largeobject
were stored in the TOAST table after all.

I told you it was dangerous...

I guess you'll have to migrate with dump/restore.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




В списке pgsql-general по дате отправления:

Предыдущее
От: James Sewell
Дата:
Сообщение: Re: determine what column(s) form the primary key, in C extention
Следующее
От: Thorsten Schöning
Дата:
Сообщение: How bad is using queries with thousands of values for operators IN or ANY?