Re: [HACKERS] bitmap AM design

2005-02-28 Thread Tom Lane
"Victor Y. Yegorov" <[EMAIL PROTECTED]> writes: > Neil suggested a very good way how to handle updates. Of course, it's not > necessary to strictly follow tuple layout in the table's heap, as I wanted > to do initially. All that's needed, is that bit positions in bitmaps would > be tied with CTID p

Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Josh Berkus
Mike, > I'm curious what kind of performance differences there would be over > using something like the nested-set model? > > Would this be faster, or slower? The answer is "yes".;-) Which tree structures you use depends on what you're trying to accomplish and what your use case is. There

Re: [HACKERS] mysterious log output

2005-02-28 Thread Tom Lane
Robert Treat <[EMAIL PROTECTED]> writes: > I keep seeing the following log output around every 5 minutes: > 2005-02-28 23:25:05 [8646] LOG: 0: QUERY STATISTICS This has to be coming from exec_simple_query(): if (save_log_statement_stats) ShowUsage("QUERY STATISTICS");

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Bruce Momjian
Bruce Momjian wrote: > I can confirm your failure in current sources on Win32: > > template1=# create table test(x int8); > CREATE TABLE > template1=# insert into test values ('4567890123456789'); > INSERT 17235 1 > template1=# select * from test; >x >

[HACKERS] mysterious log output

2005-02-28 Thread Robert Treat
I keep seeing the following log output around every 5 minutes: 2005-02-28 23:25:05 [8646] LOG: 0: QUERY STATISTICS DETAIL: ! system usage stats: ! 0.005023 elapsed 0.00 user 0.00 system sec ! [537.13 user 44.86 sys total] ! 0/0 [0/0]

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Bruce Momjian
Nicolai Tufar wrote: > Regression test diff is attached. > It fails on the following tests: >int8 >subselect >union >sequence > > It fails to display correctly number "4567890123456789". > In output is shows "-869367531". Apparent overflow or > interpreting int8 as int4. > > while

Re: [HACKERS] Execute and PortalSuspended needs explicit transaction

2005-02-28 Thread Oliver Jowett
Francisco Figueiredo Jr. wrote: After some testing, I could send an Execute message with 2 as the manx number of rows. After the second execute I get the following: portal "" does not exist Severity: ERROR Code: 34000 I noticed that I could only get it working if I explicitly create a transaction.

Re: [HACKERS] [pgsql-advocacy] Development Plans

2005-02-28 Thread Serguei A. Mokhov
Tom Lane wrote: > I wouldn't mind seeing people be a little more vocal on the hackers list > about what they plan to be doing, just so that there's not duplication > of effort. pg_upgrade -- Serguei A. Mokhov| /~\The ASCII Computer Science Department | \ / Ribbon Campaign Conc

Re: [HACKERS] [JDBC] Where are we on stored procedures?

2005-02-28 Thread Francisco Figueiredo Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Markus Schaber wrote: | Hi, Francisco, | | Francisco Figueiredo Jr. schrieb: | | |>In fact, I think people keep requesting me support on Npgsql for that |>because MS Sql server supports it and they are porting their code to use |>Postgresql and facing t

[HACKERS] Execute and PortalSuspended needs explicit transaction to work?

2005-02-28 Thread Francisco Figueiredo Jr.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm playing with Execute messages with a non-zero max number of rows so that I can get some PortalSuspended messages on Npgsql. After some testing, I could send an Execute message with 2 as the manx number of rows. After the second execute I ge

Re: [HACKERS] Thread-safe snprintf() vsnprintf() and printf()

2005-02-28 Thread Bruce Momjian
Patch applied. Thanks. --- Nicolai Tufar wrote: > And while we are on it, I would like to submit minor > changes to make snprintf() vsnprintf() and printf() > functions in src/port/snprintf.c thread-safe. > > Best regards

Re: [HACKERS] idea for concurrent seqscans

2005-02-28 Thread Simon Riggs
On Sat, 2005-02-26 at 10:47 -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > Assuming you're talkning about "You might wonder why we don't order all > > the regression test queries explicitly to get rid of this issue once and > > for all. The reason is that that would make th

[HACKERS] Thread-safe snprintf() vsnprintf() and printf()

2005-02-28 Thread Nicolai Tufar
And while we are on it, I would like to submit minor changes to make snprintf() vsnprintf() and printf() functions in src/port/snprintf.c thread-safe. Best regards, Nicolai Tufar Index: src/port/snprintf.c === RCS file: /projects/cvsr

Re: [PATCHES] [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Bruce Momjian
Nicolai Tufar wrote: > Neither Bruce's nor subsequent Tom's patch did not fix > the issue. The command used is: > > make maintainer-clean && ./configure && make && make install && make check > > It should have be fine to recompile the source code > completely. I attach the resulting config.log. M

Re: [PATCHES] [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Nicolai Tufar
Neither Bruce's nor subsequent Tom's patch did not fix the issue. The command used is: make maintainer-clean && ./configure && make && make install && make check It should have be fine to recompile the source code completely. I attach the resulting config.log. May be it will give a clue. Regressi

Re: [HACKERS] serial as FK ?

2005-02-28 Thread Oleg Bartunov
On Mon, 28 Feb 2005, Stephan Szabo wrote: On Mon, 28 Feb 2005, Oleg Bartunov wrote: what's wrong to use SERIAL as FK without explicit PRIMARY KEY or UNIQUE ? Serial isn't enough to guarantee uniqueness as required by foreign keys. you're certainly right ! Regards, Oleg

Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Pavel Stehule
On Mon, 28 Feb 2005, Evgen Potemkin wrote: > Ok, I'm started porting it to 8.0.1 and will fix this also. > By the way, did you know any test suit for such queries? To make some > regression test. > Hello, I can find some examples on internet and prepare regression tests. I think PostgreSQL can

Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Mike Benoit
I'm curious what kind of performance differences there would be over using something like the nested-set model? Would this be faster, or slower? On Thu, 2005-02-24 at 13:02 +0300, Evgen Potemkin wrote: > Hi hackers! > > I have done initial implementation of SQL99 WITH clause (attached). > It's n

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Tom Lane
[EMAIL PROTECTED] writes: > Do we have any idea about what format string causes the regression failure? I'll bet the problem is that configure.in is doing things in the wrong order: it computes INT64_FORMAT against the system printf before deciding we should use our own printf.

[HACKERS] bitmap AM design

2005-02-28 Thread Victor Y. Yegorov
Here's the design of bitmap AM I'm planning to implement. I've discussed it with Neil, but I'm willing to get more feedback on it. There are going to be 1 metapage, 1 list of CTIDs (LOC), one list of attribute values (LOV, including attributes for multi-column indexes) and a bitmap for each entry

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Nicolai Tufar
After some extensive debugging with Magnus's help we finally managed to a kind of isolate the problem. We placed snprintf.c in a separate file, added necessary #includes and wrote a simple main() function: main() { unsigned long long ull=4567890123456789ULL; static char buf[1024];

Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread David Fetter
On Mon, Feb 28, 2005 at 11:07:51AM +0300, Evgen Potemkin wrote: > Ok, I'm started porting it to 8.0.1 and will fix this also. By the > way, did you know any test suit for such queries? To make some > regression test. Evgen, Thanks very much for doing this work. Is there some way you can summar

Re: [HACKERS] serial as FK ?

2005-02-28 Thread Stephan Szabo
On Mon, 28 Feb 2005, Oleg Bartunov wrote: > what's wrong to use SERIAL as FK without explicit PRIMARY KEY or UNIQUE ? Serial isn't enough to guarantee uniqueness as required by foreign keys. ---(end of broadcast)--- TIP 8: explain analyze is your

Re: [HACKERS] [pgsql-advocacy] Development Plans

2005-02-28 Thread Simon Riggs
Thanks to all replies on this thread over last few days, many good point and useful contributions, thank you. [Please excuse many non-replies, since I've been ill.] On Fri, 2005-02-25 at 09:41 -0800, Josh Berkus wrote: > > - What are you working towards? Performance? Stability? X? > > X, definite

Re: [pgsql-hackers-win32] [HACKERS] win32 performance - fsync question

2005-02-28 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] on behalf of Bruce Momjian Sent: Sun 2/27/2005 12:54 AM To: Magnus Hagander Cc: Tom Lane; pgsql-hackers@postgresql.org; [EMAIL PROTECTED]; Merlin Moncure Subject: Re: [pgsql-hackers-win32] [HACKERS] win32 performance - fsync question > Patch

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread pgsql
> Linux and Solaris 10 x86 pass regression tests fine when I force the use > of new > snprintf(). The problem should be win32 - specific. I will > investigate it throughly > tonight. Can someone experienced in win32 what can possibly be the > problem? Do we have any idea about what format string

Re: [HACKERS] SQL99 Hierarchical queries

2005-02-28 Thread Evgen Potemkin
Ok, I'm started porting it to 8.0.1 and will fix this also. By the way, did you know any test suit for such queries? To make some regression test. Regards, Evgen > I tested you patch, and it's good work. I would all methods in PostgreSQL. > I found query which kill backand > > WITH t AS ( > SE

[HACKERS] serial as FK ?

2005-02-28 Thread Oleg Bartunov
Hi there, what's wrong to use SERIAL as FK without explicit PRIMARY KEY or UNIQUE ? qq=# create table t1( id serial); NOTICE: CREATE TABLE will create implicit sequence "t1_id_seq" for "serial" column "t1.id" CREATE TABLE qq=# create table t2( id2 int4 references t1(id)); ERROR: there is no uniq

Re: [HACKERS] serial as FK ?

2005-02-28 Thread Richard Huxton
Oleg Bartunov wrote: Hi there, what's wrong to use SERIAL as FK without explicit PRIMARY KEY or UNIQUE ? qq=# create table t1( id serial); NOTICE: CREATE TABLE will create implicit sequence "t1_id_seq" for "serial" column "t1.id" CREATE TABLE qq=# create table t2( id2 int4 references t1(id)); ERR

Re: [HACKERS] Problems With PGAdmin

2005-02-28 Thread Andreas Pflug
Thiago Luiz wrote: Hello everybody, I'm having a problem with pgadmin II and III. When I try to access a database it crash may system and I have to close it. I talk to my friends and they have the same problem when they try to acces this database. We can access this by a php page or asp but w

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Nicolai Tufar
Linux and Solaris 10 x86 pass regression tests fine when I force the use of new snprintf(). The problem should be win32 - specific. I will investigate it throughly tonight. Can someone experienced in win32 what can possibly be the problem? Nick On Sun, 27 Feb 2005 19:07:16 +0100, Magnus Hagand

Re: [HACKERS] Finding if old transactions are running...

2005-02-28 Thread Christopher Browne
I can see this function available in the backend: TransactionId GetOldestXmin(bool alldbs); The cost is based on walking thru each backend process, which I guess is obvious, as if there are 47 backends, that means 47 xids. Presumably not _too_ expensive; certainly something that has to be run

Re: [HACKERS] snprintf causes regression tests to fail

2005-02-28 Thread Bruce Momjian
Nicolai Tufar wrote: > Linux and Solaris 10 x86 pass regression tests fine when I force the use of > new > snprintf(). The problem should be win32 - specific. I will > investigate it throughly > tonight. Can someone experienced in win32 what can possibly be the problem? Yea, I am confused too

Re: [HACKERS] serial as FK ?

2005-02-28 Thread Oleg Bartunov
On Mon, 28 Feb 2005, Richard Huxton wrote: Oleg Bartunov wrote: Hi there, what's wrong to use SERIAL as FK without explicit PRIMARY KEY or UNIQUE ? qq=# create table t1( id serial); NOTICE: CREATE TABLE will create implicit sequence "t1_id_seq" for "serial" column "t1.id" CREATE TABLE qq=# create

Re: [HACKERS] idea for concurrent seqscans

2005-02-28 Thread Gaetano Mendola
Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > >>Assuming you're talkning about "You might wonder why we don't order all >>the regression test queries explicitly to get rid of this issue once and >>for all. The reason is that that would make the regression tests less >>useful, not

Re: [HACKERS] Finding if old transactions are running...

2005-02-28 Thread Christopher Browne
In an attempt to throw the authorities off his trail, Christopher Browne <[EMAIL PROTECTED]> transmitted: > It sure would be nice to be able to have a way to query the start > time of the eldest transaction on the system. I can see this function available in the backend: TransactionId GetOlde

[HACKERS] [Mail Delivery System ] Mail delivery failed: returning message to sender

2005-02-28 Thread Greg Stark
Incidentally, Tom, you seem to be using a pretty bogus blackhole list that includes blocking static address assignments based on the DNS records. I doubt this achieves much in the way of spam filtering, but it's preventing you from getting my mails. (Perhaps that's a good thing) --- Begin Messag

[HACKERS] Problems With PGAdmin

2005-02-28 Thread Thiago Luiz
Hello everybody, I'm having a problem with pgadmin II and III. When I try to access a database it crash may system and I have to close it. I talk to my friends and they have the same problem when they try to acces this database. We can access this by a php page or asp but we can't do it by t

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-28 Thread Keith Worthington
On Thu, 24 Feb 2005 17:15:42 -0500, Tom Lane wrote > Bruce Momjian writes: > > Uh, that seems like it adds extra complexity just for this single case. > > Yeah. I've dropped the idea personally -- the suggestion that the table > owner can provide a SECURITY DEFINER procedure to do the TRUNCATE i

Re: [JDBC] [HACKERS] Where are we on stored procedures?

2005-02-28 Thread Markus Schaber
Hi, Tom, Tom Lane schrieb: > Yeah, but only because you have to do it explicitly. I was wondering > whether we couldn't bury that mechanism under the hood. (In particular, > given the improved support in 8.0 for anonymous record types, we could > in theory have the backend invent a record type

Re: [HACKERS] [JDBC] Where are we on stored procedures?

2005-02-28 Thread Markus Schaber
Hi, Francisco, Francisco Figueiredo Jr. schrieb: > In fact, I think people keep requesting me support on Npgsql for that > because MS Sql server supports it and they are porting their code to use > Postgresql and facing that difficult. > > Indeed, for (a) we could use an approach similar to Ms s