Re: [HACKERS] Some ideas about Vacuum

2008-01-10 Thread Gokulakannan Somasundaram
Markus, I was re-thinking about what you said. I feel, if we read the WAL through archiver(Where the archiver is switched on), which anyway reads the entire WAL Log, it might save some CPU cycles off updates, inserts and deletes. The question is about reducing I/Os and i have no

Re: [HACKERS] Some ideas about Vacuum

2008-01-10 Thread Markus Schiltknecht
Hi, Gokulakannan Somasundaram wrote: But i am just thinking of creating the DSM by reading through the WAL Logs, instead of asking the Inserts, updates and deletes to do the DSM creation. What's the advantage of that? What's wrong with collecting the information for DSM at transaction

Re: [HACKERS] Named vs Unnamed Partitions

2008-01-10 Thread Markus Schiltknecht
Hi, Simon Riggs wrote: On Wed, 2008-01-09 at 18:04 +0100, Markus Schiltknecht wrote: What do you think about letting the database system know the split point vs it having to find optimal split points automatically? For me, managing the table's files can be separate from the chunking that

Re: [HACKERS] Some ideas about Vacuum

2008-01-10 Thread Gokulakannan Somasundaram
On Jan 10, 2008 3:43 PM, Markus Schiltknecht [EMAIL PROTECTED] wrote: Hi, Gokulakannan Somasundaram wrote: But i am just thinking of creating the DSM by reading through the WAL Logs, instead of asking the Inserts, updates and deletes to do the DSM creation. What's the advantage of

Re: [HACKERS] Some ideas about Vacuum

2008-01-10 Thread Markus Schiltknecht
Hi, Gokulakannan Somasundaram wrote: because of the contention. Am i missing something here? While Vacuum is reading the DSM, operations may not be able to update the bits. We need to put the DSM in shared memory, if all the processes are going to update it, whereas if Vacuum is going to form

[HACKERS] to_char incompatibility

2008-01-10 Thread Peter Eisentraut
On Oracle: SQL select to_date('31-DEC-200700:00:00', 'dd-mon- hh24:mi:ss') from dual; TO_DATE(' - 31-DEC-07 On PostgreSQL: select to_date('31-DEC-200700:00:00', 'dd-mon- hh24:mi:ss'); to_date -- 200700-12-31 Now the input value is probably a mistake. But

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Roberts, Jon
-Original Message- On Oracle: SQL select to_date('31-DEC-200700:00:00', 'dd-mon- hh24:mi:ss') from dual; TO_DATE(' - 31-DEC-07 On PostgreSQL: select to_date('31-DEC-200700:00:00', 'dd-mon- hh24:mi:ss'); to_date -- 200700-12-31 Now the

[HACKERS] tag REL8_2_6 not present in file xyz

2008-01-10 Thread Alvaro Herrera
Hi, I'm generating a diff between 8.2.5 and 8.2.6 and I get this: $ cvs diff -r REL8_2_5 -r REL8_2_6 /tmp/8.2.5-8.2.6.patch cvs diff: tag REL8_2_6 is not in file contrib/adminpack/README.adminpack cvs diff: tag REL8_2_6 is not in file contrib/btree_gist/README.btree_gist cvs diff: tag REL8_2_6

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Pavel Stehule
small non important note: your function is very expensive exactly same but faster is: CREATE OR REPLACE FUNCTION fn_to_date(p_date varchar, p_format varchar) RETURNS timestamp AS $$ SELECT to_timestamp(replace($1, ' ', ''), replace($2, ' ', '')); $$ LANGUAGE SQL STRICT IMMUTABLE; or CREATE OR

Re: [HACKERS] flex/bison output wrongly created in the source directory

2008-01-10 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Also, since they are (or should be) architecture-independent, what's the point? Out-of-tree builds are intended to support building for multiple architectures in parallel; but there's no reason to force independent reconstructions of these common derived

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Roberts, Jon
I always put security definer as I really think that should be the default behavior. Anyway, your function should run faster. Jon -Original Message- From: Pavel Stehule [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 8:47 AM To: Roberts, Jon Cc: Peter Eisentraut;

Re: [HACKERS] tag REL8_2_6 not present in file xyz

2008-01-10 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I'm generating a diff between 8.2.5 and 8.2.6 and I get this: $ cvs diff -r REL8_2_5 -r REL8_2_6 /tmp/8.2.5-8.2.6.patch cvs diff: tag REL8_2_6 is not in file contrib/adminpack/README.adminpack cvs diff: tag REL8_2_6 is not in file

Re: [HACKERS] tag REL8_2_6 not present in file xyz

2008-01-10 Thread Magnus Hagander
On Thu, Jan 10, 2008 at 10:36:24AM -0500, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: I'm generating a diff between 8.2.5 and 8.2.6 and I get this: $ cvs diff -r REL8_2_5 -r REL8_2_6 /tmp/8.2.5-8.2.6.patch cvs diff: tag REL8_2_6 is not in file

Re: [HACKERS] flex/bison output wrongly created in the source directory

2008-01-10 Thread Andrew Dunstan
Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: Also, since they are (or should be) architecture-independent, what's the point? Out-of-tree builds are intended to support building for multiple architectures in parallel; but there's no reason to force independent reconstructions

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Simon Riggs
On Thu, 2008-01-10 at 03:06 +0100, Gavin Sherry wrote: If people with large tables like partitioning why is Oracle moving towards automated partitioning in 11g? Automated partitioning was one of Have you used Oracle's partitioning? Since you ask, yep, certified on it, plus DB2, Teradata

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Ron Mayer
hris Browne wrote: _On The Other Hand_, there will be attributes that are *NOT* set in a more-or-less chronological order, and Segment Exclusion will be pretty useless for these attributes. Short summary: With the appropriate clustering, ISTM Segment Exclusion can be useful on all columns

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Gavin Sherry
On Thu, Jan 10, 2008 at 07:25:00AM +, Simon Riggs wrote: On Thu, 2008-01-10 at 03:06 +0100, Gavin Sherry wrote: If the exclusion is executor driven, the planner cannot help but create a seq scan plan. The planner will think you're returning 100X rows when really you end up returning X

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Gavin Sherry
On Thu, Jan 10, 2008 at 04:51:04PM +, Simon Riggs wrote: On Thu, 2008-01-10 at 03:06 +0100, Gavin Sherry wrote: If people with large tables like partitioning why is Oracle moving towards automated partitioning in 11g? Automated partitioning was one of Have you used Oracle's

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Simon Riggs
On Thu, 2008-01-10 at 21:43 +0100, Gavin Sherry wrote: On Thu, Jan 10, 2008 at 07:25:00AM +, Simon Riggs wrote: On Thu, 2008-01-10 at 03:06 +0100, Gavin Sherry wrote: If the exclusion is executor driven, the planner cannot help but create a seq scan plan. The planner will think you're

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Simon Riggs
On Thu, 2008-01-10 at 21:49 +0100, Gavin Sherry wrote: So, I get the message that you really want the DDL approach and agree that you've demonstrated there are use cases that need it that you are interested in. That's fine by me as long as we can each work on parts of it to get it done.

[HACKERS] Pl/Java broken since Postgresql 8.3-rc1

2008-01-10 Thread Jan Ischebeck
Hi, I'm following the 8.3 beta releases for some time now, mostly using the Win32 with Installer package. 8.3beta3 and 4 have worked perfectly with the provided pljava ddl, just with 8.3-rc1 it doesn't work anymore. i.e. 1. automatic installation of Pl/Java via Installer fails. 2. manual

Re: [HACKERS] [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Tom Lane
Sim Zacks [EMAIL PROTECTED] writes: I just upgraded my database server from 8.0.1 to 8.2.4 Most things went very well, but I have a couple of queries that really slowed down with the new server. The core of the problem seems to be the rowcount misestimation here: - Merge Left Join

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Josh Berkus
Jon, I always put security definer as I really think that should be the default behavior. Anyway, your function should run faster. That's not a real good idea. A security definer function is like an SUID shell script; only to be used with great care. -- --Josh Josh Berkus PostgreSQL @

Re: [HACKERS] Pl/Java broken since Postgresql 8.3-rc1

2008-01-10 Thread Kris Jurka
On Thu, 10 Jan 2008, Jan Ischebeck wrote: 8.3beta3 and 4 have worked perfectly with the provided pljava ddl, just with 8.3-rc1 it doesn't work anymore. 8.3RC1 changed the function definition for SetUserId, so it pljava needs some changes and a rebuild. Will fix. Kris Jurka

Re: [HACKERS] Dynamic Partitioning using Segment Visibility Maps

2008-01-10 Thread Gavin Sherry
On Thu, Jan 10, 2008 at 09:30:10PM +, Simon Riggs wrote: We cannot perform partition exclusion using this type of WHERE clause at planning time because the CURRENT DATE function is STABLE. We can do the exact same thing -- if it's a direction people want to take. In fact, we can

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Roberts, Jon
Jon, I always put security definer as I really think that should be the default behavior. Anyway, your function should run faster. That's not a real good idea. A security definer function is like an SUID shell script; only to be used with great care. You'll have to explain to

Re: [HACKERS] Pl/Java broken since Postgresql 8.3-rc1

2008-01-10 Thread Kris Jurka
On Thu, 10 Jan 2008, Kris Jurka wrote: On Thu, 10 Jan 2008, Jan Ischebeck wrote: 8.3beta3 and 4 have worked perfectly with the provided pljava ddl, just with 8.3-rc1 it doesn't work anymore. 8.3RC1 changed the function definition for SetUserId, so pljava needs some changes and a

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Tom Lane
Roberts, Jon [EMAIL PROTECTED] writes: soapbox Executing a function should never require privileges on the underlying objects referenced in it. The function should always run with the rights of the owner of the function, not the user executing it. /soapbox You might want to climb off that

Re: [HACKERS] Pl/Java broken since Postgresql 8.3-rc1

2008-01-10 Thread Tom Lane
Kris Jurka [EMAIL PROTECTED] writes: Turns out it's not just 83RC1, but all of the security releases, which will require different pljava packages for the patch versions before/after the security changes. Just out of curiosity, what was pljava doing calling SetUserId? If I'd known about that

Re: [HACKERS] Pl/Java broken since Postgresql 8.3-rc1

2008-01-10 Thread Kris Jurka
On Thu, 10 Jan 2008, Tom Lane wrote: Just out of curiosity, what was pljava doing calling SetUserId? If I'd known about that I'd have thought harder about removing the function; but it's not clear to me why a PL should be doing that. pljava wants to run code as the session user when inside