Re: [pgsql-patches] [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-01-19 Thread Bruce Momjian

I can't read a 7z file on my end.  Please email me the file and I will
put it at a URL.

---

Gurjeet Singh wrote:
 On 1/15/07, Andrew Dunstan [EMAIL PROTECTED] wrote:
 
  Gurjeet Singh wrote:
  
   1) pg_post_planner_plugin-REL8_2_STABLE-v1.patch.gz
   2) pg_index_adviser-REL8_2_STABLE-v26.patch.gz
  
  Why are these patches against 8.2 rather than CVS HEAD? Is this not a
  new feature? We never backport new features to the stable branches -
  that's what makes them stable ;-)
 
 
 Please find attached the patches ported to HEAD as of now. The patch to the
 contrib modules is the same as before; the version number has been kept but
 branch designator has been changed.
 
 1) pg_post_planner_plugin-HEAD_20070116-v2.patch.gz
 2) pg_index_adviser-HEAD_20070116-v26.7z
 
 Best regards,
 
 -- 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED] gmail | hotmail | yahoo }.com

[ Attachment, skipping... ]

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [pgsql-patches] [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-01-19 Thread Gurjeet Singh

On 1/20/07, Bruce Momjian [EMAIL PROTECTED] wrote:



I can't read a 7z file on my end.  Please email me the file and I will
put it at a URL.


---

Gurjeet Singh wrote:
 Please find attached the patches ported to HEAD as of now. The patch to
the
 contrib modules is the same as before; the version number has been kept
but
 branch designator has been changed.

 1) pg_post_planner_plugin-HEAD_20070116-v2.patch.gz
 2) pg_index_adviser-HEAD_20070116-v26.7z




I am attaching the .gz versions of both the patches, and CC'ing to -patches
also. If it doesn't turn up on -patches even this time, then please do the
needful.

Thanks and best regards,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com


pg_post_planner_plugin-HEAD_20070116-v2.patch.gz
Description: GNU Zip compressed data


pg_index_adviser-HEAD_20070116-v26.patch.gz
Description: GNU Zip compressed data

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [pgsql-patches] [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-01-16 Thread Gurjeet Singh

On 1/15/07, Andrew Dunstan [EMAIL PROTECTED] wrote:


Gurjeet Singh wrote:

 1) pg_post_planner_plugin-REL8_2_STABLE-v1.patch.gz
 2) pg_index_adviser-REL8_2_STABLE-v26.patch.gz

Why are these patches against 8.2 rather than CVS HEAD? Is this not a
new feature? We never backport new features to the stable branches -
that's what makes them stable ;-)



Please find attached the patches ported to HEAD as of now. The patch to the
contrib modules is the same as before; the version number has been kept but
branch designator has been changed.

1) pg_post_planner_plugin-HEAD_20070116-v2.patch.gz
2) pg_index_adviser-HEAD_20070116-v26.7z

Best regards,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com


pg_post_planner_plugin-HEAD_20070116-v2.patch.gz
Description: GNU Zip compressed data


pg_index_adviser-HEAD_20070116-v26.7z
Description: Binary data

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [pgsql-patches] [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-01-15 Thread Gurjeet Singh

Hi Bruce,

   I have not been able to send this file across since the last two days.
In the past I have been able to send 31KB attachments to patches, but I
donno why it's not getting through this time. I have tried different levels
of compression in different formats, and still it won't let the mail
through.

   If it doesn't get through to the list even this time, can you please do
the needful and get it posted on the patches.

Best regards,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com



This is the second installment of the Index Adviser patch. It contains the
item number (2) mentioned below.

On 1/13/07, Gurjeet Singh  [EMAIL PROTECTED] wrote:


 Hi All,

Please find attached two patches:

1) pg_post_planner_plugin-REL8_2_STABLE-v1.patch.gz
2) pg_index_adviser-REL8_2_STABLE-v26.patch.gz



--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com


pg_index_adviser-REL8_2_STABLE-v26.7z
Description: Binary data

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [pgsql-patches] [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-01-15 Thread Gurjeet Singh


 Please find attached two patches:

 1) pg_post_planner_plugin-REL8_2_STABLE-v1.patch.gz
 2) pg_index_adviser-REL8_2_STABLE-v26.patch.gz


Why are these patches against 8.2 rather than CVS HEAD? Is this not a
new feature? We never backport new features to the stable branches -
that's what makes them stable ;-)



Good point... I always worked only on a tag or a branch, knowing that it is
in some stable state, and won't have to be bothered by critical (and
sometimes un-compilable) changes to the source tree.

These patches *should* apply cleanly to the head too, since the first one
touches the code in very stable places and the second one contains only new
files. I'll port these patches to the head and get back to the list.

Thanks,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com


Re: [pgsql-patches] [PATCHES] [HACKERS] [Fwd: Index Advisor]

2007-01-14 Thread Gurjeet Singh

It seems the size restriction has blocked my previous attempt. Please find
the first patch attached, and the second one will be in the next mail.

Best Regards,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com


On 1/13/07, Gurjeet Singh [EMAIL PROTECTED] wrote:
On 1/9/07, Gurjeet Singh  [EMAIL PROTECTED] wrote:


Now that there's just one call to the Index Adviser (from planner()) we
can now move forward in making it a plugin.



Hi All,

   Please find attached two patches:

1) pg_post_planner_plugin-REL8_2_STABLE-v1.patch.gz
2) pg_index_adviser-REL8_2_STABLE-v26.patch.gz

Patch 1 introduces the infrastructure to call plugins from the tail-end of
the planner() function. The planner looks for a list of PPPFunctions
(PostPlannerPluginFunctions) in a rendezvous variable, and then calls the
'driver' callback into the plugin. This patch also adds a new function in
explain.c that can be used to generate a string similar to the output of the
EXPLAIN command. It also adds a harmless DLLIMPORT to some global variables
that were needed by the Index Adviser Plugin.

Patch 2 is the plugin version of the Index Adviser and the advise tool. It
creates two folders in the contrib module: pg_index_adviser and
pg_advise_index. The pg_index_adviser folder contains the updated README.
Both the folders contain their respective updated sample_*.[sql|txt] files.

Theres one point that needs attention in the patch 1. The code enclosed in
GLOBAL_CAND_LIST is a hack, which I couldn't get rid of. In plancat.c we
have two options to estimate the number of pages that would be occupied by a
virtual index:

i) Make a call back into the plugin to get the estimation. The code enabled
by GLOBAL_CAND_LIST implements this.

ii) We can allow the plugin to update the pg_class.relpages entry for each
virtual index, and the planner will pickup the values from there. The code
disabled by GLOBAL_CAND_LIST implements this.

Option (ii) would be ideal but the core members can be a better judge of
this. Is there any other way of doing this?

Best regards,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com


pg_post_planner_plugin-REL8_2_STABLE-v1.patch.gz
Description: GNU Zip compressed data

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster