[HACKERS] DROP USER weirdness in 7.2.1

2002-10-15 Thread Daniel Kalchev
I have encountered unexpected behavior of DROP USER in 7.2.1. One would normally expect, that when DROP USER someuser is issued, all associated data structures will be readjusted, especially ownership and access rights. This however does not happen. After droping an user, that had ownership

Re: [HACKERS] Bug in PL/pgSQL GET DIAGNOSTICS?

2002-10-15 Thread Michael Paesold
Tom Lane [EMAIL PROTECTED] wrote: Michael Paesold [EMAIL PROTECTED] writes: In a PL/pgSQL function I want to insert into a table and get the OID back. That usually works with GET DIAGNOSTICS last_oid = RESULT_OID; right after the insert statement. But if the table that I insert to

[HACKERS] French version of the PostgreSQL Advocacy and Marketing site is ready

2002-10-15 Thread Justin Clift
Hi everyone, Thanks to the French members of the PostgreSQL Community (mainly François Suter [EMAIL PROTECTED]), the French translation of the PostgreSQL Advocacy and Marketing site, is now complete and ready for public use: http://advocacy.postgresql.org/?lang=fr That's 4 completed languages

Re: [HACKERS] [GENERAL] Postgres-based system to run .org registry?

2002-10-15 Thread Andrew Sullivan
On Mon, Oct 14, 2002 at 12:42:37PM -0700, David De Graff wrote: Is this the same group that recently asked for input on their proposal, which specified Postgres as the registry database? Hi everyone, Yes, this is us. (Sorry I've been inactive the last week. I was on vacation.) What

Re: Disabling triggers (was Re: [HACKERS] pgsql 7.2.3 crash)

2002-10-15 Thread Gavin Sherry
On Mon, 14 Oct 2002, Tom Lane wrote: Gavin Sherry [EMAIL PROTECTED] writes: On Sat, 12 Oct 2002, Joe Conway wrote: Tom Lane wrote: Hackers: we might reasonably fix this by doing a deep copy of the relcache's trigger info during initResultRelInfo(); or we could fix it by getting rid of

Re: [HACKERS] Anyone want to assist with the translation of the Advocacy site?

2002-10-15 Thread am
On Tue, Oct 15, 2002 at 05:07:46AM +1000, Justin Clift wrote: Hi Adrian, Wow. That's pretty cool. :) No-one has offered to do Romanian yet, so you're very welcome to. First things first: - What is the two letter language identifier most often used for Romanian? i.e. fr = Franch,

[HACKERS] Current CVS - something broken in contrib

2002-10-15 Thread Teodor Sigaev
In any contrib module 'make installcheck' runs infinite time... For example, contrib/ltree % gmake installcheck gmake -C ../../src/test/regress pg_regress gmake[1]: ÷ÈÏÄ × ËÁÔÁÌÏÇ `/spool/home/teodor/pgsql/src/test/regress' gmake[1]: `pg_regress' ÎÅ ÔÒÅÂÕÅÔ ÏÂÎÏ×ÌÅÎÉÑ. gmake[1]: ÷ÙÈÏÄ ÉÚ ËÁÔÁÌÏÇ

Re: [HACKERS] Current CVS - something broken in contrib

2002-10-15 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: In any contrib module 'make installcheck' runs infinite time... Looks like my fault :-( ... will have it fixed in a few minutes (I seem to have broken psql for COPY FROM STDIN :-() regards, tom lane

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Joe Conway
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Good question. What is going to happen is that select() is going to be passed tv_sec = 1, and it is going to sleep for one second. Now, if select is interrupted, another time() call is going to be made. There is a very simple answer to

Re: [HACKERS] Current CVS - something broken in contrib

2002-10-15 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: In any contrib module 'make installcheck' runs infinite time... Actually, I had managed to break \copy, not COPY --- it seems the main regression tests exercise COPY but not \copy. It might be a good idea to change copy2.sql to exercise both ... Anyway,

Re: [HACKERS] orderRules() now a bad idea?

2002-10-15 Thread Jan Wieck
Tom Lane wrote: I just noticed that rewriteHandler.c contains a subroutine orderRules() that reorders the rules for a relation into the order non-instead rules qualified instead rules unqualified instead rules This conflicts with the feature we'd added to 7.3 to

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: The thing was that with the extra +1, I was repeatedly getting a wall-clock time of 2 seconds with a timeout set to 1 second. It seemed odd to have my 1 second timeout automatically turned into 2 seconds every time. That is odd; seems like you should get

Re: [HACKERS] oid2name and relfilenode

2002-10-15 Thread Peter Eisentraut
Bruce Momjian writes: Rename oid2name to relfilenode2name and install by default Actually, to be accurate, I think databases are stored based on their oid and tables/indexes are stored based on their relfilenode. That is pretty confusing. Do we still do the renaming? I don't think

Re: [HACKERS] orderRules() now a bad idea?

2002-10-15 Thread Peter Eisentraut
Bruce Momjian writes: Unless Jan has an objection, I think alpha is best, because it matches trigger rule odering. That original rule ordering isn't something anyone is going to figure out on their own. But alphabetical? According to whose definition of the alphabet? -- Peter Eisentraut

Re: [HACKERS] DROP USER weirdness in 7.2.1

2002-10-15 Thread Peter Eisentraut
Daniel Kalchev writes: One would normally expect, that when DROP USER someuser is issued, all associated data structures will be readjusted, especially ownership and access rights. Perhaps, but the documentation states otherwise. There is no way to remove rights of this 'user' 98 using

[HACKERS] foreign key problem with pg_dump under 7.3b2

2002-10-15 Thread John Halderman
I'm currently using 7.3b2 for test and development. I ran into a problem using a dumped schema from pg_dump. After importing the dumped schema, any delete or update involving a foreign key results in a relation 0 does not exist error. I noticed that all my foreign key declarations were moved from

Re: [HACKERS] foreign key problem with pg_dump under 7.3b2

2002-10-15 Thread Stephan Szabo
On 15 Oct 2002, John Halderman wrote: I'm currently using 7.3b2 for test and development. I ran into a problem using a dumped schema from pg_dump. After importing the dumped schema, any delete or update involving a foreign key results in a relation 0 does not exist error. I noticed that all

Re: [HACKERS] foreign key problem with pg_dump under 7.3b2

2002-10-15 Thread John Halderman
On Tue, 2002-10-15 at 15:12, Stephan Szabo wrote: On 15 Oct 2002, John Halderman wrote: I'm currently using 7.3b2 for test and development. I ran into a problem using a dumped schema from pg_dump. After importing the dumped schema, any delete or update involving a foreign key results in

[HACKERS] COPY syntax

2002-10-15 Thread Peter Eisentraut
According to the syntax diagram in the documenation, I can write COPY table TO STDOUT WITH BINARY OIDS; Shouldn't the binary, being an adjective, be attached to something? -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1:

Re: [HACKERS] foreign key problem with pg_dump under 7.3b2

2002-10-15 Thread John Halderman
On Tue, 2002-10-15 at 15:38, Stephan Szabo wrote: On 15 Oct 2002, John Halderman wrote: On Tue, 2002-10-15 at 15:12, Stephan Szabo wrote: On 15 Oct 2002, John Halderman wrote: I'm currently using 7.3b2 for test and development. I ran into a problem using a dumped schema from

Re: [HACKERS] oid2name and relfilenode

2002-10-15 Thread Bruce Momjian
Peter Eisentraut wrote: Bruce Momjian writes: Rename oid2name to relfilenode2name and install by default Actually, to be accurate, I think databases are stored based on their oid and tables/indexes are stored based on their relfilenode. That is pretty confusing. Do we still

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Bruce Momjian
Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: The thing was that with the extra +1, I was repeatedly getting a wall-clock time of 2 seconds with a timeout set to 1 second. It seemed odd to have my 1 second timeout automatically turned into 2 seconds every time. That is odd;

Re: [HACKERS] orderRules() now a bad idea?

2002-10-15 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: But alphabetical? According to whose definition of the alphabet? It looks like NAME comparison uses strcmp (actually strncmp). So it'll be numeric byte-code order. There's no particular reason we couldn't make that be strcoll instead, I suppose,

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: That is odd; seems like you should get between 1 and 2 seconds. How were you measuring the delay, exactly? Remember, that if you add 1, the select() is going to get tv_sec = 2, so yes, it will be two seconds. Yeah, but only if the

Re: [HACKERS] oid2name and relfilenode

2002-10-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: I will add these items to the TODO list, unless someone else votes. I was not thrilled with the idea of moving oid2name out of contrib either, but kept silent to see if someone else would complain first ... Basically I think that oid2name is a hacker's

Re: [HACKERS] oid2name and relfilenode

2002-10-15 Thread Bruce Momjian
OK, removed from TODO. I figured it was as useful as pg_controldata but can see what you say that those give information that you can't get any other way, while oid2name info can be gotten another way. You can look at the oid2name README for examples of its usage.

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: That is odd; seems like you should get between 1 and 2 seconds. How were you measuring the delay, exactly? Remember, that if you add 1, the select() is going to get tv_sec = 2, so yes, it will be two seconds.

Re: [HACKERS] [GENERAL] Postgres-based system to run .org registry?

2002-10-15 Thread Bruce Momjian
Andrew Sullivan wrote: On Mon, Oct 14, 2002 at 12:42:37PM -0700, David De Graff wrote: Is this the same group that recently asked for input on their proposal, which specified Postgres as the registry database? Hi everyone, Yes, this is us. (Sorry I've been inactive the last week. I

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Joe Conway
Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: The thing was that with the extra +1, I was repeatedly getting a wall-clock time of 2 seconds with a timeout set to 1 second. It seemed odd to have my 1 second timeout automatically turned into 2 seconds every time. That is odd;

[HACKERS] Vacuum improvement

2002-10-15 Thread Gavin Sherry
Hi all, I'm thinking that there is an improvement to vacuum which could be made for 7.4. VACUUM FULLing large, heavily updated tables is a pain. There's very little an application can do to minimise dead-tuples, particularly if the table is randomly updated. Wouldn't it be beneficial if VACUUM

Re: [HACKERS] COPY syntax

2002-10-15 Thread Bruce Momjian
Peter Eisentraut wrote: According to the syntax diagram in the documenation, I can write COPY table TO STDOUT WITH BINARY OIDS; Shouldn't the binary, being an adjective, be attached to something? Uh, it is attached to WITH? Seriously, yea, it doesn't read well, but it follows the WITH

Re: Changing Column Order (Was Re: [HACKERS] MySQL vs PostgreSQL.)

2002-10-15 Thread Jan Wieck
Bruce Momjian wrote: Alessio Bragadini wrote: On Sat, 2002-10-12 at 11:37, Gavin Sherry wrote: I cannot think of any reason why changing column order should be implemented in Postgres. Seems like a waste of time/more code bloat for something which is strictly asthetic.

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Greg Copeland
That a good idea. That way, if your database slows during specific windows in time, you can vacuum larger sizes, etc. Seemingly would help you better manage your vacuuming against system loading. Greg On Tue, 2002-10-15 at 19:22, Gavin Sherry wrote: Hi all, I'm thinking that there is an

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: [ some convincing test cases that timeout=1 is not good ] remains.tv_sec = atoi(conn-connect_timeout); + if (remains.tv_sec == 1) + remains.tv_sec += 1; if (!remains.tv_sec) {

Re: [HACKERS] [GENERAL] Postgres-based system to run .org registry?

2002-10-15 Thread Alvaro Herrera
En Tue, 15 Oct 2002 18:19:36 -0400 (EDT) Bruce Momjian [EMAIL PROTECTED] escribió: We are showing up in places I never expected: .org registry, tons of books, conventions, everywhere. It is just a wave that keeps getting bigger and bigger. I am starting to imagine what Linus felt seeing

Re: Changing Column Order (Was Re: [HACKERS] MySQL vs PostgreSQL.)

2002-10-15 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Jan Wieck wrote: When was char() fixed size? char() was fixed size only in that you could cache the column offsets for char() becuase it was always the same width on disk before TOAST. But that was already broken by MULTIBYTE.

Re: Changing Column Order (Was Re: [HACKERS] MySQL vs PostgreSQL.)

2002-10-15 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Jan Wieck wrote: When was char() fixed size? char() was fixed size only in that you could cache the column offsets for char() becuase it was always the same width on disk before TOAST. But that was already broken by MULTIBYTE.

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Tom Lane
Gavin Sherry [EMAIL PROTECTED] writes: have a parameter which specified how much of the table is vacuumed. That is, you could specify: VACUUM FULL test 20 precent; Erm ... but which 20 percent? In other words, how could you arrange for repeated applications of such a command to cover the

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Alvaro Herrera
On Tue, Oct 15, 2002 at 11:52:35PM -0400, Tom Lane wrote: Gavin Sherry [EMAIL PROTECTED] writes: have a parameter which specified how much of the table is vacuumed. That is, you could specify: VACUUM FULL test 20 precent; Erm ... but which 20 percent? In other words, how could you

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Joe Conway
Bruce Momjian wrote: Patch applied. I am applying it so it is in CVS and everyone can see it. I will keep modifying it until everyone likes it. It is just easier to do it that way when multiple people are reviewing it. They can jump in and make changes too. I ran the same test as before,

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Anuradha Ratnaweera
On Wed, Oct 16, 2002 at 12:59:57AM -0400, Bruce Momjian wrote: Anuradha Ratnaweera wrote: Is there any plans to make postgresql multithreading? We don't think it is needed, except perhaps for Win32 and Solaris, which have slow process creation times. Thanks, Bruce. But what I want to

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Bruce Momjian
Joe Conway wrote: Seems to work well. But one slight concern: with previous 2 line patch -- good connect info, using hostaddr, timeout = 1 || 2 second(s) = unsuccessful 0 times: avg n/a successful 2

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Gavin Sherry
On Wed, 16 Oct 2002, Anuradha Ratnaweera wrote: Is there any plans to make postgresql multithreading? Thanks in advance (and also for all who commented to my question regarding replication.) Anuradha NB: please don't open fire to declare war on whether multithreading is

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Bruce Momjian
Anuradha Ratnaweera wrote: On Wed, Oct 16, 2002 at 12:59:57AM -0400, Bruce Momjian wrote: Anuradha Ratnaweera wrote: Is there any plans to make postgresql multithreading? We don't think it is needed, except perhaps for Win32 and Solaris, which have slow process creation times.

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Anuradha Ratnaweera
On Wed, Oct 16, 2002 at 01:25:23AM -0400, Bruce Momjian wrote: Anuradha Ratnaweera wrote: ... what I want to know is whether multithreading is likely to get into in postgresql, say somewhere in 8.x, or even in 9.x? It may be optional some day, most likely for Win32 at first, but we see

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Joe Conway
Bruce Momjian wrote: Yes, the new code has _three_ time() calls, rather than the old code that I think only had two. I was going to mention it but I figured time() was a pretty light system call, sort of like getpid(). I needed the additional time() calls so the computation of remaining

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Bruce Momjian
Joe Conway wrote: Bruce Momjian wrote: Yes, the new code has _three_ time() calls, rather than the old code that I think only had two. I was going to mention it but I figured time() was a pretty light system call, sort of like getpid(). I needed the additional time() calls so the

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Gavin Sherry
On Wed, 16 Oct 2002, Anuradha Ratnaweera wrote: On Wed, Oct 16, 2002 at 01:25:23AM -0400, Bruce Momjian wrote: Anuradha Ratnaweera wrote: ... what I want to know is whether multithreading is likely to get into in postgresql, say somewhere in 8.x, or even in 9.x? It may be

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Bruce Momjian
Anuradha Ratnaweera wrote: On Wed, Oct 16, 2002 at 03:40:47PM +1000, Gavin Sherry wrote: On Wed, 16 Oct 2002, Anuradha Ratnaweera wrote: And a minor question is wheter it is legal to keep the _changes_ in such a project GPL? Do you mean 'relicence the forked copy'? Nope. To

Re: [HACKERS] Postgresql and multithreading

2002-10-15 Thread Bruce Momjian
Let me add one more thing on this thread. This is one email in a long list of Oh, gee, you aren't using that wizz-bang new sync/thread/aio/raid/raw feature discussion where someone shows up and wants to know why. Does anyone know how to address these, efficiently? If we discuss it, it ends up

Re: [HACKERS] droped out precise time calculations in src/interfaces/libpq/fe-connect.c

2002-10-15 Thread Joe Conway
Bruce Momjian wrote: Well, the fact you see a change of 0.0002 is significant. Let me add that in the old code there was only one time() call _in_ the loop, while now, there are two, so I can easily see there are several additional time() calls. Did you put your calls in the while loop?