Re: [HACKERS] vacuum and row type

2011-06-02 Thread Tom Lane
I wrote: > What I was thinking last night is that it'd be smart to move all this > logic into the typcache, instead of repeating all the work each time we > make the check. Attached is a proposed patch that does it that way. I haven't finished poking around to see if there are any other places be

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Tom Lane
Teodor Sigaev writes: >> I think we could just let this code assume success for type RECORD. It >> won't affect VACUUM/ANALYZE, since there are (for reasons that should >> now be obvious) no table or index columns of anonymous composite types. > Of course, it's impossible to store anonymous comp

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Teodor Sigaev
I think we could just let this code assume success for type RECORD. It won't affect VACUUM/ANALYZE, since there are (for reasons that should now be obvious) no table or index columns of anonymous composite types. Of course, it's impossible to store anonymous composite type anywhere, but we still

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Tom Lane
Teodor Sigaev writes: >> isn't really specific to ANALYZE. I'm inclined to think that the most >> reasonable fix is to make get_sort_group_operators() and related > Hm, patch is in attach but it doesn't solve all problems. Initial bug is > still > here for array of row type, but when I tried t

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Teodor Sigaev
isn't really specific to ANALYZE. I'm inclined to think that the most reasonable fix is to make get_sort_group_operators() and related Hm, patch is in attach but it doesn't solve all problems. Initial bug is still here for array of row type, but when I tried to change that with recursive call

Re: [HACKERS] vacuum and row type

2011-06-01 Thread Tom Lane
Teodor Sigaev writes: > I found problem while vacuuming with composite type (version 9.0.4). It's not > so > easy to reproduce, but it's clear what happens. > CREATE TYPE mytype AS (p point, r float8); > CREATE TABLE mytable (mt mytype); > -- create opclass fir GiST > CREATE INDEX myidx ON myta

[HACKERS] vacuum and row type

2011-06-01 Thread Teodor Sigaev
Hi! I found problem while vacuuming with composite type (version 9.0.4). It's not so easy to reproduce, but it's clear what happens. CREATE TYPE mytype AS (p point, r float8); CREATE TABLE mytable (mt mytype); -- create opclass fir GiST CREATE INDEX myidx ON mytable USING gist (mt); And vacuu