pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jean-Francois Gauthier <jfgauthier@apsolab.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Backend receive buffer get corrupted with string: NOTICE: table "cleanup_keys" does not exist, skipping
Date: Wed, 23 Nov 2016 10:11:34 -0500
Message-ID: <27009.1479913894@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPkuZoWUxH1yRrZpSV32u+sQA_BeB8ZR8ULpmdwRhctkjaK3bQ@mail.gmail.com>
References: <CAPkuZoWUxH1yRrZpSV32u+sQA_BeB8ZR8ULpmdwRhctkjaK3bQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <27009.1479913894@sss.pgh.pa.us>
Permalink:  ../27009.1479913894@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27009.1479913894@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jfgauthier@apsolab.com
  Subject: Re: Backend receive buffer get corrupted with string: NOTICE: table "cleanup_keys" does not exist, skipping
  In-Reply-To: <27009.1479913894@sss.pgh.pa.us>
  References: <CAPkuZoWUxH1yRrZpSV32u+sQA_BeB8ZR8ULpmdwRhctkjaK3bQ@mail.gmail.com> <27009.1479913894@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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