Re: [GENERAL] fsync on ext4 does not work

2011-12-22 Thread Havasvölgyi Ottó
Greg Smith g...@2ndquadrant.com On 12/19/2011 10:52 AM, Havasvölgyi Ottó wrote: PgSql 9.1.2 Debian, 2.6.32 kernel WAL filesystem: ext4 with defaults There's a pg_test_fsync program included with the postgresql-contrib package that might help you sort out what's going on here

Re: [GENERAL] fsync on ext4 does not work

2011-12-21 Thread Havasvölgyi Ottó
Thank you guys for the ideas and suggestions, I will check them. Best regards, Otto

[GENERAL] fsync on ext4 does not work

2011-12-19 Thread Havasvölgyi Ottó
Hi all, Somewhy fsync does not work for me. PgSql 9.1.2 Debian, 2.6.32 kernel WAL filesystem: ext4 with defaults config: fsync=on sync_commit=on wal_sync_method=fsync Even though the TPS in pgbench about 700 with 1 client. I have tried other sync methods (fdatasync, open_sync), but all are

Re: [GENERAL] fsync on ext4 does not work

2011-12-19 Thread Havasvölgyi Ottó
2011/12/19 Tomas Vondra t...@fuzzy.cz On 19 Prosinec 2011, 16:52, Havasvölgyi Ottó wrote: config: fsync=on sync_commit=on wal_sync_method=fsync I don't think you need to set wal_sync_method, comment it out. Even though the TPS in pgbench about 700 with 1 client. I have tried

Re: [GENERAL] fsync on ext4 does not work

2011-12-19 Thread Havasvölgyi Ottó
2011/12/19 Florian Weimer fwei...@bfk.de * Havasvölgyi Ottó: Even though the TPS in pgbench about 700 with 1 client. I have tried other sync methods (fdatasync, open_sync), but all are similar. Should I disable write cache on HDD to make it work? Did you mount your ext4 file system

Re: [GENERAL] Rounding incompatibility

2009-06-16 Thread Havasvölgyi Ottó
Yes, they are both your packages from your official site. So this means that in 8.2 and in earlier versions the rounding is not the regular one. Best regards, Otto 2009/6/15 Dave Page dp...@pgadmin.org On Mon, Jun 15, 2009 at 3:33 PM, Tom Lanet...@sss.pgh.pa.us wrote:

Re: [GENERAL] Trigger Function and backup

2009-06-15 Thread Havasvölgyi Ottó
Hi, I have found the following strangeness on Windows: create table round_test (id int primary key, value double precision); insert into round_test(id, value) values(1, 1.5); insert into round_test(id, value) values(2, -1.5); insert into round_test(id, value) values(3, 3.5); select round(value)

[GENERAL] Rounding incompatibility

2009-06-15 Thread Havasvölgyi Ottó
Hi, I have found the following strangeness on Windows versions: create table round_test (id int primary key, value double precision); insert into round_test(id, value) values(1, 1.5); insert into round_test(id, value) values(2, -1.5); insert into round_test(id, value) values(3, 3.5); select

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-24 Thread Havasvölgyi Ottó
Thanks Tom for your comments. I meant the build in this directory: http://www.postgresql.org/ftp/binary/v8.3.6/win32/, and the builds for win32 of other versions in the binary directory. What is the trend of these builds regarding floating point timestamps? For example what about 8.4? Thanks,

[GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Havasvölgyi Ottó
Hi, I don't know why this query returns false: SELECT '20040506 070809.01'::timestamp(6) - '20010203 040506.007000'::timestamp(6) = '1188 day 3 hour 3 minute 3 second 3 millisecond'::interval; If I just subtract the two timestamps, its result is the interval I specified. What may cause

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Havasvölgyi Ottó
Thanks. I tested the standard Win32 distribution of 8.3.6. The same happens on 8.2. But on 8.0 it works. When I don't use milliseconds, then it works. Will 8.4 work fine on Win32 again? Thanks, Otto 2009/5/23 Ludwig Kniprath lud...@kni-online.de Scott Marlowe schrieb: On Sat, May 23,

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Havasvölgyi Ottó
Havasvölgyi Ottó havasvolgyi.o...@gmail.com Thanks. I tested the standard Win32 distribution of 8.3.6. The same happens on 8.2. But on 8.0 it works. When I don't use milliseconds, then it works. Will 8.4 work fine on Win32 again? Thanks, Otto 2009/5/23 Ludwig Kniprath lud...@kni-online.de

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Havasvölgyi Ottó
I mean the Win32 distribution on the PgSql site. I always used that. It would be very good if these data types were exact by default, even if that's a bit slower. Otto 2009/5/23 Christophe x...@thebuild.com On May 23, 2009, at 10:44 AM, Havasvölgyi Ottó wrote: Thanks. I tested the standard

Re: [GENERAL] 8.3: timestamp subtraction

2009-05-23 Thread Havasvölgyi Ottó
Thanks, It's off in both 8.2 and 8.3. What will be the default in 8.4? Best regards, Otto 2009/5/23 Alvaro Herrera alvhe...@commandprompt.com Havasvölgyi Ottó escribió: I mean the Win32 distribution on the PgSql site. I always used that. If you want to find out whether a particular build

[GENERAL] Creating then dropping primary key constraint

2005-12-04 Thread Havasvölgyi Ottó
Hi, I noticed that when I create a primary key with ALTER TABLE ... ADD CONSTRAINT ... PRIMARY KEY (...), and then drop this constraint, then the not null modifier stays on the column on which the primary key was defined although there were no constraint on that column before. Is this

[GENERAL] Some rare questions

2005-12-04 Thread Havasvölgyi Ottó
Hi, I am writing a driver for PostgreSQL, and I need some rare info: How can I query the collation/locale of the database cluster? What can be the maximal length of the indexed part of the string. So I have a text field, and I create an index on it. How long can be one index key max in this

[GENERAL] PL/PGSQL parameter count vs perfomace

2005-08-10 Thread Havasvölgyi Ottó
Hi, I would sometimes need a lot of parameters, even 100 or so. These would be the data access functions for tables. I know the default count limit is 32, and FUNC_MAX_ARGS compile option should be set to, say, 256. But I have another option, a bit harder, I could pass the parameters in a

Re: [GENERAL] dbf to pgsql

2005-08-04 Thread Havasvölgyi Ottó
Peter, There is a dbf2pg in the contrib library, I have tried to use it, but I had some probems with it: I had a numeric field whose decimal length was 0. Dbf2pg couldn't handle this situation, it said that it has an illegel number format. So I had to generate manually a big convertion

[GENERAL] explain analyzing a query inside an sql stored procedure

2005-08-04 Thread Havasvölgyi Ottó
Hi, Is there any easy way to explain analyze a query, which is inside an sql stored procedure? I could of course copy the query out of the procedure, and explain analyze it but this is a slower process. I would do this with a lot of procedures, that's why it should be fast. create function

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
. Maybe others should also try this scenario. Can I help anything? Best Regards, Otto - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Havasvölgyi Ottó [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Tuesday, August 02, 2005 3:54 AM Subject: Re: [GENERAL] feeding big

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
Hi, The effect is the same even if I redirect the output to file with the -o switch. At the beginning 200 KB/sec, at 1.5 MB the speed is less than 20 KB/sec. Best Regards, Otto - Original Message - From: Havasvölgyi Ottó [EMAIL PROTECTED] To: Tom Lane [EMAIL PROTECTED] Cc: pgsql

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
Hi, Now I am at 7 MB, and the reading speed is 3-4KB/sec. Best Regards, Otto - Original Message - From: Havasvölgyi Ottó [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Tuesday, August 02, 2005 1:31 PM Subject: Re: [GENERAL] feeding big script to psql Hi, The effect

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
application did anything. No other HDD activity either. Best Regadrs, Otto - Original Message - From: Scott Marlowe [EMAIL PROTECTED] To: Havasvölgyi Ottó [EMAIL PROTECTED] Cc: Tom Lane [EMAIL PROTECTED]; pgsql-general@postgresql.org Sent: Tuesday, August 02, 2005 5:57 PM Subject: Re

[GENERAL] feeding big script to psql

2005-08-01 Thread Havasvölgyi Ottó
Hi, A generated a big SQL script (about 20 Mb), and fed it to psql. I was very surprised that within a minute psql became quite slow. There were areas, where less than 10 row were inserted in a second. This is on a WinXP machine with local server 8.0.3, and only I use it. Looking at the log

Re: [GENERAL] Select for update

2005-07-29 Thread Havasvölgyi Ottó
Bruno, I know this is inefficient. In fact it was someone other's problem to eliminate gaps and I solved it this way. I don't do such things for myself. Best Regards, Otto - Original Message - From: Bruno Wolff III [EMAIL PROTECTED] To: Havasvölgyi Ottó [EMAIL PROTECTED] Cc

Re: [GENERAL] Select for update

2005-07-29 Thread Havasvölgyi Ottó
Hi, Yes, I misspelled in the mail, I don't any way to copy it from the console, so I rewrote it here. I will post if I can reproduce it again. I hope that I have missed something. Best Regards, Otto - Original Message - From: Michael Fuhr [EMAIL PROTECTED] To: Havasvölgyi Ottó

[GENERAL] Select for update

2005-07-28 Thread Havasvölgyi Ottó
Hi, Is it normal that when I select for update a record, but I don't select all the fields, that the contents of fields not selected will be deleted: create table pidtest(pid integer, szoveg text) without oids; select pid from pistest where pid5 for update; After committing (autocommit),

Re: [GENERAL] Select for update

2005-07-28 Thread Havasvölgyi Ottó
it, but yesterday I was suprised that the szoveg field's contents in the locked records went away. Best Regards, Otto - Original Message - From: Michael Fuhr [EMAIL PROTECTED] To: Havasvölgyi Ottó [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Thursday, July 28, 2005 2:02 PM Subject

[GENERAL] checkpoint segments

2005-07-09 Thread Havasvölgyi Ottó
Hi, I have a small database on my Windows XP, I rarely use it. Even so, the log file show says this: [2005-07-02 02:02:09] LOG: received fast shutdown request [2005-07-02 02:02:09] LOG: checkpoints are occurring too frequently (0 seconds apart) [2005-07-02 02:02:09] HINT: Consider

Re: [GENERAL] checkpoint segments

2005-07-09 Thread Havasvölgyi Ottó
Hi, Sorry, this is Pg 8.0.3 Regards, Otto ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

[GENERAL] field alias in where condition

2005-06-03 Thread Havasvölgyi Ottó
Hi all, I issued the following queries: select substring(proname from 1 to 1) as nevresz, count(*) from pg_proc where nevresz = 'a' order by nevresz group by nevresz; select substring(proname from 1 to 1) as nevresz, count(*) from pg_proc order by nevresz group by nevresz; The first

Re: [GENERAL] interval integer comparison

2005-06-02 Thread Havasvölgyi Ottó
Hi, - Original Message - From: Bruno Wolff III [EMAIL PROTECTED] To: Havasvölgyi Ottó [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Thursday, June 02, 2005 3:53 AM Subject: Re: [GENERAL] interval integer comparison On Thu, Jun 02, 2005 at 01:54:12 +0200, Havasvölgyi Ottó

Re: [GENERAL] interval integer comparison

2005-06-01 Thread Havasvölgyi Ottó
Thank you Tom. It was a bit confusing because my WHERE clause looked something like this: ... WHERE date_field - current_date '21 days'::interval; And then I got records, whose with date_field's year was 2010. :-o Now I am using this formula: ... WHERE date_field current_date + '21

[GENERAL] interval integer comparison

2005-05-31 Thread Havasvölgyi Ottó
Hi all, Pg 8.0.3 allows me to compare interval with integer, but I cannot see any reasonable rule: These are true: 1 '1 days'::interval 2 '1 days'::interval 999 '1 days'::interval 1999 '2 days'::interval 2000 != '2 days'::interval 2001 '2 days'::interval ... 20999 '21

Re: [GENERAL] Accessing PostgreSQL from C++

2005-05-31 Thread Havasvölgyi Ottó
Jeff, Yes, libpq. Look at the 27th chapter in the manual. Otto - Original Message - From: Jeff Brown [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Tuesday, May 31, 2005 8:31 AM Subject: [GENERAL] Accessing PostgreSQL from C++ Hi guys Is there some sort of C API

Re: [GENERAL] About Types

2005-05-12 Thread Havasvölgyi Ottó
Hi Hervé, You should perhaps use record instead of a particular type. ... RETURNS SETOF record AS ... Otto - Original Message - From: Hervé Inisan [EMAIL PROTECTED] To: pgsql-general@postgresql.org Sent: Thursday, May 12, 2005 8:31 PM Subject: [GENERAL] About Types Hi everybody, I'm a PG