Index corruption?

i just upgraded from 3.1.5 up t 3.3.0 and noticed a message that says:

Your database collation is susceptible to index corruption.
(This warning does not indicate that index corruption has occured and can be ignored)
(To learn more, visit: Database index corruption - Mastodon documentation)

So visiting that page im suggested to run:
SELECT datcollate FROM pg_database WHERE datname = current_database(); and find out my collate which is:

es_MX.UTF-8

now, it tells me to run a sql query with the AMCHECK postgresql’s extension

however i get the error:
ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/amcheck.control": No such file or directory

looking it up i found that extension is from postgresql 10, im running ubuntu 16.04, this instance is almost 4 years old…

So… am i at risk of data corruption? what should i do? upgrade postgresql? upgrade everything?

Thanks for your attention and help.

Best regards!

Depending on how you installed your PostgreSQL you may have to use amcheck_next.

You may try to see if that is the case by running:
CREATE EXTENSION IF NOT EXISTS amcheck_next;

About the question: are you at risk of data corruption. Like it mentions on Database index corruption - Mastodon documentation - ā€œif you ever ran with a version of glibc prior to 2.28 and did not immediately reindex your databases after updating to glibc 2.28 or newer.ā€ If you didn’t run that glibc prior to 2.28, or were running C or POSIX for collation, then you should not be affected by the particular bug identified.

1 Like