Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-13 Thread Robert Haas
On Sun, Apr 10, 2011 at 5:23 AM, Noah Misch n...@leadboat.com wrote: On Sun, Apr 10, 2011 at 07:35:53AM -0400, Robert Haas wrote: On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: 3. Make AlterTableCreateToastTable acquire only ShareUpdateExclusiveLock and remove the

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Noah Misch
On Sun, Apr 03, 2011 at 09:53:57PM -0400, Robert Haas wrote: On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: The best way I can see is to

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: I had exactly what you just said in mind. Patch attached, then. Committed. Thanks.  This turns out to have caused that TOAST creation regression: Crap. I am not going to be able to look at this today; I am getting on

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Noah Misch
On Sun, Apr 10, 2011 at 07:35:53AM -0400, Robert Haas wrote: On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: 3. Make AlterTableCreateToastTable acquire only ShareUpdateExclusiveLock and remove the pass-usage heuristic from ATRewriteCatalogs.  For this to be valid,

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: On Sun, Apr 03, 2011 at 09:53:57PM -0400, Robert Haas wrote: On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM,

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Noah Misch
On Sun, Apr 10, 2011 at 11:19:26AM -0400, Robert Haas wrote: On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: On Sun, Apr 03, 2011 at 09:53:57PM -0400, Robert Haas wrote: On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-03 Thread Robert Haas
On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: I think this is a manifestation the same problem mentioned here:

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Noah Misch
[moving to pgsql-hackers] On Thu, Feb 03, 2011 at 11:24:42AM -0500, Robert Haas wrote: On Mon, Jan 31, 2011 at 6:42 AM, Naoya Anzai anzai-na...@mxu.nes.nec.co.jp wrote: In PostgreSQL8.4.5, I found that the catalog pg_attribute.attinhcount is not correct. I executed the following

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Bernd Helmle
--On 31. März 2011 06:06:49 -0400 Noah Misch n...@leadboat.com wrote: The best way I can see is to make ATExecAddColumn more like ATExecDropColumn, ATAddCheckConstraint, and ATExecDropConstraint. Namely, recurse at Exec-time rather than Prep-time, and cease recursing when we satisfy the ADD

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Robert Haas
On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: I think this is a manifestation the same problem mentioned here: http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=31b6fc06d83c6de3644c8f2921eb7de0eb92fac3 I believe this requires some refactoring to fix.  It

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-03-31 Thread Noah Misch
On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: I think this is a manifestation the same problem mentioned here: