Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCDTw-0001By-9J for pgsql-bugs@postgresql.org; Thu, 13 Sep 2012 17:45:40 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCDTt-0001Mn-Ry for pgsql-bugs@postgresql.org; Thu, 13 Sep 2012 17:45:39 +0000 Received: by pbbrr13 with SMTP id rr13so4316353pbb.19 for ; Thu, 13 Sep 2012 10:45:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:mime-version:x-gm-message-state; bh=WY20Na+eydyRDsdHYPFJ/QXH8+OWBCke/mTsSyn+6sg=; b=kbxmTIYfyd/fAzjeTsuvl83Zj94xzEO3dLY4jRE7YcF8xAxDxuVTE313tGkGaJByUk 4SNEDxaSBvo8FYtt6XMgkTCpHQg+l2M3qJjOPBip25fFFBc3CVzVwzQKLU4wDL1U8Qah 6liVK5yzgCwvlJHsLnx8obduozSXWWv5sSDb3M6vwWc3IFJ9oG53Sg8t2v6linoLdzIY wnTgfujYZl+Lv0UJg76cUdY+M3HR0cNtdeA2ifDc/Dkm0Q5n4arjh7XMPBJMXzcH3ftM puHSwd7SdoWg6gkHO6f5kmDN2ofVDIiFVtD7h0SeEns/euwIs3uqbnshoFjzU6jkqTs3 qwKA== Received: by 10.68.129.38 with SMTP id nt6mr539791pbb.76.1347558336026; Thu, 13 Sep 2012 10:45:36 -0700 (PDT) Received: from [192.168.1.101] (c-69-181-249-16.hsd1.ca.comcast.net. [69.181.249.16]) by mx.google.com with ESMTPS id pj10sm13410036pbb.46.2012.09.13.10.45.34 (version=SSLv3 cipher=OTHER); Thu, 13 Sep 2012 10:45:34 -0700 (PDT) Message-ID: <1347558334.24686.27.camel@jdavis> Subject: Re: Re: Probable bug with CreateFakeRelcacheEntry (now with reproducible test case) From: Jeff Davis To: Robert Haas Cc: pgsql-bugs@postgresql.org Date: Thu, 13 Sep 2012 10:45:34 -0700 In-Reply-To: References: <1347327239.4161.20.camel@sussancws0025> <1347491969.4161.63.camel@sussancws0025> Content-Type: multipart/mixed; boundary="=-kBkGhiEg4E/wwq/qYRF4" X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Gm-Message-State: ALoCoQl91SKk4N1jPnutpuQN/kDJbwqZkROPVZAHsfTOkE7JX2ns/tgyFStx9aasFF/N+vDmioCo X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201209/122 X-Sequence-Number: 34117 --=-kBkGhiEg4E/wwq/qYRF4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Thu, 2012-09-13 at 12:39 -0400, Robert Haas wrote: > On Wed, Sep 12, 2012 at 7:19 PM, Jeff Davis wrote: > > This bug seems particularly troublesome because the right fix would be > > to include the relpersistence in the WAL records that need it. But that > > can't be backported (right?). > > No, because if a WAL record was written at all, then by definition the > table is RELPERSISTENCE_PERMANENT. So there's probably a localized > fix. Oh, of course (I was worried there for some reason). I suppose we just need to set the relpersistence to permanent in CreateFakeRelcacheEntry, kind of like ReadBufferWithoutRelcache. And we should probably assert that both functions are only called during recovery (though perhaps redundant for CreateFakeRelcacheEntry, which is in xlogutils.c). Trivial patch attached. Regards, Jeff Davis --=-kBkGhiEg4E/wwq/qYRF4 Content-Type: application/x-gzip; name="fakerelcache.patch.gz" Content-Disposition: attachment; filename="fakerelcache.patch.gz" Content-Transfer-Encoding: base64 H4sIAFQaUlAAA51TUW/aMBB+hl9xqrQ1SQOBwtYi1EmUwoS0ogkq9RE5yQUiEhvZThmT9t93dhLa rlSblofYPvvuvvu+O8/zgAVKRkHIoi3yOGBRhEoFWjKuWB78yMS60Gmm2lGz1WpB+K+PvdefOUNv 0Pd7gwEYA4wlMo1TtsUFZhGLNjjhWh4cOk3TDOciRpCc/q5NbHz7nS7QvtUEaFSO46MjJGRBsxua e7pjOhW8ITEzhuYFNEZKodTOjC8wEk8oD+6QzOZ14MEoy0REiEBvEGpvUFoWkQbGY2BZBtLYMQa1 YxFCykFwhJAct23wAhPpiAJuYMdMzI6j0p8oEucN5DummetauBSYHJw6r/uymlNU9js9ouP6v6js dz75/W7vSCUV/4iwT6k+jkQLhHQScpvyNVn1BjTmO1O6griQxior/qqa6ar1Rcarqi2okBl/Ylka 35aGWVwrQKlmGvJCaZOEwQ5lzjjVCZqFGTGawB7PpaW2TmKZvXjOUq6Yka9KlUZOStzAYvLt+2Sx nC0fJvPxZEX7+9F8Mn94oTAVGQt+rmHLxd7KzFmOIBK7lxX1QyiUPSVEnSGNsFAWFlfFqh1RoJOj VF9R19s5hXPI0/Xh7ENx5pekt8liJLBCW/FeT5zSQrI1BmGRJCjNkq/lyXF77+WpBrm86vqXV5/L BlkQ/Fvr9Eh6ikLXffK2RXyYkvTzIg+pEZJy61ssZcTrum0MF8v7tXweFQJDQphF7JA7Vbg/W8H9 +zRK1IXkL1CvIpHngjsmtv+u1P4RbzmSFjmFKz/ILRwaaJqV9cGHj5tUWzC/mr8Bi1mbHgcFAAA= --=-kBkGhiEg4E/wwq/qYRF4--