dataegret / pgcompacttable

BSD 3-Clause "New" or "Revised" License
314 stars 48 forks source link

SQL Error: ERROR: operator is not unique: smallint[] @> smallint[] #16

Closed eskornev closed 6 years ago

eskornev commented 6 years ago

Hello, I'm getting this issue while trying to compact my table:

[Tue Feb 27 11:17:51 2018] (mydb:public.call_project_cases) SQL Error: ERROR: operator is not unique: smallint[] @> smallint[] LINE 26: ...SELECT string_to_array(indkey::text, ' ')::int2[] @> array[0... ^ HINT: Could not choose a best candidate operator. You might need to add explicit type casts. [Tue Feb 27 11:17:51 2018] (mydb:public.call_project_cases) Table handling interrupt.

Is there anything I can do to get rid of it?

postgresql-9.6 9.6.7-1.pgdg16.04+1 amd64 Ubuntu 16.04.3 LTS

alexius2 commented 6 years ago

Hello, are you using intarray extension?

eskornev commented 6 years ago

Yes, we do

alexius2 commented 6 years ago

ok, I'll push a fix for this in an hour or two.

eskornev commented 6 years ago

Thanks!

eskornev commented 6 years ago

Could you please also explain what means next entries: WARNING: relation "mobile_phones" page 164340 is uninitialized --- fixing WARNING: relation "mobile_phones" page 164341 is uninitialized --- fixing WARNING: relation "mobile_phones" page 164342 is uninitialized --- fixing

alexius2 commented 6 years ago

please check if latest version has this problem.

Could you please also explain what means next entries: most likely DB crashed during table extension leaving uninitialized pages at the end of table. may be it happened because there was no free space.

eskornev commented 6 years ago

Works great, thanks a lot.

most likely DB crashed during table extension leaving uninitialized pages at the end of table

Can you recommend any tool to periodically use for checking against such pages?

Melkij commented 6 years ago

Hello Uninitialized pages are handled postgresql itself during vacuum or autovacuum. Here is no necessary further checking.