When I enabled the Druapl cache, I saw the same issues as reported at http://drupal.org/node/13224

Disabling PHP compression solved that for me, but I have found a new issue that may be related. I'm not sure, so I'm opening a new bug.

If the cache is enabled, I get the following in the Drupal logs
pg_query() [function.pg-query]: Query failed: ERROR: invalid byte sequence for encoding "UNICODE": 0xcd59 in /var/www/localhost/htdocs/drupal/includes/database.pgsql.inc on line 45.

The pg database, Apache and PHP are set todo UNICODE/UTF-8 by default - and so are the servers LC_* settings

Interestingly, the pg database used to be SQL_ASCII - and changing the database to UNICODE had the same effect of fixing the cache garbeled problem ( http://drupal.org/node/13224 ), even if PHP compressesion was on as well.

Comments

mr700’s picture

I also can confirm this behavior with 2.6.2. Drupal tires to store binary data in the cache table and that's why postgresql complains about invalid UNICODE sequence. Maybe the db column type should be changed from data text default '', to data bytea default '', (for postgresql)? With SQL_ASCII postgresql preforms no check for the strings so it works...

Arto’s picture

Version: 4.6.0 » 4.6.2

I ran into this problem as well, and can confirm that the caching feature is unusable with Drupal 4.6.2 on PostgreSQL 7.4.8.

As for mr700's suggestion for a bytea column, a similar issue seems to have been discussed in http://drupal.org/node/10407

Cvbge’s picture

Status: Active » Closed (won't fix)

This can't be fixed without severe changes to important part of Drupal, thus it won't be fixed in 4.6 line. It is fixed in cvs (http://drupal.org/node/10407) which will become next stable release (4.7)