Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frZIw-0003WO-Mk for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Aug 2018 01:48:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frZIv-0008J6-0H for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Aug 2018 01:48:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frZIu-0008Iz-QV for pgsql-bugs@lists.postgresql.org; Mon, 20 Aug 2018 01:48:24 +0000 Received: from smtp74.ord1c.emailsrvr.com ([108.166.43.74]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frZIq-00047m-LJ for pgsql-bugs@lists.postgresql.org; Mon, 20 Aug 2018 01:48:24 +0000 Received: from smtp2.relay.ord1c.emailsrvr.com (localhost [127.0.0.1]) by smtp2.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 3134CC00FF; Sun, 19 Aug 2018 21:48:18 -0400 (EDT) X-Auth-ID: jeff.frost@pgexperts.com Received: by smtp2.relay.ord1c.emailsrvr.com (Authenticated sender: jeff.frost-AT-pgexperts.com) with ESMTPSA id A4779C01B4; Sun, 19 Aug 2018 21:48:17 -0400 (EDT) X-Sender-Id: jeff.frost@pgexperts.com Received: from [10.0.1.12] (ip70-191-86-13.sb.sd.cox.net [70.191.86.13]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:587 (trex/5.7.12); Sun, 19 Aug 2018 21:48:18 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: BUG #15299: relation does not exist errors From: Jeff Frost In-Reply-To: <039A9034-96E6-4FF3-AB82-9E24C2F89B32@pgexperts.com> Date: Sun, 19 Aug 2018 18:48:14 -0700 Cc: Tom Lane , pgsql-bugs@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <67DE56DF-0DA6-48B6-9FC1-608AE5462D58@pgexperts.com> References: <153262312335.1404.10540240090445927053@wrigleys.postgresql.org> <17754.1532623813@sss.pgh.pa.us> <32321.1532632475@sss.pgh.pa.us> <38FCBCD9-0145-4CCD-8A9A-496E532F0AAE@pgexperts.com> <20180726202323.opsdqnkg2vfo4wxs@alap3.anarazel.de> <039A9034-96E6-4FF3-AB82-9E24C2F89B32@pgexperts.com> To: Andres Freund X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jul 26, 2018, at 1:53 PM, Jeff Frost wrote: >=20 > On Jul 26, 2018, at 1:23 PM, Andres Freund wrote: >>=20 >> On 2018-07-26 13:18:33 -0700, Jeff Frost wrote: >>> Oh, I see what you're saying. Don't the autovacuum processes connect = to their own backends which then exit after they're complete though? >>=20 >> Yes, that's right. Creating an extension or calling a function that >> internally does a SET search_path seem like a more likely cause. >=20 > I grepped our code and didn't find anywhere that we set search_path, = though it's possible some ruby gem we use could be doing it. I'll go = spelunking there next! Wanted to close the loop on this. As usual, Tom was right. We have a rake task in the application used to pull a production copy of = structure.sql which uses pg_dump under the covers. Because it uses the = same conninfo as the app, it happily goes through pgbouncer. So, when = that rake task is run, pg_dump connects through pgbouncer and happily = sets that restrictive search_path. It then creates the schema-only dump = and upon completion, that connection is returned to the pool as a big = fat boobytrap for the next application connection.=