Re: [HACKERS] SSI predicate locking on heap -- tuple or row?

2011-06-02 Thread Dan Ports
On Wed, Jun 01, 2011 at 05:09:09PM -0500, Kevin Grittner wrote: > I won't be shocked if Dan can come up with a shorter proof, but I'm > confident this one is solid. Well, so happens I wrote a proof on the airplane today, before I saw your mail. It's actually quite straightforward... (well, at leas

[HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread HuangQi
Hi, I'm doing a hacking project which hacks the gram.y file and some other so that postgres can execute some query plan language to run a particular plan. I did some modifications and try run it. It compiled and installed successfully. But when I was trying to run a MergeJoin operation with key

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread Pavel Stehule
Hello you should to add new keywords to postgresql/src/include/parser/kwlist.h (depends on pg version) attention - keywords must be in alphabet order Regards Pavel Stehule 2011/6/2 HuangQi : > Hi, >     I'm doing a hacking project which hacks the gram.y file and some other > so that postgres c

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread HuangQi
Yes, I've also added mergejoin to kwlist.h as unreserved_keyword. In order to build AST, I also keep a new node struct in planoperators.h and a new node tag inside nodes.h. On 2 June 2011 15:49, Pavel Stehule wrote: > Hello > > you should to add new keywords to > postgresql/src/include/parser/kw

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread Pavel Stehule
Hello 2011/6/2 HuangQi : > Yes, I've also added mergejoin to kwlist.h as unreserved_keyword. In order > to build AST, I also keep a new node struct in planoperators.h and a new > node tag inside nodes.h. > then recheck alphabet order of keywords, else recheck bison rules. Pavel > On 2 June 201

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Pavel Golub
Hello, Merlin. You wrote: MM> 2011/6/1 Pavel Golub : >> Hello. >> >> I'm some kind of PQdeleteTuple function will be very usefull in libpq. >> Because right now after deleting some record I need refetch result >> set, or mark tuple as deleted and this is headache for me. >> >> So I checked fe-exe

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Pavel Golub
Hello, Andrew. You wrote: AC> On 6/1/2011 11:43 AM, Pavel Golub wrote: >> Hello. >> >> I'm some kind of PQdeleteTuple function will be very usefull in libpq. >> Because right now after deleting some record I need refetch result >> set, or mark tuple as deleted and this is headache for me. >> AC>

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Pavel Golub
Hello. So having studied the fe-exec.c sources, I came to this conclusion: we may just ignore deleted tuple and it will be destroyed by PQclear automatically, becuase PQclear deals with memory blocks. int PQdeleteTuple(PGresult *src, int tup_num) { if (!src) return NULL;

Re: [HACKERS] Cube Index Size

2011-06-02 Thread Teodor Sigaev
Can we figure out some information about index i.e. whet is the height of index tree, how many values are placed in one leaf node and one non leaf level node? http://www.sigaev.ru/cvsweb/cvsweb.cgi/gevel/ -- Teodor Sigaev E-mail: teo...@sigaev.ru

[HACKERS] patch: enhanced get diagnostics statement 2

2011-06-02 Thread Pavel Stehule
Hello This patch enhances a GET DIAGNOSTICS statement functionality. It adds a possibility of access to exception's data. These data are stored on stack when exception's handler is activated - and these data are access-able everywhere inside handler. It has a different behave (the content is immut

Re: [HACKERS] Re: patch review : Add ability to constrain backend temporary file space

2011-06-02 Thread Mark Kirkwood
On 02/06/11 18:34, Jaime Casanova wrote: On Wed, Jun 1, 2011 at 6:35 PM, Mark Kirkwood wrote: I've created a new patch (attached) Hi Mark, A few comments: - why only superusers can set this? if this is a per-backend setting, i don't see the problem in allowing normal users to restrict thei

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread Andrew Dunstan
On 06/02/2011 03:28 AM, HuangQi wrote: Hi, I'm doing a hacking project which hacks the gram.y file and some other so that postgres can execute some query plan language to run a particular plan. I did some modifications and try run it. It compiled and installed successfully. But when I wa

Re: [HACKERS] BLOB support

2011-06-02 Thread Peter Eisentraut
On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: > I partialy implemented following missing LOBs types. Requirement for this was > to give ability to create (B/C)LOB columns and add casting functionality e.g. > SET my_clob = 'My long text'. > > Idea is as follow: > 0. Blob is two state

Re: [HACKERS] BLOB support

2011-06-02 Thread Pavel Stehule
2011/6/2 Peter Eisentraut : > On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: >> I partialy implemented following missing LOBs types. Requirement for this was >> to give ability to create (B/C)LOB columns and add casting functionality e.g. >> SET my_clob = 'My long text'. >> >> Idea is a

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread Heikki Linnakangas
On 02.06.2011 15:16, Andrew Dunstan wrote: On 06/02/2011 03:28 AM, HuangQi wrote: Hi, I'm doing a hacking project which hacks the gram.y file and some other so that postgres can execute some query plan language to run a particular plan. I did some modifications and try run it. It compiled and in

Re: [HACKERS] BLOB support

2011-06-02 Thread k...@rice.edu
On Thu, Jun 02, 2011 at 02:58:52PM +0200, Pavel Stehule wrote: > 2011/6/2 Peter Eisentraut : > > On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: > >> I partialy implemented following missing LOBs types. Requirement for this > >> was > >> to give ability to create (B/C)LOB columns and ad

Re: [HACKERS] BLOB support

2011-06-02 Thread Pavel Golub
Hello, Pavel. You wrote: PS> 2011/6/2 Peter Eisentraut : >> On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: >>> I partialy implemented following missing LOBs types. Requirement for this >>> was >>> to give ability to create (B/C)LOB columns and add casting functionality >>> e.g. >>>

Re: [HACKERS] BLOB support

2011-06-02 Thread Radosław Smogura
On Thu, 02 Jun 2011 15:39:39 +0300, Peter Eisentraut wrote: On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: I partialy implemented following missing LOBs types. Requirement for this was to give ability to create (B/C)LOB columns and add casting functionality e.g. SET my_clob = 'My l

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Merlin Moncure
On Thu, Jun 2, 2011 at 3:24 AM, Pavel Golub wrote: > MM> well, you have PQaddTuple, but this was exposed mainly for the purpose > MM> of building a PQresult from outside the libpq library -- not so much > MM> to remove the 'constness' property of the PGResult.  I have no > MM> philosophical object

Re: [HACKERS] Re: patch review : Add ability to constrain backend temporary file space

2011-06-02 Thread Robert Haas
On Wed, Jun 1, 2011 at 7:35 PM, Mark Kirkwood wrote: > Done - 'work_disk' it is to match 'work_mem'. I guess I'm bikeshedding here, but I'm not sure I really buy this parallel. work_mem is primarily a query planner parameter; it says, if you're going to need more memory than this, then you have

Re: [HACKERS] BLOB support

2011-06-02 Thread Pavel Stehule
2011/6/2 Pavel Golub : > Hello, Pavel. > > You wrote: > > PS> 2011/6/2 Peter Eisentraut : >>> On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: I partialy implemented following missing LOBs types. Requirement for this was to give ability to create (B/C)LOB columns and add c

Re: [HACKERS] BLOB support

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 9:29 AM, Radosław Smogura wrote: >> What functionality exactly do you envision that the BLOB and CLOB types >> would >> need to have that would warrant treating them different from, say, bytea >> and text? > > Actually I thought about less sophisticated support of LOBs, supp

Re: [HACKERS] Identifying no-op length coercions

2011-06-02 Thread Alexey Klyukin
On May 24, 2011, at 12:15 AM, Noah Misch wrote: > On Mon, May 23, 2011 at 03:01:40PM -0400, Tom Lane wrote: >> Noah Misch writes: >>> Good deal. Given that conclusion, the other policy decision I anticipate >>> affecting this particular patch is the choice of syntax. Presumably, it >>> will b

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Andrew Chernow
On 6/2/2011 4:28 AM, Pavel Golub wrote: Hello, Andrew. You wrote: AC> On 6/1/2011 11:43 AM, Pavel Golub wrote: Hello. I'm some kind of PQdeleteTuple function will be very usefull in libpq. Because right now after deleting some record I need refetch result set, or mark tuple as deleted and th

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Robert Haas
On Wed, Jun 1, 2011 at 7:47 PM, Alvaro Herrera wrote: > Excerpts from Tatsuo Ishii's message of mié jun 01 19:08:16 -0400 2011: >> What pgpool really wanted to do was locking sequence tables, not >> locking rows in sequences. I wonder why the former is not allowed. > > Yeah -- why is LOCK SEQUENCE

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Robert Haas
On Wed, Jun 1, 2011 at 6:53 PM, Tom Lane wrote: > Please note also that what pgpool users have got right now is a time > bomb, which is not better than immediately-visible breakage.  I would > prefer to try to get this change out ahead of widespread adoption of the > broken pgpool version. Hmm, I

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Tom Lane
Robert Haas writes: > On Wed, Jun 1, 2011 at 7:47 PM, Alvaro Herrera > wrote: >> Yeah -- why is LOCK SEQUENCE foo_seq not allowed?  Seems a simple thing >> to have. > It cause a grammar conflict. That's a lot of work for a purely cosmetic issue, though. What would be trivial is to let this wor

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Pavel Golub
Hello, Andrew. You wrote: AC> On 6/2/2011 4:28 AM, Pavel Golub wrote: >> Hello, Andrew. >> >> You wrote: >> >> AC> On 6/1/2011 11:43 AM, Pavel Golub wrote: Hello. I'm some kind of PQdeleteTuple function will be very usefull in libpq. Because right now after deleting some reco

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Andrew Chernow
AC> IMHO, this should be handled by the application. You could track tuples AC> removed in an int[] or copy the result set into an application defined AC> array of C structures. I've always been under the impression that AC> PGresult objects are immutable once delivered to the application. Andre

Re: [HACKERS] Bad UI design: pg_ctl and data_directory

2011-06-02 Thread Robert Haas
On Wed, Jun 1, 2011 at 7:07 PM, Tom Lane wrote: > Alvaro Herrera writes: >> Excerpts from Robert Haas's message of mié jun 01 18:22:56 -0400 2011: >>> ISTM that it would be useful to run postgres in a mode where it >>> doesn't actually try to start up the database, but parses >>> postgresql.conf

Re: [HACKERS] Re: patch review : Add ability to constrain backend temporary file space

2011-06-02 Thread Tom Lane
Robert Haas writes: > So I'm not sure work_disk is a great name. I agree. Maybe something along the lines of "temp_file_limit"? Also, once you free yourself from the analogy to work_mem, you could adopt some more natural unit than KB. I'd think MB would be a practical unit size, and would avoi

Re: [HACKERS] BLOB support

2011-06-02 Thread Tom Lane
Robert Haas writes: > But these problems can be fixed without inventing a completely new > system, I think. Or at least we should try. I can see the point of a > data type that is really a pointer to a LOB, and the LOB gets deleted > when the pointer is removed, but I don't think that should req

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Tom Lane
Robert Haas writes: > Ugh. We are already stuck supporting all kinds of backward > compatibility cruft in tablecmds.c as a result of the fact that you > used to have to use ALTER TABLE to operate on views and sequences. > The whole thing is confusing and a mess. [ shrug... ] I don't find it so.

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Tom Lane
Marko Kreen writes: > Here's my attempt for it. As conditional port module seems trouble, > I set up an unconditional pgGetpeereid() that is always defined. -1 ... why would you think that a conditional substitution is trouble? We have plenty of others. regards, tom lane

Re: [HACKERS] Re: patch review : Add ability to constrain backend temporary file space

2011-06-02 Thread Cédric Villemain
2011/6/2 Robert Haas : > On Wed, Jun 1, 2011 at 7:35 PM, Mark Kirkwood > wrote: >> Done - 'work_disk' it is to match 'work_mem'. > > I guess I'm bikeshedding here, but I'm not sure I really buy this > parallel.  work_mem is primarily a query planner parameter; it says, > if you're going to need mo

Re: [HACKERS] pg_listener in 9.0

2011-06-02 Thread Dave Page
On Wed, Jun 1, 2011 at 3:02 PM, Steve Singer wrote: > On 11-06-01 09:30 AM, Christopher Browne wrote: >> >> On Wed, Jun 1, 2011 at 8:29 AM, Dave Page  wrote: >>> >>> On Wed, Jun 1, 2011 at 12:27 PM, Andrew Dunstan >>>  wrote: The whole point of the revamp was that pg_listener was a major

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Alvaro Herrera
Excerpts from Andrew Chernow's message of jue jun 02 10:12:40 -0400 2011: > > Andrew, why we have PQmakeEmptyPGresult, PQcopyResult, > > PQsetResultAttrs, PQsetvalue and PQresultAlloc in this case? Of course > > there's no big deal with their absence but let's be consistent. > > I'm not entirely

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Marko Kreen
On Wed, Jun 1, 2011 at 1:03 AM, Tom Lane wrote: > Marko Kreen writes: >> My suggestion would be to use getpeereid() everywhere. >> And just have compat getpeereid() implementation on non-BSD >> platforms.  This would minimize ifdeffery in core core. > > Hm, maybe.  I'd be for this if we had more

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tom Lane's message of jue jun 02 10:31:58 -0400 2011: >> That's a lot of work for a purely cosmetic issue, though. What would be >> trivial is to let this work: >> regression=# lock table s1; >> ERROR: "s1" is not a table > Yeah, though it'd be nice to avo

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 10:31 AM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Jun 1, 2011 at 7:47 PM, Alvaro Herrera >> wrote: >>> Yeah -- why is LOCK SEQUENCE foo_seq not allowed?  Seems a simple thing >>> to have. > >> It cause a grammar conflict. > > That's a lot of work for a purely cosm

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Teodor Sigaev
isn't really specific to ANALYZE. I'm inclined to think that the most reasonable fix is to make get_sort_group_operators() and related Hm, patch is in attach but it doesn't solve all problems. Initial bug is still here for array of row type, but when I tried to change that with recursive call

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Alvaro Herrera
Excerpts from Tom Lane's message of jue jun 02 10:31:58 -0400 2011: > Robert Haas writes: > > On Wed, Jun 1, 2011 at 7:47 PM, Alvaro Herrera > > wrote: > >> Yeah -- why is LOCK SEQUENCE foo_seq not allowed? Seems a simple thing > >> to have. > > > It cause a grammar conflict. > > That's a lot o

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Pavel Golub
Hello, Alvaro. You wrote: AH> Excerpts from Andrew Chernow's message of jue jun 02 10:12:40 -0400 2011: >> > Andrew, why we have PQmakeEmptyPGresult, PQcopyResult, >> > PQsetResultAttrs, PQsetvalue and PQresultAlloc in this case? Of course >> > there's no big deal with their absence but let's be

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Marko Kreen
On Thu, Jun 2, 2011 at 5:49 PM, Tom Lane wrote: > Marko Kreen writes: >> Here's my attempt for it.  As conditional port module seems trouble, >> I set up an unconditional pgGetpeereid() that is always defined. > > -1 ... why would you think that a conditional substitution is trouble? > We have pl

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Alvaro Herrera
Excerpts from Merlin Moncure's message of jue jun 02 11:33:28 -0400 2011: > On Thu, Jun 2, 2011 at 10:02 AM, Alvaro Herrera > wrote: > > Seems pretty wasteful if you want to delete a single tuple from a large > > result.  I think if you desired to compact the result to free some > > memory after

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Andrew Dunstan
On 06/02/2011 11:29 AM, Marko Kreen wrote: As there was no going back now, I even touched msvc.pm. Why? Windows doesn't have Unix domain sockets at all. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.p

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Alvaro Herrera
Excerpts from Tom Lane's message of jue jun 02 11:10:00 -0400 2011: > Alvaro Herrera writes: > > Excerpts from Tom Lane's message of jue jun 02 10:31:58 -0400 2011: > >> That's a lot of work for a purely cosmetic issue, though. What would be > >> trivial is to let this work: > >> regression=# loc

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Merlin Moncure
On Thu, Jun 2, 2011 at 10:02 AM, Alvaro Herrera wrote: > Excerpts from Andrew Chernow's message of jue jun 02 10:12:40 -0400 2011: > >> > Andrew, why we have PQmakeEmptyPGresult, PQcopyResult, >> > PQsetResultAttrs, PQsetvalue and PQresultAlloc in this case? Of course >> > there's no big deal with

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Tom Lane
Teodor Sigaev writes: >> isn't really specific to ANALYZE. I'm inclined to think that the most >> reasonable fix is to make get_sort_group_operators() and related > Hm, patch is in attach but it doesn't solve all problems. Initial bug is > still > here for array of row type, but when I tried t

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread HuangQi
Hi, thanks a lot for your ideas. But I've done all these things. I've checked the gram.y and kwlist.h files many times but can not find what's wrong. So is there any possibility that the problem comes from something after parser, though it seems it should comes from parser? On 2 June 2011 21:14, H

Re: [HACKERS] BLOB support

2011-06-02 Thread Pavel Stehule
2011/6/2 Tom Lane : > Robert Haas writes: >> But these problems can be fixed without inventing a completely new >> system, I think.  Or at least we should try.  I can see the point of a >> data type that is really a pointer to a LOB, and the LOB gets deleted >> when the pointer is removed, but I d

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Andrew Dunstan
On 06/02/2011 12:04 PM, Marko Kreen wrote: On Thu, Jun 2, 2011 at 6:59 PM, Andrew Dunstan wrote: On 06/02/2011 11:29 AM, Marko Kreen wrote: As there was no going back now, I even touched msvc.pm. Why? Windows doesn't have Unix domain sockets at all. Because the function is still referenced

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Tom Lane
Andrew Dunstan writes: > On 06/02/2011 12:04 PM, Marko Kreen wrote: >> On Thu, Jun 2, 2011 at 6:59 PM, Andrew Dunstan wrote: >>> On 06/02/2011 11:29 AM, Marko Kreen wrote: As there was no going back now, I even touched msvc.pm. >>> Why? Windows doesn't have Unix domain sockets at all. >> Bec

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Andrew Chernow
On 6/2/2011 11:02 AM, Alvaro Herrera wrote: Excerpts from Andrew Chernow's message of jue jun 02 10:12:40 -0400 2011: Andrew, why we have PQmakeEmptyPGresult, PQcopyResult, PQsetResultAttrs, PQsetvalue and PQresultAlloc in this case? Of course there's no big deal with their absence but let's be

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Teodor Sigaev
I think we could just let this code assume success for type RECORD. It won't affect VACUUM/ANALYZE, since there are (for reasons that should now be obvious) no table or index columns of anonymous composite types. Of course, it's impossible to store anonymous composite type anywhere, but we still

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 10:47 AM, Tom Lane wrote: > Robert Haas writes: >> Ugh.  We are already stuck supporting all kinds of backward >> compatibility cruft in tablecmds.c as a result of the fact that you >> used to have to use ALTER TABLE to operate on views and sequences. >> The whole thing is

Re: [HACKERS] PQdeleteTuple function in libpq

2011-06-02 Thread Merlin Moncure
On Thu, Jun 2, 2011 at 10:57 AM, Alvaro Herrera wrote: > Excerpts from Merlin Moncure's message of jue jun 02 11:33:28 -0400 2011: >> On Thu, Jun 2, 2011 at 10:02 AM, Alvaro Herrera >> wrote: > >> > Seems pretty wasteful if you want to delete a single tuple from a large >> > result.  I think if y

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Marko Kreen
On Thu, Jun 2, 2011 at 7:20 PM, Andrew Dunstan wrote: > On 06/02/2011 12:04 PM, Marko Kreen wrote: >> On Thu, Jun 2, 2011 at 6:59 PM, Andrew Dunstan >>  wrote: >>> On 06/02/2011 11:29 AM, Marko Kreen wrote: As there was no going back now, I even touched msvc.pm. >>> >>> Why? Windows doesn't h

Re: [HACKERS] BLOB support

2011-06-02 Thread Radosław Smogura
Tom Lane Thursday 02 of June 2011 16:42:42 > Robert Haas writes: > > But these problems can be fixed without inventing a completely new > > system, I think. Or at least we should try. I can see the point of a > > data type that is really a pointer to a LOB, and the LOB gets deleted > > when the

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Marko Kreen
On Thu, Jun 2, 2011 at 6:59 PM, Andrew Dunstan wrote: > On 06/02/2011 11:29 AM, Marko Kreen wrote: >> As there was no going back now, I even touched msvc.pm. > > Why? Windows doesn't have Unix domain sockets at all. Because the function is still referenced in the code. -- marko -- Sent via pg

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Tom Lane
Marko Kreen writes: >> -1 ... why would you think that a conditional substitution is trouble? >> We have plenty of others. > Because it required touching autoconf. ;) > So now I did it. I hope it was that simple. Applied with minor adjustments --- notably, I didn't agree with removing the speci

Re: [HACKERS] Re: patch review : Add ability to constrain backend temporary file space

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 10:58 AM, Cédric Villemain wrote: > I am not specially attached to a name, idea was not to use work_disk > but backend_work_disk. I agree with you anyway, and suggestion from > Tom is fine for me (temp_file_limit). Yeah, I like that too. -- Robert Haas EnterpriseDB: http:

[HACKERS] InitProcGlobal cleanup

2011-06-02 Thread Robert Haas
While working on my patch to reduce the overhead of frequent table locks, I had cause to monkey with InitProcGlobal() and noticed that it's sort of a mess. For reasons that are not clear to me, it allocates one of the three PGPROC arrays using ShemInitStruct() and the other two using ShmemAlloc().

Re: [HACKERS] vacuum and row type

2011-06-02 Thread Tom Lane
Teodor Sigaev writes: >> I think we could just let this code assume success for type RECORD. It >> won't affect VACUUM/ANALYZE, since there are (for reasons that should >> now be obvious) no table or index columns of anonymous composite types. > Of course, it's impossible to store anonymous comp

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Andrew Dunstan
On 06/02/2011 01:04 PM, Alvaro Herrera wrote: Excerpts from Marko Kreen's message of jue jun 02 12:45:04 -0400 2011: On Thu, Jun 2, 2011 at 7:31 PM, Alvaro Herrera wrote: Excerpts from Andrew Dunstan's message of jue jun 02 11:59:02 -0400 2011: On 06/02/2011 11:29 AM, Marko Kreen wrote: A

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Alvaro Herrera
Excerpts from Andrew Dunstan's message of jue jun 02 11:59:02 -0400 2011: > > On 06/02/2011 11:29 AM, Marko Kreen wrote: > > > > As there was no going back now, I even touched msvc.pm. > > Why? Windows doesn't have Unix domain sockets at all. So much for being thorough :-P -- Álvaro Herrera T

Re: [HACKERS] creating CHECK constraints as NOT VALID

2011-06-02 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of mié jun 01 20:56:12 -0400 2011: > Excerpts from Thom Brown's message of mié jun 01 19:48:44 -0400 2011: > > > Is this expected? > > [ pg_dump fails to preserve not-valid status of constraints ] > > Certainly not. > > > Shouldn't the constraint be dumped

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread Alvaro Herrera
Excerpts from HuangQi's message of jue jun 02 11:17:21 -0400 2011: > Hi, thanks a lot for your ideas. But I've done all these things. I've > checked the gram.y and kwlist.h files many times but can not find what's > wrong. So is there any possibility that the problem comes from something > after pa

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Alvaro Herrera
Excerpts from Marko Kreen's message of jue jun 02 12:45:04 -0400 2011: > On Thu, Jun 2, 2011 at 7:31 PM, Alvaro Herrera > wrote: > > Excerpts from Andrew Dunstan's message of jue jun 02 11:59:02 -0400 2011: > >> On 06/02/2011 11:29 AM, Marko Kreen wrote: > >> > As there was no going back now, I ev

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Marko Kreen
On Thu, Jun 2, 2011 at 7:44 PM, Tom Lane wrote: > Marko Kreen writes: >> On Thu, Jun 2, 2011 at 7:20 PM, Andrew Dunstan wrote: >>> Then maybe we need to use "#ifndef WIN32" in those places. That's what we do >>> for similar cases. > >> No, that would be a bad idea - uglifies code for no good rea

Re: [HACKERS] InitProcGlobal cleanup

2011-06-02 Thread Tom Lane
Robert Haas writes: > While working on my patch to reduce the overhead of frequent table > locks, I had cause to monkey with InitProcGlobal() and noticed that > it's sort of a mess. For reasons that are not clear to me, it > allocates one of the three PGPROC arrays using ShemInitStruct() and > th

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Marko Kreen
On Thu, Jun 2, 2011 at 7:31 PM, Alvaro Herrera wrote: > Excerpts from Andrew Dunstan's message of jue jun 02 11:59:02 -0400 2011: >> On 06/02/2011 11:29 AM, Marko Kreen wrote: >> > As there was no going back now, I even touched msvc.pm. >> >> Why? Windows doesn't have Unix domain sockets at all. >

Re: [HACKERS] Please test peer (socket ident) auth on *BSD

2011-06-02 Thread Tom Lane
Marko Kreen writes: > On Thu, Jun 2, 2011 at 7:20 PM, Andrew Dunstan wrote: >> Then maybe we need to use "#ifndef WIN32" in those places. That's what we do >> for similar cases. > No, that would be a bad idea - uglifies code for no good reason. > The function is referenced undef IS_AF_UNIX() ch

[HACKERS] \d missing tab completion for composite types

2011-06-02 Thread Peter Eisentraut
Tab completion for \d currently does not complete composite types, even though \d works for composite types. That's easy to be fixed, but I have two more general questions: Since \d is happy to describe any kind of pg_class entry, should we also remove the relkind restriction in what tab-complete

Re: [HACKERS] storing TZ along timestamps

2011-06-02 Thread Steve Crawford
On 06/01/2011 05:18 PM, Alvaro Herrera wrote: Excerpts from Jeff Davis's message of mié jun 01 19:57:40 -0400 2011: On Fri, 2011-05-27 at 16:43 -0400, Alvaro Herrera wrote: Hi, One of our customers is interested in being able to store original timezone along with a certain timestamp. I assume

Re: [HACKERS] storing TZ along timestamps

2011-06-02 Thread Alvaro Herrera
Excerpts from Merlin Moncure's message of mié jun 01 21:36:32 -0400 2011: > On Wed, Jun 1, 2011 at 8:18 PM, Alvaro Herrera > wrote: > > Excerpts from Jeff Davis's message of mié jun 01 19:57:40 -0400 2011: > >> On Fri, 2011-05-27 at 16:43 -0400, Alvaro Herrera wrote: > >> > Hi, > >> > > >> > One o

Re: [HACKERS] BLOB support

2011-06-02 Thread Tom Lane
=?utf-8?q?Rados=C5=82aw_Smogura?= writes: > Tom Lane Thursday 02 of June 2011 16:42:42 >> Yes. I think the appropriate problem statement is "provide streaming >> access to large field values, as an alternative to just fetching/storing >> the entire value at once". I see no good reason to import

Re: [HACKERS] SSI predicate locking on heap -- tuple or row?

2011-06-02 Thread Kevin Grittner
Dan Ports wrote: > On Wed, Jun 01, 2011 at 05:09:09PM -0500, Kevin Grittner wrote: >> Published papers have further proven that the transaction which >> appears to have executed last of these three must actually commit >> before either of the others for an anomaly to occur. > > We can actually

Re: [HACKERS] Hacking gram.y Error syntax error at or near "MERGEJOIN"

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 11:17 AM, HuangQi wrote: > Hi, thanks a lot for your ideas. But I've done all these things. I've > checked the gram.y and kwlist.h files many times but can not find what's > wrong. So is there any possibility that the problem comes from something > after parser, though it se

[HACKERS] Estimating total amount of shared memory required by postmaster

2011-06-02 Thread Alexey Klyukin
Hello, We've recently come across the task of estimating the size of shared memory required for PostgreSQL to start. This comes from the problem of validating postgresql.conf files (http://archives.postgresql.org/pgsql-hackers/2011-03/msg01831.php), i.e. checking that the server will be able to st

Re: [HACKERS] storing TZ along timestamps

2011-06-02 Thread Jeff Davis
On Thu, 2011-06-02 at 18:46 +, Christopher Browne wrote: > > 1. How would the time-zone be defined in this composite? Offset from GMT? > > Timezone (well, link thereto) with all DST rules intact? Would "extract" > > need to be modified to include the ability to grab the timezone? > > That does

Re: [HACKERS] storing TZ along timestamps

2011-06-02 Thread Christopher Browne
On Thu, Jun 2, 2011 at 6:06 PM, Steve Crawford wrote: > On 06/01/2011 05:18 PM, Alvaro Herrera wrote: >> >> Excerpts from Jeff Davis's message of mié jun 01 19:57:40 -0400 2011: >>> >>> On Fri, 2011-05-27 at 16:43 -0400, Alvaro Herrera wrote: Hi, One of our customers is interes

[HACKERS] Re: patch review : Add ability to constrain backend temporary file space

2011-06-02 Thread Greg Stark
On Thu, Jun 2, 2011 at 7:36 AM, Tom Lane wrote: > Also, once you free yourself from the analogy to work_mem, you could > adopt some more natural unit than KB.  I'd think MB would be a practical > unit size, and would avoid (at least for the near term) the need to make > the parameter a float. As

Re: [HACKERS] storing TZ along timestamps

2011-06-02 Thread Jeff Davis
On Fri, 2011-05-27 at 16:43 -0400, Alvaro Herrera wrote: > One of our customers is interested in being able to store original > timezone along with a certain timestamp. Another thing to consider is that this will eliminate any useful total order. You could define an arbitrary total order, of cour

Re: [HACKERS] InitProcGlobal cleanup

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 1:53 PM, Tom Lane wrote: > Robert Haas writes: >> While working on my patch to reduce the overhead of frequent table >> locks, I had cause to monkey with InitProcGlobal() and noticed that >> it's sort of a mess.  For reasons that are not clear to me, it >> allocates one of

Re: [HACKERS] storing TZ along timestamps

2011-06-02 Thread Merlin Moncure
On Thu, Jun 2, 2011 at 12:55 PM, Alvaro Herrera wrote: >> >> > One of our customers is interested in being able to store original >> >> > timezone along with a certain timestamp. >> >> >> >> I assume that you're talking about a new data type, not augmenting the >> >> current types, correct? >> > >

Re: [HACKERS] Estimating total amount of shared memory required by postmaster

2011-06-02 Thread Tom Lane
Alexey Klyukin writes: > We've recently come across the task of estimating the size of shared memory > required for PostgreSQL to start. > ... > - Try to actually allocate the shared memory in a way postmaster does this > nowadays, if the process fails - analyze the error code to check whether

Re: [HACKERS] pgpool versus sequences

2011-06-02 Thread Tom Lane
Robert Haas writes: > On Wed, Jun 1, 2011 at 6:53 PM, Tom Lane wrote: >> Please note also that what pgpool users have got right now is a time >> bomb, which is not better than immediately-visible breakage.  I would >> prefer to try to get this change out ahead of widespread adoption of the >> bro

Re: [HACKERS] BLOB support

2011-06-02 Thread Radosław Smogura
Tom Lane Thursday 02 of June 2011 19:43:16 > =?utf-8?q?Rados=C5=82aw_Smogura?= writes: > > Tom Lane Thursday 02 of June 2011 16:42:42 > > > >> Yes. I think the appropriate problem statement is "provide streaming > >> access to large field values, as an alternative to just fetching/storing > >>

Re: [HACKERS] Domains versus polymorphic functions, redux

2011-06-02 Thread Robert Haas
On Tue, May 24, 2011 at 2:54 PM, Tom Lane wrote: > "David E. Wheeler" writes: >> On May 24, 2011, at 11:30 AM, Tom Lane wrote: >>> I guess that the question that's immediately at hand is sort of a >>> variant of that, because using a polymorphic function declared to take >>> ANYARRAY on a domain-

Re: [HACKERS] InitProcGlobal cleanup

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 3:13 PM, Tom Lane wrote: > Robert Haas writes: >> OK, here's a version with more comments. > > Looks OK to me, assuming you've checked that the right number of PGPROCs > are getting created (in particular the AV launcher is no longer > accounted for explicitly). That shoul

Re: [HACKERS] Identifying no-op length coercions

2011-06-02 Thread Noah Misch
Hi Alexey, On Thu, Jun 02, 2011 at 05:08:51PM +0300, Alexey Klyukin wrote: > Looks like this thread has silently died out. Is there an agreement on the > syntax and implementation part? We (CMD) have a customer, who is interested in > pushing this through, so, if we have a patch, I'd be happy to a

Re: [HACKERS] InitProcGlobal cleanup

2011-06-02 Thread Tom Lane
Robert Haas writes: > OK, here's a version with more comments. Looks OK to me, assuming you've checked that the right number of PGPROCs are getting created (in particular the AV launcher is no longer accounted for explicitly). regards, tom lane -- Sent via pgsql-hackers

Re: [HACKERS] BLOB support

2011-06-02 Thread Tomas Vondra
Dne 2.6.2011 15:49, Pavel Stehule napsal(a): > 2011/6/2 Pavel Golub : >> Hello, Pavel. >> >> You wrote: >> >> PS> 2011/6/2 Peter Eisentraut : On ons, 2011-06-01 at 22:00 +0200, Radosław Smogura wrote: > I partialy implemented following missing LOBs types. Requirement for this > was >>

9.2 branch and 9.1beta2 timing (was Re: [HACKERS] InitProcGlobal cleanup)

2011-06-02 Thread Tom Lane
Robert Haas writes: > I'll commit this to 9.2 after we branch. (When are we doing that, BTW?) Sometime in the next two weeks I guess ;-). At the PGCon meeting we said 1 June, but seeing that we still have a couple of open beta2 issues I'm not in a hurry. I think a reasonable plan would be to f

Re: [HACKERS] BLOB support

2011-06-02 Thread Tomas Vondra
Dne 2.6.2011 15:18, k...@rice.edu napsal(a): > On Thu, Jun 02, 2011 at 02:58:52PM +0200, Pavel Stehule wrote: >> 2011/6/2 Peter Eisentraut : >>> Superficially, this looks like a reimplementation of TOAST. What >>> functionality exactly do you envision that the BLOB and CLOB types would >>> need to

Re: [HACKERS] Domains versus polymorphic functions, redux

2011-06-02 Thread Tom Lane
Robert Haas writes: > On Tue, May 24, 2011 at 2:54 PM, Tom Lane wrote: >> I'm starting to think that maybe we should separate the two cases after >> all.  If we force a downcast for ANYARRAY matching, we will fix the loss >> of functionality induced by the bug #5717 patch, and it doesn't seem >>

Re: [HACKERS] BLOB support

2011-06-02 Thread Ross J. Reedstrom
On Thu, Jun 02, 2011 at 01:43:16PM -0400, Tom Lane wrote: > =?utf-8?q?Rados=C5=82aw_Smogura?= writes: > > Tom Lane Thursday 02 of June 2011 16:42:42 > >> Yes. I think the appropriate problem statement is "provide streaming > >> access to large field values, as an alternative to just fetching/sto

Re: 9.2 branch and 9.1beta2 timing (was Re: [HACKERS] InitProcGlobal cleanup)

2011-06-02 Thread Robert Haas
On Thu, Jun 2, 2011 at 4:42 PM, Tom Lane wrote: > Robert Haas writes: >> I'll commit this to 9.2 after we branch.  (When are we doing that, BTW?) > > Sometime in the next two weeks I guess ;-).  At the PGCon meeting we > said 1 June, but seeing that we still have a couple of open beta2 issues > I

Re: [HACKERS] SSI predicate locking on heap -- tuple or row?

2011-06-02 Thread Kevin Grittner
Heikki Linnakangas wrote: > On 30.05.2011 17:10, Kevin Grittner wrote: >> Heikki Linnakangas wrote: >>> * XXX: for an anomaly to occur, T2 must've committed >>> * before W. Couldn't we easily check that here, or does >>> * the fact that W committed already somehow imply it? >>

  1   2   >