Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread Bruce Momjian
Applied. --- Satoshi Nagayasu wrote: > Thanks Bruce, > > Here are updated Japanese README, and uninstall_pgstattuple.sql. > > Bruce Momjian wrote: > > Patch applied. Thanks. > > > > I updated the README documentation for

Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread Tom Lane
Satoshi Nagayasu <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> pgstatindex.c: In function 'bt_page_items': >> pgstatindex.c:564: warning: format '%d' expects type 'int', but argument 4 >> has type 'long unsigned int' > I guess my '%d' should be '%zd', right? No, that sounds even less portable

Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > The two attached patches fix contrib/pgstattuple. Good, applied. I made some additional changes to get install/uninstall/ reinstall to work cleanly after the latest additions, and to get it to compile without warnings on a 64-bit Fedora machine. (It

Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread ITAGAKI Takahiro
Bruce Momjian <[EMAIL PROTECTED]> wrote: > Patch applied. Thanks. The two attached patches fix contrib/pgstattuple. pgstattuple.c.diff removes the fragmemtation reporting in pgstattuple(). It is no longer needed, because pgstatindex() has upward functionality now. Also, the report using elog wa

Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread Satoshi Nagayasu
Tom Lane wrote: > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline > -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g -fpic > -I. -I../../src/include -D_GNU_SOURCE -c -o pgstatindex.o pgstatindex.c > pgstatindex.c: In function 'bt_page_items': > pgstatindex.c:564

Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread Satoshi Nagayasu
Thanks Bruce, Here are updated Japanese README, and uninstall_pgstattuple.sql. Bruce Momjian wrote: > Patch applied. Thanks. > > I updated the README documentation for the new functions, attached. I > could not update the Japanese version of the README. > > ---

Re: [PATCHES] pgstattuple extension for indexes

2006-09-03 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Patch applied. Thanks. For some reason I expected this patch to correct the portability errors and design problems identified here: http://archives.postgresql.org/pgsql-patches/2006-07/msg00100.php Not only has it not fixed anything, it's made things w

Re: [PATCHES] pgstattuple extension for indexes

2006-09-02 Thread Bruce Momjian
Patch applied. Thanks. I updated the README documentation for the new functions, attached. I could not update the Japanese version of the README. --- Satoshi Nagayasu wrote: > Bruce, > > Attached patch has been cleaned

Re: [PATCHES] pgstattuple extension for indexes

2006-08-21 Thread Bruce Momjian
Satoshi Nagayasu wrote: > Sorry, I'll write README (and uninstall.sql?) by tomorrow. Thanks. Yea, you need to update the uninstall too. --- > > Bruce Momjian wrote: > > Satoshi Nagayasu wrote: > >> Bruce, > >> > >> Bruce

Re: [PATCHES] pgstattuple extension for indexes

2006-08-21 Thread Satoshi Nagayasu
Sorry, I'll write README (and uninstall.sql?) by tomorrow. Bruce Momjian wrote: > Satoshi Nagayasu wrote: >> Bruce, >> >> Bruce Momjian wrote: >>> BTIem is no longer in CVS HEAD, though it was in 8.1.X. Please update >>> your patch for CVS HEAD. Thanks. >> I've posted CVS HEAD workable version o

Re: [PATCHES] pgstattuple extension for indexes

2006-08-21 Thread Bruce Momjian
Satoshi Nagayasu wrote: > Bruce, > > Bruce Momjian wrote: > > BTIem is no longer in CVS HEAD, though it was in 8.1.X. Please update > > your patch for CVS HEAD. Thanks. > > I've posted CVS HEAD workable version on Aug.14. > Please check it out. Thanks. OK, I found it, but it has no updates to

Re: [PATCHES] pgstattuple extension for indexes

2006-08-21 Thread Satoshi Nagayasu
Bruce, Bruce Momjian wrote: > BTIem is no longer in CVS HEAD, though it was in 8.1.X. Please update > your patch for CVS HEAD. Thanks. I've posted CVS HEAD workable version on Aug.14. Please check it out. Thanks. -- NAGAYASU Satoshi <[EMAIL PROTECTED]> Phone: +81-3-3523-8122

Re: [PATCHES] pgstattuple extension for indexes

2006-08-21 Thread Bruce Momjian
BTIem is no longer in CVS HEAD, though it was in 8.1.X. Please update your patch for CVS HEAD. Thanks. --- Satoshi Nagayasu wrote: > Hi all, > > Here is a patch to add pgstatindex functions to the pgstattuple module, > wh

Re: [PATCHES] pgstattuple extension for indexes

2006-08-14 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > I was thinking, isn't it a lot cleaner to define the functions to use > OUT parameters instead of having to define a custom type for each? Not really --- it's a bit less notation maybe, but if he's got it written like that already, I see no need to chan

Re: [PATCHES] pgstattuple extension for indexes

2006-08-13 Thread Alvaro Herrera
Satoshi Nagayasu wrote: > Bruce, > > Attached patch has been cleaned up, > and modified to be able to work with CVS HEAD. I was thinking, isn't it a lot cleaner to define the functions to use OUT parameters instead of having to define a custom type for each? Also, in 8.2 there is a uninstall SQL

Re: [PATCHES] pgstattuple extension for indexes

2006-08-13 Thread Satoshi Nagayasu
Bruce, Attached patch has been cleaned up, and modified to be able to work with CVS HEAD. Thanks. Satoshi Nagayasu wrote: > Alvaro, > > Alvaro Herrera wrote: >> Huh, I bet it works with 8.1.4, but it doesn't work on CVS HEAD: >> >> /pgsql/source/00orig/contrib/pgstattuple/pgstatindex.c: In func

Re: [PATCHES] pgstattuple extension for indexes

2006-08-12 Thread Satoshi Nagayasu
Alvaro, Alvaro Herrera wrote: > Huh, I bet it works with 8.1.4, but it doesn't work on CVS HEAD: > > /pgsql/source/00orig/contrib/pgstattuple/pgstatindex.c: In function > 'GetBTPageStatistics': > /pgsql/source/00orig/contrib/pgstattuple/pgstatindex.c:182: error: 'BTItem' > undeclared (first use

Re: [PATCHES] pgstattuple extension for indexes

2006-08-12 Thread Alvaro Herrera
Satoshi Nagayasu wrote: > Hi all, > > Here is a patch to add pgstatindex functions to the pgstattuple module, > which can work with 8.1.4. Please review and try it. Thanks. Huh, I bet it works with 8.1.4, but it doesn't work on CVS HEAD: /pgsql/source/00orig/contrib/pgstattuple/pgstatindex.c: In

Re: [PATCHES] pgstattuple extension for indexes

2006-08-11 Thread Bruce Momjian
I don't see any documentation, so I assume you want me to add something to README.pgstattuple. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews an

Re: [PATCHES] pgstattuple extension for indexes

2006-08-11 Thread Satoshi Nagayasu
Hi all, Here is a patch to add pgstatindex functions to the pgstattuple module, which can work with 8.1.4. Please review and try it. Thanks. Satoshi Nagayasu wrote: > Bruce, > > I'll fix it in this week. Please wait a few days. > Thanks. > > Bruce Momjian wrote: >> nagayasu-san, >> >> This loo

Re: [PATCHES] pgstattuple extension for indexes

2006-08-09 Thread Satoshi Nagayasu
Bruce, I'll fix it in this week. Please wait a few days. Thanks. Bruce Momjian wrote: > nagayasu-san, > > This looks good, but we would like the code added to > /contrib/pgstattuple, rather than it being its own /contrib module. Can > you make that adjustment? Thanks. > >

Re: [PATCHES] pgstattuple extension for indexes

2006-08-09 Thread Bruce Momjian
nagayasu-san, This looks good, but we would like the code added to /contrib/pgstattuple, rather than it being its own /contrib module. Can you make that adjustment? Thanks. --- satoshi nagayasu wrote: > Hi folks, > > As

Re: [PATCHES] pgstattuple extension for indexes

2006-07-28 Thread Bruce Momjian
I thought these new functions were going to be merged into /contrib/pgstattuple. --- satoshi nagayasu wrote: > Hi folks, > > As I said on -PATCHES, I've been working on an utility to get > a b-tree index information. I'm ha

Re: [PATCHES] pgstattuple extension for indexes

2006-07-27 Thread satoshi nagayasu
Hi folks, As I said on -PATCHES, I've been working on an utility to get a b-tree index information. I'm happy to introduce my new functions to you. pgstattuple module provides a `pgstatindex()`, and other small functions, which allow you to get b-tree internal information. I believe this module w

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > Do we add pgstatindex as a new contrib module, > or merge it into contrib/pgstattuple? I believe Alvaro was suggesting that you should add it as an additional SQL function within contrib/pgstattuple. That'd be my advice too --- I don't see a reason t

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread ITAGAKI Takahiro
Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Satoshi Nagayasu wrote: > > I'm working on an utility for b-tree index, called `pgstatindex`. > > Does it make sense to merge the pgstatindex stuff with pgstattuple, and > have the fragmentation report into pgstatindex instead of pgstattuple > itself?

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread Alvaro Herrera
Satoshi Nagayasu wrote: > Hi, > > I'm working on an utility for b-tree index, called `pgstatindex`. Does it make sense to merge the pgstatindex stuff with pgstattuple, and have the fragmentation report into pgstatindex instead of pgstattuple itself? -- Alvaro Herrera

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread Bruce Momjian
Satoshi Nagayasu wrote: > Hi, > > I'm working on an utility for b-tree index, called `pgstatindex`. > > It reports b-tree index statistics like a pgstattuple as below. > > pgbench=# \x > Expanded display is on. > pgbench=# SELECT *

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread Satoshi Nagayasu
Hi, I'm working on an utility for b-tree index, called `pgstatindex`. It reports b-tree index statistics like a pgstattuple as below. pgbench=# \x Expanded display is on. pgbench=# SELECT * FROM pgstatindex('accounts_pkey1'); -[ RE

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > ITAGAKI Takahiro wrote: >> BTW, should we change VACUUM VERBOSE in the same way? If we do so, >> autovacuum can handle the reports of VACUUM VERBOSE and plan when to >> do VACUUM FULL, REINDEX and/or CLUSTER using the information. >> Is this worth doing?

Re: [PATCHES] pgstattuple extension for indexes

2006-07-24 Thread Alvaro Herrera
ITAGAKI Takahiro wrote: > Tom Lane <[EMAIL PROTECTED]> wrote: > > > >> Also, I added an experimental feature for btree indexes. It checks > > >> fragmentation factor of indexes. > > > The really serious problem with reporting this info via NOTICE is that > > there's no way for a program to get it

Re: [PATCHES] pgstattuple extension for indexes

2006-07-23 Thread ITAGAKI Takahiro
Tom Lane <[EMAIL PROTECTED]> wrote: > >> Also, I added an experimental feature for btree indexes. It checks > >> fragmentation factor of indexes. > The really serious problem with reporting this info via NOTICE is that > there's no way for a program to get its hands on the info. The output > tup

Re: [PATCHES] pgstattuple extension for indexes

2006-07-14 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Patch applied. Thanks. >> Also, I added an experimental feature for btree indexes. It checks >> fragmentation factor of indexes. If an leaf has the right link on the next >> adjacent page in the file, it is assumed to be continuous (not fragmented). >>

Re: [PATCHES] pgstattuple extension for indexes

2006-07-05 Thread Bruce Momjian
Patch applied. Thanks. --- ITAGAKI Takahiro wrote: > This is an extension of pgstattuple to query information from indexes. > It supports btree, hash and gist. Gin is not supported. > It scans only index pages and does not