Closed seqizz closed 5 years ago
Thanks a lot!
I'd need some more information to understand what's happening here. What is the original database encoding, what is pg_qualstats version and do you know which datasource on the qual page is failing?
Sorry for late reply:
/etc/postgresql/11/main/postgresql.conf:lc_messages = 'en_DK.UTF-8' # locale for system error message
/etc/postgresql/11/main/postgresql.conf:lc_monetary = 'en_DK.UTF-8' # locale for monetary formatting
/etc/postgresql/11/main/postgresql.conf:lc_numeric = 'en_US.UTF-8' # locale for number formatting
/etc/postgresql/11/main/postgresql.conf:lc_time = 'en_DK.UTF-8'
I actually missed that pg_qualstats is truncating constats to 80B, which is precisely where your error happens:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 80: invalid continuation byte
Since 0xCC is the first byte of a multi-byte value, you were unlucky enough to hit a bug in pg_qualstats, as we're truncating the constant to 80B without taking care of multi-byte characters. I'll fix that shortly.
In the meantime, I'm afraid that some of the values stored are definitely lost, so you can either delete the corresponding rows, or wait for the retention to purge them.
The issue should be fixed in pg_qualstats with commit https://github.com/powa-team/pg_qualstats/commit/ee7255d72f27131b3b52ca55b0a338fd2bcc71d8.
Thanks a lot for the report!
Cool, thanks for the quick fix. Closing then, will test and re-open if something cries.
Hi,
First of all, thanks for this nice tool,
After clicking the details for a query (page uri is database/my_db_name/query/-118899751760609078/qual/1584481209/), I got following error on the powa-web's log:
The system is debian stretch with following versions: python 3.5.3 tornado 4.4.3-1 psycopg2 2.7.6.1 sqlalchemy 1.0.15 PostgreSQL 11.3