[HACKERS] Full page write improvement: new WAL archive command (beta) released

2008-09-02 Thread Koichi Suzuki
Dear PostgreSQL folks; New WAL archive commands, to be used in archive_command and restore_command are released in http://pgfoundry.org/projects/pglesslog/ You can download pglesslog 1.1 beta and use this in PostgreSQL8.3.x to reduce the size of archive log. You don't need any modification to

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Heikki Linnakangas
David Fetter wrote: On Mon, Sep 01, 2008 at 09:00:47PM +0300, Heikki Linnakangas wrote: Ok, I'm starting to read up on SQL2003 window functions, Maybe it would be better to read the SQL2008 standard http://wiscorp.com/sql200n.zip :) Ah, thanks! -- Heikki Linnakangas EnterpriseDB

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: David Fetter wrote: On Mon, Sep 01, 2008 at 09:00:47PM +0300, Heikki Linnakangas wrote: Ok, I'm starting to read up on SQL2003 window functions, Maybe it would be better to read the SQL2008 standard http://wiscorp.com/sql200n.zip :) Ah, thanks!

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Pavel Stehule
2008/9/1 Tom Lane [EMAIL PROTECTED]: Hannu Krosing [EMAIL PROTECTED] writes: So, should this be fixed at calling / SQL side (by not allowing repeating argument names) or at pl side for each pl separately ? I'm for fixing it just once, ie, in CREATE FUNCTION. I can't imagine any scenario

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Heikki Linnakangas
Gregory Stark wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: sfunc is called once for each input row. Unlike with normal aggregates, sfunc is passed the whole input row, so that e.g RANK can compare it against the previous row, or LEAD can buffer it. I'm not sure I follow this bit about

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread David Fetter
On Tue, Sep 02, 2008 at 02:42:25AM -0400, Tom Lane wrote: Heikki Linnakangas [EMAIL PROTECTED] writes: David Fetter wrote: On Mon, Sep 01, 2008 at 09:00:47PM +0300, Heikki Linnakangas wrote: Ok, I'm starting to read up on SQL2003 window functions, Maybe it would be better to read the

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Tom Lane
David Fetter [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 02:42:25AM -0400, Tom Lane wrote: It's not like we haven't seen a SQL draft go down in flames before. Do you think that anything in the windowing functions section will disappear? Who's to say? I have no objection to looking at

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Pavel Stehule
2008/9/2 Tom Lane [EMAIL PROTECTED]: Pavel Stehule [EMAIL PROTECTED] writes: 2008/9/1 Tom Lane [EMAIL PROTECTED]: However, since this is a behavioral change that could break code that works now, I think it should be a HEAD-only change; no backpatch. I agree - it's could break only 100% wrong

[HACKERS] COPY statement cannot take binding parameters

2008-09-02 Thread Stephen R. van den Berg
Trying to parse and bind the following: COPY (SELECT $1::INT) TO STDOUT gives a correct parsing-done, but then in the parameterdescription tells me that there are no parameters. Is this intended? Is this a limitation of the COPY statement that will not change? In that case, might I suggest

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Stefan Kaltenbrunner
Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 02:42:25AM -0400, Tom Lane wrote: It's not like we haven't seen a SQL draft go down in flames before. Do you think that anything in the windowing functions section will disappear? Who's to say? I have no

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Hitoshi Harada
2008/9/2 Heikki Linnakangas [EMAIL PROTECTED]: Gregory Stark wrote: What would the executor do for a query like SELECT lead(x,1),lead(y,2),lead(y,3) It would not only have to keep a tuplestore to buffer the output but it would have to deal with receiving data from different SRFs at

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Simon Riggs
On Sat, 2008-08-30 at 02:04 +0900, Hitoshi Harada wrote: Here's the latest window functions patch against HEAD. It seems to be ready for the September commit fest, as added documents, WINDOW clause feature and misc tests. I guess this would be the window functions feature freeze for 8.4. The

Re: [HACKERS] New FSM patch

2008-09-02 Thread Simon Riggs
On Fri, 2008-08-29 at 10:47 +0300, Heikki Linnakangas wrote: - Per comments and discussion with Simon, I've changed the bubble up behavior so that when a bottom-level page is updated, if the amount of free space was decreased, the change is not immediately bubbled up to upper page.

Re: [HACKERS] New FSM allocation policy

2008-09-02 Thread Simon Riggs
On Fri, 2008-08-29 at 18:55 +0300, Heikki Linnakangas wrote: Tom Lane wrote: Gregory Stark [EMAIL PROTECTED] writes: One idea, we could scan the rest of the current page and use the first match. Another, given the way your tree structure works you can also descend the tree with

Re: [HACKERS] statement_cost_limit for regression testing.

2008-09-02 Thread Simon Riggs
On Thu, 2008-08-28 at 19:57 -0700, Ryan Bradetich wrote: I am not sure of the status of the patch, but I did read through the thread at: http://archives.postgresql.org/pgsql-hackers/2008-08/msg00054.php I just wanted to throw out another possible use for this GUC. There maybe a

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Ryan Bradetich
Hello all, On Mon, Aug 11, 2008 at 2:24 AM, Gregory Stark [EMAIL PROTECTED] wrote: Ryan Bradetich [EMAIL PROTECTED] writes: After a cursory glance at the HeapTupleHeaderData structure, it appears it could be aligned with INTALIGN instead of MAXALIGN. The one structure I was worried about

Re: [HACKERS] statement_cost_limit for regression testing.

2008-09-02 Thread Ryan Bradetich
Hello Simon, On Mon, Sep 1, 2008 at 9:35 AM, Simon Riggs [EMAIL PROTECTED] wrote: On Thu, 2008-08-28 at 19:57 -0700, Ryan Bradetich wrote: I just wanted to throw out another possible use for this GUC. There maybe a better way to solve this problem, but I believe this patch would be useful

Re: [HACKERS] rmgr hooks and contrib/rmgr_hook

2008-09-02 Thread ITAGAKI Takahiro
Simon Riggs [EMAIL PROTECTED] wrote: Why do we need to set rmgr_hook in _PG_init(), and add or mofify rmgrs in our hook functions? If we modify RmgrTable in _PG_init() then we would have to have that structure available in all backends, which was a stated objective to avoid. We would

Re: [HACKERS] statement_cost_limit for regression testing.

2008-09-02 Thread Pavel Stehule
2008/9/2 Ryan Bradetich [EMAIL PROTECTED]: Hello Simon, On Mon, Sep 1, 2008 at 9:35 AM, Simon Riggs [EMAIL PROTECTED] wrote: On Thu, 2008-08-28 at 19:57 -0700, Ryan Bradetich wrote: I just wanted to throw out another possible use for this GUC. There maybe a better way to solve this

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Simon Riggs
On Mon, 2008-09-01 at 21:00 +0300, Heikki Linnakangas wrote: 1. It's important that what gets committed now can be extended to handle all of the window function stuff in SQL2003 in the future, as well as user-defined-window-functions in the spirit of PostgreSQL extensibility. Even if we

Re: [HACKERS] rmgr hooks and contrib/rmgr_hook

2008-09-02 Thread Simon Riggs
On Tue, 2008-09-02 at 18:30 +0900, ITAGAKI Takahiro wrote: Simon Riggs [EMAIL PROTECTED] wrote: Why do we need to set rmgr_hook in _PG_init(), and add or mofify rmgrs in our hook functions? If we modify RmgrTable in _PG_init() then we would have to have that structure available in

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Martijn van Oosterhout
On Tue, Sep 02, 2008 at 01:49:43AM -0700, Ryan Bradetich wrote: For fun, I looked around in heap_form_tuple() today to see how big of a job this change would be. It did not seem very hard to implement. I know there are probably several other places I missed with this patch, but this patch

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Martijn van Oosterhout
On Tue, Sep 02, 2008 at 10:44:31AM +0100, Simon Riggs wrote: If we only have the combined (brain * time) to get a partial implementation in for this release then I would urge we go for that, rather than wait for perfection - as long as there are no other negative effects. premature

Re: [HACKERS] [PATCH] Make gram.y use palloc/pfree for memory management

2008-09-02 Thread Marko Kreen
On 9/1/08, Marko Kreen [EMAIL PROTECTED] wrote: First a correction, overriding malloc/free seems dangerous they seems to leak out, so correct would be to use YYMALLOC/YYFREE. This leaves 1.875 potentially leaking, but danger seems small. Here is the safer patch. As the chance for the leak

Re: [HACKERS] rmgr hooks and contrib/rmgr_hook

2008-09-02 Thread Heikki Linnakangas
ITAGAKI Takahiro wrote: I see that RmgrTable should be malloc'd when required, but there is another issue; when to load rmgr libraries. Rmgr objects are needed only in startup process during recovery. If we want to reduce resource consumption by rmgrs, I think it is better not to load rmgr

Re: [HACKERS] Auto-explain patch

2008-09-02 Thread Marko Kreen
On 8/28/08, ITAGAKI Takahiro [EMAIL PROTECTED] wrote: Here is a contrib version of auto-explain. You can use shared_preload_libraries or local_preload_libraries to load the module automatically. If you do so, you also need to add explain in custom_variable_classes and define explain.*

Re: [HACKERS] Auto-explain patch

2008-09-02 Thread ITAGAKI Takahiro
Marko Kreen [EMAIL PROTECTED] wrote: On 8/28/08, ITAGAKI Takahiro [EMAIL PROTECTED] wrote: You can use shared_preload_libraries or local_preload_libraries to load the module automatically. If you do so, you also need to add explain in custom_variable_classes and define explain.*

Re: [HACKERS] Auto-explain patch

2008-09-02 Thread Marko Kreen
On 9/2/08, ITAGAKI Takahiro [EMAIL PROTECTED] wrote: Marko Kreen [EMAIL PROTECTED] wrote: On 8/28/08, ITAGAKI Takahiro [EMAIL PROTECTED] wrote: You can use shared_preload_libraries or local_preload_libraries to load the module automatically. If you do so, you also need to add

[HACKERS] Out-of-tree compilation seems broken in HEAD (plpgsql)

2008-09-02 Thread Marko Kreen
$ mkdir build $ cd build $ ../PostgreSQL.dev/configure $ make [...] gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I/home/marko/src/build/../PostgreSQL.dev/src/pl/plpgsql/src -I../../../../src/include

Re: [HACKERS] rmgr hooks and contrib/rmgr_hook

2008-09-02 Thread Simon Riggs
On Tue, 2008-09-02 at 13:38 +0300, Heikki Linnakangas wrote: There's one more reason to use shared_preload_libraries. It provides a sanity check that the library required for recovery is present and can be loaded, even when no recovery is required. If you have misconfigured your system

Re: [HACKERS] Out-of-tree compilation seems broken in HEAD (plpgsql)

2008-09-02 Thread Heikki Linnakangas
Marko Kreen wrote: $ mkdir build $ cd build $ ../PostgreSQL.dev/configure $ make [...] gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I/home/marko/src/build/../PostgreSQL.dev/src/pl/plpgsql/src

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Simon Riggs
On Tue, 2008-09-02 at 03:14 -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 02:42:25AM -0400, Tom Lane wrote: It's not like we haven't seen a SQL draft go down in flames before. Do you think that anything in the windowing functions section will

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Peter Eisentraut
Radek Strnad wrote: - new collations can be defined with command CREATE COLLATION collation name FOR character set specification FROM existing collation name [STRCOLFN fn name] [ pad characteristic ] [ case sensitive ] [ LCCOLLATE lc_collate ] [ LCCTYPE lc_ctype ] How do you plan to make a

Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker)

2008-09-02 Thread Peter Eisentraut
David Rowley wrote: Reference: Bruce Momjian writes: - http://archives.postgresql.org/pgsql-committers/2007-09/msg00402.php Other references: Boyer Moore?? - http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/fstrpos-example.html I look forward to receiving feedback on this.

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Martijn van Oosterhout
On Tue, Sep 02, 2008 at 02:50:47PM +0300, Peter Eisentraut wrote: Radek Strnad wrote: - new collations can be defined with command CREATE COLLATION collation name FOR character set specification FROM existing collation name [STRCOLFN fn name] [ pad characteristic ] [ case sensitive ] [

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Peter Eisentraut
Marko Kreen wrote: In the meantime, here is simple patch for case-insensivity. You might be able to talk me into accepting various unambiguous, common alternative spellings of various units. But for instance allowing MB and Mb to mean the same thing is insane. -- Sent via pgsql-hackers

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Radek Strnad
I think at least case sensitivity can be done by comparing two strings converted to upper case with toupper() function. Regards Radek Strnad On Tue, Sep 2, 2008 at 2:00 PM, Martijn van Oosterhout [EMAIL PROTECTED]wrote: On Tue, Sep 02, 2008 at 02:50:47PM +0300, Peter Eisentraut wrote:

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Hitoshi Harada
2008/9/2 Simon Riggs [EMAIL PROTECTED]: If you've done all of that, then I'm impressed. Well done. Few general comments * The docs talk about windowing functions, yet you talk about window functions here. I think the latter is correct, but whichever we choose we should be consistent (and

[HACKERS] What is d2mdir?

2008-09-02 Thread Devrim GÜNDÜZ
$ grep -i D2MDIR * -R doc/src/sgml/Makefile:D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl I could not find anything in the code related to this. I am trying to create man pages in -HEAD, and getting an error: [EMAIL PROTECTED] sgml]$ make man onsgmls -D . postgres.sgml | sgmlspl /docbook2man-spec.pl

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Gregory Stark
Peter Eisentraut [EMAIL PROTECTED] writes: Marko Kreen wrote: In the meantime, here is simple patch for case-insensivity. You might be able to talk me into accepting various unambiguous, common alternative spellings of various units. But for instance allowing MB and Mb to mean the same

Re: [HACKERS] posix advises ...

2008-09-02 Thread Greg Smith
On Sun, 31 Aug 2008, Alvaro Herrera wrote: Greg Smith wrote: This patch does need a bit of general care in a couple of areas. The reviewing game plan I'm working through goes like this: Did this review effort go anywhere? Haven't made much progress--all my spare time for work like this

[HACKERS] Page layout footprint

2008-09-02 Thread Zdenek Kotala
Hi Heikki, I'm sorry for lack of explanation. It is my fault. Heikki says (on commit fest wiki): I believe I debunked this patch enough already. Apparently there's some compatibility issue between 32-bit and 64-bit Sparcs, but this patch didn't catch that. It doesn't seem like

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Heikki Linnakangas
Hitoshi Harada wrote: 2008/9/2 Heikki Linnakangas [EMAIL PROTECTED]: In my understanding, the Window Frame is defined by clauses such like ROWS BETWEEN ... , RANGE BETWEEN ... or so, contrast to Window Partition defined by PARTITION BY clause. A frame slides within a partition or there's only

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Heikki Linnakangas
Martijn van Oosterhout wrote: On Tue, Sep 02, 2008 at 10:44:31AM +0100, Simon Riggs wrote: If we only have the combined (brain * time) to get a partial implementation in for this release then I would urge we go for that, rather than wait for perfection - as long as there are no other negative

Re: [HACKERS] Page layout footprint

2008-09-02 Thread Heikki Linnakangas
Zdenek Kotala wrote: Hi Heikki, I'm sorry for lack of explanation. It is my fault. Heikki says (on commit fest wiki): I believe I debunked this patch enough already. Apparently there's some compatibility issue between 32-bit and 64-bit Sparcs, but this patch didn't catch that.

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Peter Eisentraut
Martijn van Oosterhout wrote: On Tue, Sep 02, 2008 at 02:50:47PM +0300, Peter Eisentraut wrote: Radek Strnad wrote: - new collations can be defined with command CREATE COLLATION collation name FOR character set specification FROM existing collation name [STRCOLFN fn name] [ pad

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Peter Eisentraut
Gregory Stark wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Marko Kreen wrote: In the meantime, here is simple patch for case-insensivity. You might be able to talk me into accepting various unambiguous, common alternative spellings of various units. But for instance allowing MB and Mb

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Marko Kreen
On 9/2/08, Peter Eisentraut [EMAIL PROTECTED] wrote: Marko Kreen wrote: In the meantime, here is simple patch for case-insensivity. You might be able to talk me into accepting various unambiguous, common alternative spellings of various units. But for instance allowing MB and Mb to mean

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Marko Kreen
On 9/2/08, Peter Eisentraut [EMAIL PROTECTED] wrote: Gregory Stark wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Marko Kreen wrote: In the meantime, here is simple patch for case-insensivity. You might be able to talk me into accepting various unambiguous, common

Re: [HACKERS] Out-of-tree compilation seems broken in HEAD (plpgsql)

2008-09-02 Thread Alvaro Herrera
Marko Kreen escribió: $ mkdir build $ cd build $ ../PostgreSQL.dev/configure $ make [...] gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I/home/marko/src/build/../PostgreSQL.dev/src/pl/plpgsql/src

Re: [HACKERS] Out-of-tree compilation seems broken in HEAD (plpgsql)

2008-09-02 Thread Marko Kreen
On 9/2/08, Alvaro Herrera [EMAIL PROTECTED] wrote: Marko Kreen escribió: $ mkdir build $ cd build $ ../PostgreSQL.dev/configure $ make [...] gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic

Re: [HACKERS] Out-of-tree compilation seems broken in HEAD (plpgsql)

2008-09-02 Thread Alvaro Herrera
Marko Kreen escribió: On 9/2/08, Alvaro Herrera [EMAIL PROTECTED] wrote: Marko Kreen escribió: error: pl_gram.h: No such file or directory Try running make maintainer-clean -- see http://archives.postgresql.org/message-id/20080829162252.GG3983%40alvh.no-ip.org Note I started

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Abhijit Menon-Sen
At 2008-09-02 15:10:23 +0300, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] sgml]$ make man As Alvaro noted recently, you need to use make man D2MDIR=/some/path. -- ams -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Devrim GÜNDÜZ
On Tue, 2008-09-02 at 19:47 +0530, Abhijit Menon-Sen wrote: [EMAIL PROTECTED] sgml]$ make man As Alvaro noted recently, I probably missed that. you need to use make man D2MDIR=/some/path. Thanks :) Cheers. -- Devrim GÜNDÜZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org,

Re: [HACKERS] Out-of-tree compilation seems broken in HEAD (plpgsql)

2008-09-02 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Marko Kreen escribió: I'll try with new cvs checkout. That'll have the same effect as make maintainer-clean, and should work equally well. No, it'll work better. The real problem here is that in the CVS-HEAD makefiles, make maintainer-clean fails to

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Tom Lane
Abhijit Menon-Sen [EMAIL PROTECTED] writes: At 2008-09-02 15:10:23 +0300, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] sgml]$ make man As Alvaro noted recently, you need to use make man D2MDIR=/some/path. I see it's been like that for quite some time, but still it seems pretty bogus. Why

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Tom Lane
Pavel Stehule [EMAIL PROTECTED] writes: 2008/9/2 Tom Lane [EMAIL PROTECTED]: BTW, there are actually two separate issues here: input parameters and output parameters. After brief thought it seems like we should enforce uniqueness of non-omitted parameter names for IN parameters (including

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Pavel Stehule
2008/9/2 Tom Lane [EMAIL PROTECTED]: Pavel Stehule [EMAIL PROTECTED] writes: 2008/9/2 Tom Lane [EMAIL PROTECTED]: BTW, there are actually two separate issues here: input parameters and output parameters. After brief thought it seems like we should enforce uniqueness of non-omitted parameter

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Tom Lane
Ryan Bradetich [EMAIL PROTECTED] writes: The patch concept is fairly simple. 1. Add a new boolean local variable: require_max_align (initialized to false). This really can't possibly work, because you'd need to propagate knowledge of the tuple's alignment requirement all over the place.

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Gregory Stark
Marko Kreen [EMAIL PROTECTED] writes: Uh. So you want force proper units in presentations at the price of everyday admin operations? Does not seem like a sensible tradeoff. It didn't to anyone else when Peter wrote the current version either, but as the person willing to actually do the work

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Gregory Stark
Ryan Bradetich [EMAIL PROTECTED] writes: 4. If require_max_align = true, use the MAXALIGN macro; otherwise use the INTALIGN macro. Huh, I didn't think of doing it like that. But I'm confused. You seem to be tweaking the alignment of the data inside the tuple? After the tuple header? I

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Ryan Bradetich [EMAIL PROTECTED] writes: The patch concept is fairly simple. 1. Add a new boolean local variable: require_max_align (initialized to false). This really can't possibly work, because you'd need to propagate knowledge of the tuple's

Re: [HACKERS] rmgr hooks and contrib/rmgr_hook

2008-09-02 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: On Tue, 2008-09-02 at 18:30 +0900, ITAGAKI Takahiro wrote: How about adding a new variable recovery_preload_libaries like as shared_preload_libraries? Rmgr libs in it are loaded only in startup process and only if recovery is needed. Good point. If

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Peter Eisentraut
Tom Lane wrote: Abhijit Menon-Sen [EMAIL PROTECTED] writes: At 2008-09-02 15:10:23 +0300, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] sgml]$ make man As Alvaro noted recently, you need to use make man D2MDIR=/some/path. I see it's been like that for quite some time, but still it seems

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Martijn van Oosterhout
On Tue, Sep 02, 2008 at 04:46:16PM +0300, Peter Eisentraut wrote: While it's true POSIX locales don't handle this, other collation libraries do and we should support them if the user wants. Do they handle exactly those two attributes specifically? Can you point out references? Or do you

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-02 Thread David E. Wheeler
On Sep 1, 2008, at 22:31, Brendan Jurd wrote: Oh, another thing: it shouldn't be STRICT. Nulls have perfectly good types. Agreed. Barring any further comments/objections, I'll go ahead and prepare a patch to add this to core. So it will return a text representation or an Oid? Best,

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Ryan Bradetich
Hello Martijn, You need to arrange testing on an architechture that has strict alignment reuiqrements. For example i386 doesn't care about alignment at all and will anything from anywhere, with performance degradation. Other architechtures will simply throw exceptions, that's the smoke

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Devrim GÜNDÜZ
On Tue, 2008-09-02 at 18:40 +0300, Peter Eisentraut wrote: The documentation says that Even though I could not find it, here is an error: $ make man.tar.gz D2MDIR=/usr/share/sgml/docbook/utils-0.6.14/helpers/ make -C sgml man make[1]: Entering directory

[HACKERS] Index scan troubles

2008-09-02 Thread Markus Wanner
Hi, I'm having a hard time using an index scan. So far, I've done quite well with ScanKeyInit for equality searches. But now I need to scan an index from a given starting point. Something like: (x, y, z,...) (const, const, const,...) For the equality operatior, I've used

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Devrim GÜNDÜZ
On Tue, 2008-09-02 at 19:07 +0300, Devrim GÜNDÜZ wrote: On Tue, 2008-09-02 at 18:40 +0300, Peter Eisentraut wrote: The documentation says that Oh, sorry -- I had missed the remaining part of your e-mail. -- Devrim GÜNDÜZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org,

Re: [HACKERS] rmgr hooks and contrib/rmgr_hook

2008-09-02 Thread Simon Riggs
On Tue, 2008-09-02 at 11:39 -0400, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Tue, 2008-09-02 at 18:30 +0900, ITAGAKI Takahiro wrote: How about adding a new variable recovery_preload_libaries like as shared_preload_libraries? Rmgr libs in it are loaded only in startup

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Ryan Bradetich
Hello Tom, On Tue, Sep 2, 2008 at 8:07 AM, Tom Lane [EMAIL PROTECTED] wrote: Ryan Bradetich [EMAIL PROTECTED] writes: The patch concept is fairly simple. 1. Add a new boolean local variable: require_max_align (initialized to false). This really can't possibly work, because you'd need

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Ryan Bradetich
Hello Greg, On Tue, Sep 2, 2008 at 8:30 AM, Gregory Stark [EMAIL PROTECTED] wrote: Ryan Bradetich [EMAIL PROTECTED] writes: 4. If require_max_align = true, use the MAXALIGN macro; otherwise use the INTALIGN macro. Huh, I didn't think of doing it like that. But I'm confused. You seem to

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread David Fetter
On Tue, Sep 02, 2008 at 12:42:45PM +0100, Simon Riggs wrote: On Tue, 2008-09-02 at 03:14 -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 02:42:25AM -0400, Tom Lane wrote: It's not like we haven't seen a SQL draft go down in flames before.

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: In particular, how would code *reading* the tuple know where the data starts? Uh, at t_hoff, no? Doh, right. Obviously need more caffeine. regards, tom lane -- Sent via pgsql-hackers

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Alvaro Herrera
Devrim GÜNDÜZ wrote: $ make man.tar.gz D2MDIR=/usr/share/sgml/docbook/utils-0.6.14/helpers/ make -C sgml man make[1]: Entering directory `/home/devrim/PostgreSQL/pgsql/doc/src/sgml' onsgmls -D . postgres.sgml | sgmlspl /usr/share/sgml/docbook/utils-0.6.14/helpers//docbook2man-spec.pl

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Gregory Stark
Martijn van Oosterhout [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 04:46:16PM +0300, Peter Eisentraut wrote: While it's true POSIX locales don't handle this, other collation libraries do and we should support them if the user wants. I think that's backwards. We have to go with the

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Gregory Stark
Ryan Bradetich [EMAIL PROTECTED] writes: Hello Greg, On Tue, Sep 2, 2008 at 8:30 AM, Gregory Stark [EMAIL PROTECTED] wrote: But I'm confused. You seem to be tweaking the alignment of the data inside the tuple? After the tuple header? I thought we had only one byte of wasted space in

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Tom Lane
Ryan Bradetich [EMAIL PROTECTED] writes: On Tue, Sep 2, 2008 at 8:07 AM, Tom Lane [EMAIL PROTECTED] wrote: It's conceivable that we could make this work if we wanted to dedicate an infomask bit to showing whether the tuple needs int or double alignment. I don't really think it's worth the

Re: [HACKERS] Window functions patch v04 for the September commit fest

2008-09-02 Thread Simon Riggs
On Tue, 2008-09-02 at 09:35 -0700, David Fetter wrote: On Tue, Sep 02, 2008 at 12:42:45PM +0100, Simon Riggs wrote: On Tue, 2008-09-02 at 03:14 -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 02:42:25AM -0400, Tom Lane wrote: It's not like we

Re: [HACKERS] What is d2mdir?

2008-09-02 Thread Devrim GÜNDÜZ
On Tue, 2008-09-02 at 12:47 -0400, Alvaro Herrera wrote: Unknown SDATA: [mdash ] at /usr/share/sgml/docbook/utils-0.6.14/helpers//docbook2man-spec.pl line 1241, STDIN line 11975. Please see here: http://archives.postgresql.org/message-id/20080821130203.GN4169% 40alvh.no-ip.org Thanks,

Re: [HACKERS] Index scan troubles

2008-09-02 Thread Gregory Stark
Markus Wanner [EMAIL PROTECTED] writes: Hi, I'm having a hard time using an index scan. So far, I've done quite well with ScanKeyInit for equality searches. But now I need to scan an index from a given starting point. Something like: (x, y, z,...) (const, const, const,...) For the

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Martijn van Oosterhout
On Tue, Sep 02, 2008 at 05:42:13PM +0100, Gregory Stark wrote: Martijn van Oosterhout [EMAIL PROTECTED] writes: On Tue, Sep 02, 2008 at 04:46:16PM +0300, Peter Eisentraut wrote: While it's true POSIX locales don't handle this, other collation libraries do and we should support them if the

[HACKERS] What is the use of the CommitFestBlank template?

2008-09-02 Thread Tom Lane
The description of the CommitFestBlank template suggests that it sets up an editable page for you, but AFAICT it does no such thing. I had to manually create all the right sections: http://wiki.postgresql.org/index.php?title=CommitFest:2008-11diff=2260oldid=2258 in order to have a page that

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-02 Thread Martijn van Oosterhout
On Tue, Sep 02, 2008 at 08:58:04AM -0700, David E. Wheeler wrote: Barring any further comments/objections, I'll go ahead and prepare a patch to add this to core. So it will return a text representation or an Oid? Hopefully regtype. The function doesn't need changing, but then users can get a

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-02 Thread David E. Wheeler
On Sep 2, 2008, at 08:58, David E. Wheeler wrote: On Sep 1, 2008, at 22:31, Brendan Jurd wrote: Oh, another thing: it shouldn't be STRICT. Nulls have perfectly good types. Agreed. Barring any further comments/objections, I'll go ahead and prepare a patch to add this to core. So it

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-02 Thread David E. Wheeler
On Sep 2, 2008, at 10:43, David E. Wheeler wrote: Looks like regtype displays as an integer. So how about pg_regtypeof() and pg_typeof()? Sorry, make that: PG_FUNCTION_INFO_V1(pg_regtypeof); Datum pg_regtypeof(PG_FUNCTION_ARGS) { PG_RETURN_OID(get_fn_expr_argtype(fcinfo-flinfo, 0)); }

Re: [HACKERS] Index scan troubles

2008-09-02 Thread Tom Lane
Markus Wanner [EMAIL PROTECTED] writes: I'm having a hard time using an index scan. So far, I've done quite well with ScanKeyInit for equality searches. But now I need to scan an index from a given starting point. Something like: (x, y, z,...) (const, const, const,...) For the

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-02 Thread Tom Lane
David E. Wheeler [EMAIL PROTECTED] writes: Looks like regtype displays as an integer. Better try that again. regression=# select 1043::regtype; regtype --- character varying (1 row) regression=# I see no need for two functions here.

Re: [HACKERS] Question regarding the database page layout.

2008-09-02 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: The other 4 bytes you could save is by packing the whole tuples themselves more closely on the page. That happens when the item pointer is added and pointed to the tuple. To do that heap_form_tuple would have to return data back to the caller about the

Re: [HACKERS] Mysterious Bus Error with get_fn_expr_argtype()

2008-09-02 Thread David E. Wheeler
On Sep 2, 2008, at 11:06, Tom Lane wrote: Better try that again. regression=# select 1043::regtype; regtype --- character varying (1 row) regression=# I see no need for two functions here. Oh. I tried: try=# select 1::regtype; regtype - 1 I had assumed that

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Alvaro Herrera
Radek Strnad escribió: Ok, so do you suggest to leave it with a notice reindex database or start to solve it somehow? I don't know. If there are two tasks that need the same treatment, it seems a safe conclusion that they need a common solution. -- Alvaro Herrera

Re: [HACKERS] Index scan troubles

2008-09-02 Thread Markus Wanner
Hi, Gregory Stark wrote: It's right for your equality case which is effectively x=const, y=const, z=const. It's not for row comparisons case for which you need a funny header ScanKey. See the comments in access/skey.h, search for row comparisons. I'm not sure if there's a function to create

Re: [HACKERS] WIP patch: Collation support

2008-09-02 Thread Tom Lane
Martijn van Oosterhout [EMAIL PROTECTED] writes: And I think that's backwards. Why can we only use a feature once every OS out there implements it? We still run on systems that don't have SSL support. LC_TYPE settings are not portable between systems, yet that doesn't bother anyone. Why should

Re: [HACKERS] Page layout footprint

2008-09-02 Thread Zdenek Kotala
Zdenek Kotala napsal(a): 32/64 bit issue is little bit different story and it is general (not only SPARC but on SPARC has bigger impact). Problem is that CRC32 gives probably different result when it is compiled 32bit or 64bit. I'm going to examine it more. I'm sorry about noise.

[HACKERS] make dist does not include man.tar.gz and postgres.tar.gz

2008-09-02 Thread Alvaro Herrera
Hi, Devrim has been trying to set up RPM files for 8.4devel. However, the tarballs he is generating are not alike those found in our FTP site; official ones include manpages and HTML docs as man.tar.gz and postgres.tar.gz, but a simple make dist does not seem to include them. I'm wondering how

Re: [HACKERS] [PATCH] Make gram.y use palloc/pfree for memory management

2008-09-02 Thread Tom Lane
Marko Kreen [EMAIL PROTECTED] writes: On 9/1/08, Marko Kreen [EMAIL PROTECTED] wrote: First a correction, overriding malloc/free seems dangerous they seems to leak out, so correct would be to use YYMALLOC/YYFREE. This leaves 1.875 potentially leaking, but danger seems small. Here is the

Re: [HACKERS] make dist does not include man.tar.gz and postgres.tar.gz

2008-09-02 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: I'm wondering how are these things supposed to be generated. Does Marc create the regular tarballs using make dist, and then unpack them and include the other tarballs inside? Does he use a different make target? I think you need make distprep first.

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Marko Kreen [EMAIL PROTECTED] writes: Uh. So you want force proper units in presentations at the price of everyday admin operations? Does not seem like a sensible tradeoff. It didn't to anyone else when Peter wrote the current version either, but as

Re: [HACKERS] [PATCH] Cleanup of GUC units code

2008-09-02 Thread Asko Oja
Anything that will reduce potential downtime should be way to go. To me it seems that Peter uses the loudest voice and others just don't care enough. Using kB for kilobyte seems quite alien and confusing. I have not noticed that to be used in software i use in my everyday work and could not find

  1   2   >