Re: [HACKERS] adding new pages bulky way

2005-06-06 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> writes > > I very seriously doubt that there would be *any* win, and I doubt even > more that it could possibly be worth the klugery you'd have to do to > make it happen. Bear in mind that index access methods are two API > layers away from md.c --- how will you tra

Re: [HACKERS] adding new pages bulky way

2005-06-06 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > Is there any performance benefits if we have a mdextend_several_pages() > function in md.c? I very seriously doubt that there would be *any* win, and I doubt even more that it could possibly be worth the klugery you'd have to do to make it happen. Bea

Re: [HACKERS] adding new pages bulky way

2005-06-06 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> writes > > Why bother? Just write each page when you need to --- there's no law > that says you must use P_NEW. The hash index type does something pretty > similar, IIRC. > Is there any performance benefits if we have a mdextend_several_pages() function in md.c? S

Re: [HACKERS] adding new pages bulky way

2005-06-06 Thread Tom Lane
"Victor Y. Yegorov" <[EMAIL PROTECTED]> writes: > [ scheme involving a predetermined layout of index pages ] > The question is: allocating pages this way is really ugly, I understand. Is > there some API that would allow allocating N pages in the bulk way? Why bother? Just write each page when y

Re: [HACKERS] [PATCHES] lastval()

2005-06-06 Thread Christopher Kings-Lynne
BTW, I noticed that the "permission denied" messages throughout the source don't quote the name of the identifier for which permission has been denied. This violates the error code conventions: "Use quotes always to delimit file names, user-supplied identifiers, and other variables that might c

Re: [HACKERS] libpq API incompatibility between 7.4 and 8.0

2005-06-06 Thread Alvaro Herrera
On Mon, Jun 06, 2005 at 09:23:21PM -0400, Bruce Momjian wrote: > > Is this a direction we want to explore --- using the SONAME as part of > the translation domain? Hm, interesting -- this could explain some weird problems I've had with translated text on a machine where multiple versions are inst

Re: [HACKERS] Should *.backup files ever be removed from pg_xlog?

2005-06-06 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > When you do a pg_start_backup()/pg_stop_backup(), the *.backup files > > created in pg_xlog are never deleted. Is that intended? > > Yes. See the documentation. DBAs can delete 'em if they feel like, > but I don't see a strong argument for automatica

Re: [HACKERS] Should *.backup files ever be removed from pg_xlog?

2005-06-06 Thread Tom Lane
Bruce Momjian writes: > When you do a pg_start_backup()/pg_stop_backup(), the *.backup files > created in pg_xlog are never deleted. Is that intended? Yes. See the documentation. DBAs can delete 'em if they feel like, but I don't see a strong argument for automatically removing 'em. They aren'

Re: [HACKERS] [BUGS] BUG #1467: fe_connect doesn't handle EINTR right

2005-06-06 Thread Tom Lane
Bruce Momjian writes: > Would someone comment on this bug report from February? The report scored about zero out of zero IMHO: neither an actual report of field trouble, nor a clear explanation of the supposed trouble, nor a specific proposal what to do about it. Without actual field trouble rep

[HACKERS] Should *.backup files ever be removed from pg_xlog?

2005-06-06 Thread Bruce Momjian
When you do a pg_start_backup()/pg_stop_backup(), the *.backup files created in pg_xlog are never deleted. Is that intended? $ lf /u/pg/data/pg_xlog/ 0001.0034C96C.backup00010004 0001.0034C9AC.backup00

[HACKERS] I am up-to-date

2005-06-06 Thread Bruce Momjian
After months of being behind, I have gone through my entire mailbox and addressed all the patches held over from 8.0beta. I have loaded up the patch queue and will apply them in a day or two. http://momjian.postgresql.org/cgi-bin/pgpatches Some of the patches lack documentation which I w

Re: [HACKERS] RESET CONNECTION behavior

2005-06-06 Thread Bruce Momjian
Bruce Momjian wrote: > Can we get a list features we want for RESET CONNECTION? At this point, > I see ideas but no consistent approach. Some say protocol only, others > say an SQL command is fine, but the protocol has to find out it happened > somehow. Is that a plan? I have enhanced our TODO

[HACKERS] RESET CONNECTION behavior

2005-06-06 Thread Bruce Momjian
Can we get a list features we want for RESET CONNECTION? At this point, I see ideas but no consistent approach. Some say protocol only, others say an SQL command is fine, but the protocol has to find out it happened somehow. Is that a plan? -- Bruce Momjian| http://c

Re: [HACKERS] [COMMITTERS] pgsql: Fix NUMERIC modulus to properly

2005-06-06 Thread Paul Tillotson
Bruce Momjian wrote: Tom Lane wrote: Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: No, I don't think so. It doesn't seem to be something that enough people use to risk the change in behavior --- it might break something that was working. But, if folks want it backported we can

Re: [HACKERS] libpq API incompatibility between 7.4 and 8.0

2005-06-06 Thread Bruce Momjian
Is this a direction we want to explore --- using the SONAME as part of the translation domain? --- Martin Pitt wrote: -- Start of PGP signed section. > Hi! > > Bruce Momjian [2005-02-09 18:05 -0500]: > > > However, I just s

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp.

2005-06-06 Thread Joe Conway
Markus Bertheau ☭ wrote: Hmm, this gets really complicated and inconsistent. Complicated means unusable. What about modifying the dimension syntax such that the second number means number of elements instead of upper bound? That particular problem would go away then, and array_upper('[0:0]={}'::i

Re: [HACKERS] [BUGS] BUG #1467: fe_connect doesn't handle EINTR right

2005-06-06 Thread Bruce Momjian
Would someone comment on this bug report from February? I can confirm the code is unchanged and is in function fe-connect.c::PQconnectPoll(). --- Florian Hars wrote: > > The following bug has been logged online: > > Bug r

Re: [HACKERS] [BUGS] [Feed-back] Installing PostgreSQL 8.0.0 on SPARC/Solaris.

2005-06-06 Thread Bruce Momjian
I have waded through this email and the suggestion seems to be that on Solaris we should add rpathdir based on the LD_RUN_PATH value at the time of compile. While this might be common on Solaris, I am not excited about implementing it because it changes compile behavior based on an environment va

Re: [HACKERS] unicode upper/lower functions

2005-06-06 Thread John Hansen
Bruce Momjian wrote: > John Hansen wrote: > > ... Except,.. It was never decided if the 'C' locale > optimisations was > > going to be removed if/when implementing ICU. > > Uh, why would we remove it? Oh, meaning if the locale is C > we bypass locale lookups? I think we will have to see what

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread David Fetter
On Tue, Jun 07, 2005 at 09:35:56AM +0900, a_ogawa wrote: > > Bruce Momjian wrote: > > David Fetter wrote: > > > On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > > > > > > > Patch removed because we already have this functionality. > > > > > > We don't yet have this functionality,

Re: [HACKERS] adding new pages bulky way

2005-06-06 Thread Alvaro Herrera
On Mon, Jun 06, 2005 at 10:59:04PM +0300, Victor Y. Yegorov wrote: > The question is: allocating pages this way is really ugly, I understand. Is > there some API that would allow allocating N pages in the bulk way? > Maybe this is a know problem, that has been already solved before? > Any other id

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread a_ogawa
Bruce Momjian wrote: > David Fetter wrote: > > On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > > > > > Patch removed because we already have this functionality. > > > > We don't yet have this functionality, as the patch allows for using > > second and later regex matches "()" in

Re: [HACKERS] unicode upper/lower functions

2005-06-06 Thread Bruce Momjian
John Hansen wrote: > ... Except,.. It was never decided if the 'C' locale optimisations was > going to be removed if/when implementing ICU. Uh, why would we remove it? Oh, meaning if the locale is C we bypass locale lookups? I think we will have to see what performance we have with things. > Th

Re: [HACKERS] unicode upper/lower functions

2005-06-06 Thread John Hansen
... Except,.. It was never decided if the 'C' locale optimisations was going to be removed if/when implementing ICU. Tho I think the conclusion was a postgresql.conf parameter to enable/disable the optimisations. Either way, this code is now obsolete. ... John > -Original Message- > Fr

Re: [HACKERS] unicode upper/lower functions

2005-06-06 Thread Bruce Momjian
I think we have decided to use the ICU library to implement multiple locales. --- John Hansen wrote: > Hi list, > > > Attached for your perusal, unicode versions of upper/lower, that work > independent of locale except for

Re: [HACKERS] unicode upper/lower functions

2005-06-06 Thread John Hansen
Yes, Thank you! :) .. John > -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 07, 2005 10:07 AM > To: John Hansen > Cc: pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] unicode upper/lower functions > > > I think we have decided to use the

[HACKERS] Added rtree/box TODO item

2005-06-06 Thread Bruce Momjian
I have added the unresolved issue referenced here to TODO: http://archives.postgresql.org/pgsql-bugs/2005-01/msg00306.php It relates to the use of rtree indexing: * Fix incorrect rtree results due to wrong assumptions about "over" operator semantics [rtree] -- Bruce

Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Bruce Momjian
Robert Treat wrote: > On Monday 06 June 2005 17:35, Bruce Momjian wrote: > > Josh Berkus wrote: > > > Bruce, > > > > > > > I do like this idea. Can you make a general patch? Do others like the > > > > idea of system tables showing error codes and keywords? > > > > > > Yes. However, I think the i

Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Robert Treat
On Monday 06 June 2005 17:35, Bruce Momjian wrote: > Josh Berkus wrote: > > Bruce, > > > > > I do like this idea. Can you make a general patch? Do others like the > > > idea of system tables showing error codes and keywords? > > > > Yes. However, I think the idea of additional system views has a

Re: [HACKERS] [PATCHES] Implementing RESET CONNECTION ...

2005-06-06 Thread Oliver Jowett
Christopher Kings-Lynne wrote: What would be absolutely ideal is a reset connection command, plus some way of knowing via the protocol if it's needed or not. And a way of notifying the client that a reset has happened. -O ---(end of broadcast)--

Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Bruce Momjian
Josh Berkus wrote: > Bruce, > > > I do like this idea. Can you make a general patch? Do others like the > > idea of system tables showing error codes and keywords? > > Yes. However, I think the idea of additional system views has already been > shot down in flames. > Unless people think t

Re: [HACKERS] Suggestion: additional system views

2005-06-06 Thread Josh Berkus
Bruce, > I do like this idea. Can you make a general patch? Do others like the > idea of system tables showing error codes and keywords? Yes. However, I think the idea of additional system views has already been shot down in flames. Unless people think that it's reasonable to have a syste

[HACKERS] adding new pages bulky way

2005-06-06 Thread Victor Y. Yegorov
I need your advice. For on-disk bitmap I run a list of TIDs. TIDs are stored in pages as an array, page's opaque data holds an array of bits, indicating whether corresponding TID has been deleted and should be skipped during the scan. Pages, that contain TIDs list, are organized in extents, each

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread Bruce Momjian
David Fetter wrote: > On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > > > Patch removed because we already have this functionality. > > We don't yet have this functionality, as the patch allows for using > second and later regex matches "()" in the replacement pattern. > > The

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > On Mon, 6 Jun 2005, Tom Lane wrote: >> Heikki Linnakangas <[EMAIL PROTECTED]> writes: >>> Vacuum doesn't zero out the free space between lower and upper, >> >> It does now ;-) > Oh :). Does it affect vacuum performance? I haven't tried to measure

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Heikki Linnakangas
On Mon, 6 Jun 2005, Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: Vacuum doesn't zero out the free space between lower and upper, It does now ;-) Oh :). Does it affect vacuum performance? How about adding a flag to XLogRecData to indicate if the space between pd_lower and

Re: [HACKERS] graphical representaion of the catalogue

2005-06-06 Thread Bruce Momjian
Gevik babakhani wrote: > Dear All, > > > > I am sure this is all asked before, so forgive me. > > Does anyone know (besides the documentation) if there is a graphical > representation of the pg catalog? Slide 65 in this presentation: http://candle.pha.pa.us/main/writings/pgsql/intern

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Vacuum doesn't zero out the free space between lower and upper, It does now ;-) > How about adding a flag to XLogRecData to indicate if the space between > pd_lower and pd_upper is meaningful or not? The XLogInsert caller probably > knows that. T

Re: [HACKERS] PGDN source browser

2005-06-06 Thread Tino Wildenhain
Am Samstag, den 04.06.2005, 22:59 +0200 schrieb Gevik babakhani: > Dear all, > > > > The PostgreSQL Developer Networkʼs Source Browser (beta1) is ready. > > If you got the time to check it for a moment, please do not hesitate > to send your opinion. Hm. wouldn't an install of trac/postgres

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Heikki Linnakangas
On Mon, 6 Jun 2005, Tom Lane wrote: Junji TERAMOTO <[EMAIL PROTECTED]> writes: In "whole buffer log", there is a page header that includes offset of "hole" (lower and upper). If we use that information, we don't need any overhead, do we? No, because the WAL code cannot assume that all pages

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[]

2005-06-06 Thread Markus Bertheau ☭
В Пнд, 06/06/2005 в 08:58 -0700, Joe Conway пишет: > Joe Conway wrote: > > Actually, consistent with my last post, I think array_upper() on a > > zero-element array should return NULL. A zero-element array has a > > defined lower bound, but its upper bound is not zero -- it is really > > undefin

Re: [HACKERS] [PATCHES] regexp_replace

2005-06-06 Thread David Fetter
On Mon, Jun 06, 2005 at 12:02:18PM -0400, Bruce Momjian wrote: > > Patch removed because we already have this functionality. We don't yet have this functionality, as the patch allows for using second and later regex matches "()" in the replacement pattern. The function is misnamed. It should be

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp.

2005-06-06 Thread Joe Conway
Joe Conway wrote: Actually, consistent with my last post, I think array_upper() on a zero-element array should return NULL. A zero-element array has a defined lower bound, but its upper bound is not zero -- it is really undefined. Just to clarify my response, this is what I propose: regressi

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Joe Conway
Markus Bertheau ☭ wrote: В Пнд, 06/06/2005 в 10:44 -0400, Tom Lane пишет: Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: By analogy, array_upper('{}'::TEXT[], 1) should return 0 instead of NULL. No, that doesn't follow ... we've traditionally considered '{}' to denote a ze

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Joe Conway
Tom Lane wrote: Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: By analogy, array_upper('{}'::TEXT[], 1) should return 0 instead of NULL. No, that doesn't follow ... we've traditionally considered '{}' to denote a zero-dimensional array. A 1-D array of no elements is '[1:0]

Re: [HACKERS] [COMMITTERS] pgsql: Fix NUMERIC modulus to properly truncate

2005-06-06 Thread Bruce Momjian
Tom Lane wrote: > Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > >> No, I don't think so. It doesn't seem to be something that enough > >> people use to risk the change in behavior --- it might break something > >> that was working. But, if folks want it backported we can do it. It is > >

Re: [HACKERS] PGDN source browser

2005-06-06 Thread Jonah H. Harris
Thanks! Gevik babakhani wrote: Regarding to update the techdocs and not reinveting the wheel, I am having a mailng with Robert Treat of (webmaster pg) in order to see what can be done.. any help is welcome... :) Regards, Gevik. -Original Message- From: Jonah H. Harris [mailto:[EMAIL

Re: [HACKERS] PGDN source browser

2005-06-06 Thread Gevik babakhani
Regarding to update the techdocs and not reinveting the wheel, I am having a mailng with Robert Treat of (webmaster pg) in order to see what can be done.. any help is welcome... :) Regards, Gevik. -Original Message- From: Jonah H. Harris [mailto:[EMAIL PROTECTED] Sent: Monday, June 06,

Re: [HACKERS] graphical representaion of the catalogue

2005-06-06 Thread Jonah H. Harris
Is this really relevant to -hackers? I was thinking more along the lines of -general. Gevik babakhani wrote: Dear All, I am sure this is all asked before, so forgive me… Does anyone know (besides the documentation) if there is a graphical representation of the pg catalog? Regards, Gevik.

Re: [HACKERS] need help

2005-06-06 Thread Jonah H. Harris
For this information, you can go through the code. I would suggest reading through the catalog, heap access methods, storage manager, and executor. Does anyone know of any good high-level docs on this? Nithin Sontineni wrote: Hi, i want to know how create relation works and how the pop

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Markus Bertheau ☭
В Пнд, 06/06/2005 в 10:44 -0400, Tom Lane пишет: > Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > > By analogy, array_upper('{}'::TEXT[], 1) should return 0 instead of > > NULL. > > No, that doesn't follow ... we've traditionally considered '{}' to > denote a zero-dimensional

[HACKERS] graphical representaion of the catalogue

2005-06-06 Thread Gevik babakhani
Dear All,   I am sure this is all asked before, so forgive me… Does anyone know (besides the documentation) if there is a graphical representation of the pg catalog?   Regards, Gevik.  

Re: [HACKERS] PGDN source browser

2005-06-06 Thread Jonah H. Harris
Gevik, You still didn't answer my question as to why you're reinventing the wheel. Why not just work on updating techdocs instead? -Jonah Tom Flavel wrote: On 04/06/2005 22:59:19, Gevik babakhani wrote: Dear all, The PostgreSQL Developer Network's Source Browser (beta1) is ready. I

Re: [HACKERS] Solution proposal for TODO item "Clients: sequences"

2005-06-06 Thread Jonah H. Harris
I would suggest adding it to \ds or create a \ds+ so that it is in common with the rest of the commands. -Jonah Gevik babakhani wrote: So what would be your suggestion in order to add this functionality? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Tom Lane
Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > By analogy, array_upper('{}'::TEXT[], 1) should return 0 instead of > NULL. No, that doesn't follow ... we've traditionally considered '{}' to denote a zero-dimensional array. A 1-D array of no elements is '[1:0]={}', just as Joe

Re: [HACKERS] thw rewriter and default values, again

2005-06-06 Thread Jaime Casanova
On 6/6/05, Richard Huxton wrote: > Jaime Casanova wrote: > > I know you're right, but -when dealing with updateable views- doing > > that implies to add a lot of time altering views when base table > > change, and of course we maybe don't want all views get that values. > > Sorry for the late pos

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Tom Lane
Junji TERAMOTO <[EMAIL PROTECTED]> writes: > In the XLogInsert(), it makes two kinds of logs, "whole buffer(page) > log" and "partial buffer log", isn't it? Is it only "who buffer log" > to generate a log with "hole"? Right. > Tom Lane wrote: >> The overhead needed is only 2 bytes to show the nu

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Markus Bertheau ☭
В Втр, 24/05/2005 в 00:06 -0400, Tom Lane пишет: > Joe Conway <[EMAIL PROTECTED]> writes: > > Markus Bertheau wrote: > >> why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of > >> ARRAY[] resp. '{}'? > > > Why would you expect an empty array instead of a NULL? > > I think he's got a

Re: [HACKERS] thw rewriter and default values, again

2005-06-06 Thread Richard Huxton
Jaime Casanova wrote: I know you're right, but -when dealing with updateable views- doing that implies to add a lot of time altering views when base table change, and of course we maybe don't want all views get that values. Sorry for the late posting on this thread. Might there be any way to h

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Mark Cave-Ayland
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 04 June 2005 16:46 > To: Mark Cave-Ayland (External) > Cc: pgsql-hackers@postgresql.org > Subject: Re: Quick-and-dirty compression for WAL backup blocks (cut) > I've completed a test run for this (it's essentially M

Re: [HACKERS] Speeding up the Postgres lexer

2005-06-06 Thread Simon Riggs
On Wed, 2005-05-25 at 11:28 +1000, Neil Conway wrote: > Tom Lane wrote: > > Dunno. Depending on such a thing would require depending on a new flex > > version, and seeing that the flex guys haven't put out a new release > > since the badly broken 2.5.31 more than 2 years ago, I wouldn't hold > > m

Re: [HACKERS] Quick-and-dirty compression for WAL backup blocks

2005-06-06 Thread Junji TERAMOTO
Hello all, (B (BI am interested in how to "Compress WAL entries". (BThen, I study the source now, and read this discussion. (B (BThere are some questions. (B (B1. (BIn the XLogInsert(), it makes two kinds of logs, "whole buffer(page) (Blog" and "partial buffer log", isn't it? Is it only "

Re: [HACKERS] pg_stats not getting updated....

2005-06-06 Thread Himanshu Baweja
hey tom and others look at these how is the sum of all tables != database qe18=# SELECT pg_stat_get_db_blocks_fetched(771773788),pg_stat_get_db_blocks_hit(771773788); pg_stat_get_db_blocks_fetched | pg_stat_get_db_blocks_hit ---+--