Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXC3h-0002Hg-VC for pgsql-novice@arkaria.postgresql.org; Fri, 16 Apr 2021 00:10:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXC3g-00061P-41 for pgsql-novice@arkaria.postgresql.org; Fri, 16 Apr 2021 00:10:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXC3f-00061G-UW for pgsql-novice@lists.postgresql.org; Fri, 16 Apr 2021 00:10:03 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXC3d-0006q0-RH for pgsql-novice@lists.postgresql.org; Fri, 16 Apr 2021 00:10:02 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 15AC51DD9 for ; Thu, 15 Apr 2021 20:10:00 -0400 (EDT) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Thu, 15 Apr 2021 20:10:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=fP8Yn6cyYscX5ZMIlCZdiCUF20b3s tbk/d/W6OUr/60=; b=JaBNgyvAQABHPO9+KoKeuLGUaKD6q75ze+aHr3DCh7qum Ik6VAZuVyDyv3lmfa9Zgv0Qqly+c1qrFzmKU+d+Q7iTatIpnXUHAdNH4TV80czxS HUCK5AAS/nkJ28VDXsdjg1IsKkogQwei7hAlsFajWtXDOySfLdF9qnKXYYcXEE9w E5XDOy3vt9y2SQVPzJlENg7Q5s2I5g2aP/uONswELmIQnXCQ0dRcG6bYupokEYpq fiLsT47cyxSO14v2mKPUvgCsNB9RtsPnhWwzW8bergnBHBUKUPDZsFjXsvJgYWZz U78gGaJxBSvWGwSw/weYshIpENeHNTtJS+dIG+/Aw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudelgedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdludehmdenucfjughrpefofg ggkfffhffvufgtsehttdertderredtnecuhfhrohhmpedfffgrnhhivghlucfjvggrthhh fdcuoegurghnihgvlheshhgvrghthhdrtggtqeenucggtffrrghtthgvrhhnpefhieduud evffegtefgvdetieffheduudehuedtiedugfejhfdvhfevudduudevfeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurghnihgvlheshhgvrg hthhdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 36CB0CA005F; Thu, 15 Apr 2021 20:09:59 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 Mime-Version: 1.0 Message-Id: Date: Fri, 16 Apr 2021 10:09:38 +1000 From: "Daniel Heath" To: pgsql-novice@lists.postgresql.org Subject: Prepared statement invalidation Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi All, I'm running a site that has a reasonable amount of traffic 24/7 , writes and reads. I've found that when I add a new column, I sometimes get a spike of errors on the application side due to prepared statement query plans getting invalidated, causing transactions to rollback. The error is: ERROR: cached plan must not change result type Is there a way to make postgres recalculate the query plan instead of failing the transaction when a new column is added? Thanks, Daniel Heath