pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Idle Error invalid byte sequence
6+ messages / 2 participants
[nested] [flat]

* Idle Error invalid byte sequence
@ 2008-09-18 15:29 Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 18:17 ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Randall Wilson @ 2008-09-18 15:29 UTC (permalink / raw)
  To: pgsql-admin

Hi all,
We've got a PostgreSQL 8.1.11 database that started displaying these
error messages almost immediately AFTER it was restored. It restored
fully and successfully. They occur every few seconds to every few
minutes. Here are the error messages.

[2008-09-18 10:18:14 CDT] idleERROR:  invalid byte sequence for encoding
"UTF8": 0x8b
[2008-09-18 10:18:14 CDT] idleHINT:  This error can also happen if the
byte sequence does not match the encoding expected by the server, which
is controlled by "client_encoding".

Is there any way to figure out where the 0x8b character is?

Attachments:

rwilson.vcf (text/x-vcard, 322B) download begin:vcard fn:Randall Wilson n:Wilson;Randall org:Earthcomber, LLC;Development adr:Suite 114;;7777 Lake St.;River Forest;IL;60305;USA email;internet:rwilson@earthcomber.com title:Senior Software Engineer tel;work:708-366-1611 tel;cell:773-620-3042 x-mozilla-html:FALSE url:http://www.earthcomber.com version:2.1 end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Idle Error invalid byte sequence
  2008-09-18 15:29 Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
@ 2008-09-18 18:17 ` Tom Lane <tgl@sss.pgh.pa.us>
  2008-09-18 20:10   ` Re: Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2008-09-18 18:17 UTC (permalink / raw)
  To: Randall Wilson <rwilson@earthcomber.com>; +Cc: pgsql-admin

Randall Wilson <rwilson@earthcomber.com> writes:
> We've got a PostgreSQL 8.1.11 database that started displaying these
> error messages almost immediately AFTER it was restored.
> ...
> Is there any way to figure out where the 0x8b character is?

Hmm, did you perhaps change the database encoding from its previous
value?  The most likely bet is that the bad encoding is arriving from a
client, which is evidently expecting to send something other than UTF8
but not bothering to set client_encoding to tell what.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Idle Error invalid byte sequence
  2008-09-18 15:29 Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 18:17 ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-09-18 20:10   ` Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 20:57     ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Randall Wilson @ 2008-09-18 20:10 UTC (permalink / raw)
  To: pgsql-admin

Yes, the encoding was changed from SQL_ASCII to UTF-8. Does the fact
that it's an "Idle" error conform your theory that some client is
causing the error? I thought the "Idle" error was caused by errors found
during background processes, like vacuums.

I made a plain text backup of the live database and I'm not having any
luck grepping for the character. I may be doing it wrong. If I can't
find it in the database dump, what does that tell us? Is it possibly in
a template database.

Thanks for your help,
Randy

Tom Lane wrote:
> Randall Wilson <rwilson@earthcomber.com> writes:
>   
>> We've got a PostgreSQL 8.1.11 database that started displaying these
>> error messages almost immediately AFTER it was restored.
>> ...
>> Is there any way to figure out where the 0x8b character is?
>>     
>
> Hmm, did you perhaps change the database encoding from its previous
> value?  The most likely bet is that the bad encoding is arriving from a
> client, which is evidently expecting to send something other than UTF8
> but not bothering to set client_encoding to tell what.
>
> 			regards, tom lane
>
>   

Attachments:

rwilson.vcf (text/x-vcard, 322B) download begin:vcard fn:Randall Wilson n:Wilson;Randall org:Earthcomber, LLC;Development adr:Suite 114;;7777 Lake St.;River Forest;IL;60305;USA email;internet:rwilson@earthcomber.com title:Senior Software Engineer tel;work:708-366-1611 tel;cell:773-620-3042 x-mozilla-html:FALSE url:http://www.earthcomber.com version:2.1 end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Idle Error invalid byte sequence
  2008-09-18 15:29 Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 18:17 ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  2008-09-18 20:10   ` Re: Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
@ 2008-09-18 20:57     ` Tom Lane <tgl@sss.pgh.pa.us>
  2008-09-18 21:49       ` Re: Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2008-09-18 20:57 UTC (permalink / raw)
  To: Randall Wilson <rwilson@earthcomber.com>; +Cc: pgsql-admin

Randall Wilson <rwilson@earthcomber.com> writes:
> Yes, the encoding was changed from SQL_ASCII to UTF-8. Does the fact
> that it's an "Idle" error conform your theory that some client is
> causing the error? I thought the "Idle" error was caused by errors found
> during background processes, like vacuums.

You'd have to tell us what your log_line_prefix is before we could
interpret that, but yeah, an encoding error in an incoming query string
would be reported before the backend could even consider going non-idle.

A SQL_ASCII database would have accepted any data whatsoever.  If you
want to change to something where you actually know the encoding, that's
fine, but realize that you're going to have to make your clients be
honest about what encoding they're using, too.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Idle Error invalid byte sequence
  2008-09-18 15:29 Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 18:17 ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  2008-09-18 20:10   ` Re: Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 20:57     ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-09-18 21:49       ` Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 22:39         ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Randall Wilson @ 2008-09-18 21:49 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

log_line_prefix = '[%t] %i'
So, "idle" is just the "command tag", which probably means it's not
associated with a command.

Unless you think grepping my plain text backup is a waste of time,
you've answered all my questions (Thanks) and I don't need a reply.
Thanks again,
Randy Wilson

Tom Lane wrote:
> Randall Wilson <rwilson@earthcomber.com> writes:
>   
>> Yes, the encoding was changed from SQL_ASCII to UTF-8. Does the fact
>> that it's an "Idle" error conform your theory that some client is
>> causing the error? I thought the "Idle" error was caused by errors found
>> during background processes, like vacuums.
>>     
>
> You'd have to tell us what your log_line_prefix is before we could
> interpret that, but yeah, an encoding error in an incoming query string
> would be reported before the backend could even consider going non-idle.
>
> A SQL_ASCII database would have accepted any data whatsoever.  If you
> want to change to something where you actually know the encoding, that's
> fine, but realize that you're going to have to make your clients be
> honest about what encoding they're using, too.
>
> 			regards, tom lane
>
>   

Attachments:

rwilson.vcf (text/x-vcard, 322B) download begin:vcard fn:Randall Wilson n:Wilson;Randall org:Earthcomber, LLC;Development adr:Suite 114;;7777 Lake St.;River Forest;IL;60305;USA email;internet:rwilson@earthcomber.com title:Senior Software Engineer tel;work:708-366-1611 tel;cell:773-620-3042 x-mozilla-html:FALSE url:http://www.earthcomber.com version:2.1 end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Idle Error invalid byte sequence
  2008-09-18 15:29 Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 18:17 ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  2008-09-18 20:10   ` Re: Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
  2008-09-18 20:57     ` Re: Idle Error invalid byte sequence Tom Lane <tgl@sss.pgh.pa.us>
  2008-09-18 21:49       ` Re: Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
@ 2008-09-18 22:39         ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2008-09-18 22:39 UTC (permalink / raw)
  To: Randall Wilson <rwilson@earthcomber.com>; +Cc: pgsql-admin

Randall Wilson <rwilson@earthcomber.com> writes:
> log_line_prefix = '[%t] %i'
> So, "idle" is just the "command tag", which probably means it's not
> associated with a command.

No, you missed my point: if an incoming command contains invalidly
encoded characters, the error about that will be thrown *before* the
command tag can be changed from "idle".  I think you are looking in the
wrong place entirely --- the bad data is not in the database, it's
coming from a client.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2008-09-18 22:39 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-09-18 15:29 Idle Error invalid byte sequence Randall Wilson <rwilson@earthcomber.com>
2008-09-18 18:17 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-09-18 20:10   ` Randall Wilson <rwilson@earthcomber.com>
2008-09-18 20:57     ` Tom Lane <tgl@sss.pgh.pa.us>
2008-09-18 21:49       ` Randall Wilson <rwilson@earthcomber.com>
2008-09-18 22:39         ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox