Re: Backend receive buffer get corrupted with string: NOTICE: table "cleanup_keys" does not exist, skipping - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Backend receive buffer get corrupted with string: NOTICE: table "cleanup_keys" does not exist, skipping
Date
Msg-id 27009.1479913894@sss.pgh.pa.us
Whole thread Raw
In response to Backend receive buffer get corrupted with string: NOTICE: table "cleanup_keys" does not exist, skipping  (Jean-Francois Gauthier <jfgauthier@apsolab.com>)
List pgsql-bugs
Jean-Francois Gauthier <jfgauthier@apsolab.com> writes:
> I have an application (multi thread) that send a lot of query on multiple
> connections to postgres executable backend using libpq client library. One
> connection per thread.
> Since the problem is very hard to reproduce, I cannot give you a sample sql
> file to reproduce it because it will require multiple sql files to run in
> parallel.

> The symptom is: I get the following error message: *invalid frontend
> message type 78*
> *Please, don't stop reading here and tell me I have a memory corruption in
> my application. It is not the case. I did my home work !*

Unfortunately, that's exactly the conclusion anyone would draw here.

libpq does not contain any threading support per se: if you use it in
a multithreaded application, it's on you to ensure that each PGconn
object is accessed by only one thread at a time.  These symptoms are
completely consistent with the idea that you messed that up somewhere.

It's a bit of a leap of logic to guess that the problem is triggered by
notice-message handling, but if you are installing a custom message
processor, that's where I'd look first, for sure.

            regards, tom lane

pgsql-bugs by date:

Previous
From: sarkhan.allahverdiyev@outlook.com
Date:
Subject: BUG #14429: Replication configuring troubleshooting
Next
From: Tom Lane
Date:
Subject: Re: Index file got removed