[GENERAL] Question about data corruption issue of 9.1 (pre 9.1.6)

2012-11-05 Thread Denis Gasparin
in advance Denis Gasparin --- Edistar SRL

[GENERAL] Odd behaviour in update rule

2010-07-07 Thread Denis Gasparin
Hi. I have an odd behaviour on an update rule in postgresql 8.2 and i'd like to know if the behaviour is as expected or not. The following sql statements prepare the table, view and rule. create table main ( id integer not null primary key, value integer not null ); create view

[GENERAL] Free Cache Memory (Linux) and Postgresql

2008-09-30 Thread Denis Gasparin
of any kind. Any idea? Thank you in advance, Denis Gasparin Edistar SRL -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Free Cache Memory (Linux) and Postgresql

2008-09-30 Thread Denis Gasparin
Tom Lane ha scritto: Denis Gasparin [EMAIL PROTECTED] writes: I'm evaluating to issue the drop_caches kernel command (echo 3 /proc/sys/vm/drop_caches) in order to free unused pagecache, directory entries and inodes. Why in the world would you think that's a good idea

[GENERAL] IN query operator and NULL values

2008-05-16 Thread Denis Gasparin
Hi all. I have a problem with the IN operator in PostgreSQL 8.2.7. Here it is an example that reproduce the problem: test=# create table test(a integer ,b integer); CREATE TABLE test=# insert into test values(1,1); INSERT 6838415 1 test=# insert into test values(2,2); INSERT 6838416 1 test=#

Re: [GENERAL] Connection Pooling directly on Postgres Server

2007-09-08 Thread Denis Gasparin
This has certainly been discussed before. IIRC the real argument against that was, that fork() isn't the most expensive thing to do anymore. And Postgres does lots of other stuff after accept(), namely connecting to a certain database, authenticating the user, etc.. Ok. I knew that. I made

[GENERAL] Connection Pooling directly on Postgres Server

2007-09-07 Thread Denis Gasparin
I'm looking for connection pooling solutions for our php/apache server. I already checked pgpool and pgbouncer but during the tests, I had the following (mad) idea... Why not to implement a connection pooling server side as apache for example does? I try to explain my idea... The postgres

Re: [GENERAL] Question regarding autovacuum in 8.1

2007-08-30 Thread Denis Gasparin
Alvaro Herrera ha scritto: However i have no idea of what tables the autovacuum daemon is processing because there aren't autovacuum info columns on pg_stat_all_tables (as there are for 8.2.x). For that, you need to change log_min_messages to debug2. Keep track of the PID of

[GENERAL] Autovacuum not vacuuming pg_largeobject

2007-08-30 Thread Denis Gasparin
I'm a bit concerned about the autovacuum daemon. Today I runned a vacuum full during a normal maintainance task and I noticed that the size of pg_largeobject decreased from 14GB to 4GB... Every night we have a procedure that deletes large object no more referenced using the vacuumlo program.

Re: [GENERAL] Autovacuum not vacuuming pg_largeobject

2007-08-30 Thread Denis Gasparin
Yeah, you're wrong. The difference is that plain vacuum does not try very hard to reduce the length of a table file --- it just frees up space within the file for reuse. vacuum full will actually move things from the end of the file to free space nearer the head of the file, so that it can

[GENERAL] Question regarding autovacuum in 8.1

2007-08-29 Thread Denis Gasparin
How is it possibile to check if autovacuum is running in 8.1.x? Show Autovacuum gives me on and also i see evidence in logs where autovacuum writes LOG: autovacuum: processing database . However i have no idea of what tables the autovacuum daemon is processing because there aren't

[GENERAL] Question regarding autovacuum in 8.1

2007-08-29 Thread Denis Gasparin
How is it possibile to check if autovacuum is running in 8.1.x? Show Autovacuum gives me on and also i see evidence in logs where,autovacuum writes LOG: autovacuum: processing database . However i have no idea of what tables the autovacuum daemon is processing because there aren't

[GENERAL] Postgresql over a SAN

2007-07-26 Thread Denis Gasparin
We're evaluating to install a SAN (Storage Area Network) and to use it as storage area for our Postgresql server. Did anybody already make this? Problems, performance issues, tips? The db server is mainly used as backend to several heavy loaded web servers. The version of Postgresql is 8.1 and

[GENERAL] Strange behaviour with Xfs filesystem and unix_socket_directory

2007-07-24 Thread Denis Gasparin
We configured the unix_socket_directory in postgresql.conf to point to a folder in a xfs filesystem. The problem is that pg_ctl tries to start the daemon but after 1 minute it gives up with the following message: could not start postmaster. The strange thing is that the postmaster is there, up

Re: [GENERAL] Strange behaviour with Xfs filesystem and unix_socket_directory

2007-07-24 Thread Denis Gasparin
Setting PGHOST solved the problem! It was not clear to me that pg_ctl is actually a client and it doesn't read the configuration from postgresql.conf Thank you, Denis Tom Lane ha scritto: Denis Gasparin [EMAIL PROTECTED] writes: We configured the unix_socket_directory in postgresql.conf

Re: [GENERAL] AutoVacuum Behaviour Question

2007-06-29 Thread Denis Gasparin
Martijn van Oosterhout ha scritto: On Thu, Jun 28, 2007 at 11:12:19AM +0100, Bruce McAlister wrote: I just want to verify that I understand you correctly here, do you mean that the temporary table is created by specific sql, for example, create temp table, then perform some actions on that

[GENERAL] Prepared queries vs Non-prepared

2007-03-28 Thread Denis Gasparin
Hi! I am testing the PHP PDO library versus the old style PHP postgres functions. I noted that PDO library declare and prepare every statement. I mean: $s = $db-query(select * from test where field=1); is equivalent to $s = $db-prepare(select * from test where field=?); $s-execute(array('1'));

[GENERAL] Query that does not use indexes

2007-03-27 Thread Denis Gasparin
I have a query that performs a multiple join between four tables and that doesn't use the defined indexes. If I set enable_seqscan to off, the query obviously uses the indexes and it is considerable faster than normal planned execution with enable_seqscan=true. Can you give me a reason why

[GENERAL] Getting Text data as C string

2007-03-12 Thread Denis Gasparin
Hi. I wrote a simple c stored procedure that accepts only one text parameter that i want to convert to a c string. The problem is that i obtain the C string correctly but with spurious characters at the end... I use these calls to obtain the c string: text *t_myfield = PG_GETARG_TEXT_P(0); char

Re: [GENERAL] Getting Text data as C string

2007-03-12 Thread Denis Gasparin
Peter Eisentraut ha scritto: Am Montag, 12. März 2007 12:47 schrieb Denis Gasparin: I wrote a simple c stored procedure that accepts only one text parameter that i want to convert to a c string. The problem is that i obtain the C string correctly but with spurious characters at the end

[GENERAL] age(datfrozenxid) negative for template0. Is this normal?

2006-05-02 Thread Denis Gasparin
Today I executed the following query as stated into the Administrator Guide to check the XID wraparound problem: SELECT datname, age(datfrozenxid) FROM pg_database; All the database report an age of 1 billion except for the template0 database. This is an extract of the result of the query:

Re: [GENERAL] Size comparison between a Composite type and an

2006-02-28 Thread Denis Gasparin
Hi Doug. I considered also the numeric type. In that case if the number is of 32 digits the storage size is of 2*8 + 8 = 24 bytes. If i store it using a composite data type of two bigints the size is 2*8 + composite data structure overhead bytes. If the composite data type has 4 bytes

Re: [GENERAL] Smallint - Integer Casting Problems in Plpgsql functions

2004-03-17 Thread Denis Gasparin
Hi Richard. Thank you for your reply. I rewrote the store procedure to accept integer instead of smallint. What i don't understand is why the casting is working in 7.2.3. What has been changed from that? Thank you, -- Doct. Eng. Denis Gasparin: [EMAIL PROTECTED

[GENERAL] Bug in pg_dumpall

2003-11-21 Thread Denis Gasparin
is created with the command: CREATE USER aaa PASSWORD 'bbb' NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION aaa; CREATE SCHEMA aaa; This fails giving me the following error: ERROR: : permission denied Any ideas? I'm using Postgresql 7.3.4. -- Ing. Denis Gasparin: [EMAIL PROTECTED

Re: [GENERAL] Bug in pg_dumpall

2003-11-21 Thread Denis Gasparin
I'm restoring it as the superuser. You can try to execute the commands directly from psql. Denis Doug McNaught wrote: Denis Gasparin [EMAIL PROTECTED] writes: Looking into the generated sql, i find that the schema is created with the command: CREATE USER aaa PASSWORD 'bbb' NOCREATEDB

Re: [GENERAL] Python interface memory leak?

2001-10-17 Thread Denis Gasparin
). Regards, Doct. Eng. Denis Gasparin [EMAIL PROTECTED] --- Programmer System Administratorhttp://www.edistar.com

Re: [GENERAL] VACUUM, 24/7 availability and 7.2

2001-10-16 Thread Denis Gasparin
Ok, little language qui pro quo... I'm sorry for the error... Denis At 15/10/01 17.00, Andrew Sullivan wrote: On Mon, Oct 15, 2001 at 10:40:17AM +0200, Denis Gasparin wrote: It's long since done. == This means that it will not be included in 7.2? I've read 7.2 No, it means it _will_

Re: [GENERAL] VACUUM, 24/7 availability and 7.2

2001-10-15 Thread Denis Gasparin
lock on each table while it is being processed. - This way to do is similar (but not equal) to the LAZY VACUUM specified by Tom Lane in the above link... In conclusion, the new VACUUM command as described above will be include in the 7.2 version of Postgresql? Denis Gasparin: [EMAIL

Re: [GENERAL] VACUUM, 24/7 availability and 7.2

2001-10-15 Thread Denis Gasparin
lock on each table while it is being processed. - This way to do is similar (but not equal) to the LAZY VACUUM specified by Tom Lane in the above link... In conclusion, the new VACUUM command as described above will be include in the 7.2 version of Postgresql? Denis Gasparin: [EMAIL

[GENERAL] General database programming question

2001-09-13 Thread Denis Gasparin
? Is there others different solutions? Thank for the tips... Regards, Eng. Denis Gasparin: [EMAIL PROTECTED] --- Programmer System Administrator - Edistar srl ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL]

2001-08-24 Thread Denis Gasparin
It contains 5 records. I have to do vacuum analyze on the table after having issued the CREATE INDEX to create the index? Please, let me know... Regards, Denis At 19.03 23/08/01, Doug McNaught wrote: Denis Gasparin [EMAIL PROTECTED] writes: Hi to all! I have created a table

Re: [GENERAL]

2001-08-24 Thread Denis Gasparin
the statistics say about the SELECT on the primary key query. When i've done, i'll tell you... Denis At 19.03 23/08/01, Doug McNaught wrote: Denis Gasparin [EMAIL PROTECTED] writes: Hi to all! I have created a table using the CREATE TABLE new_table (col1,col2,col3) AS SELECT col1,col2

Re: [GENERAL]

2001-08-24 Thread Denis Gasparin
missed the subject of the mail At 11.54 24/08/01, Denis Gasparin wrote: I have done VACUUM ANALYZE too but the statistics continue preferring sequential scan... Now i'll try to use a different approach: - i'll create the empty table with a CREATE TABLE (and a primary key on col1) - then i'll

[GENERAL] BIGINT datatype and Indexes Failure

2001-08-24 Thread Denis Gasparin
tests has been completed correctely during installation. Please, let me know as soon as possible... Regards, Eng. Denis Gasparin: [EMAIL PROTECTED] --- Programmer System Administrator - Edistar srl ---(end of broadcast

Re: [GENERAL] BIGINT datatype and Indexes Failure

2001-08-24 Thread Denis Gasparin
will be solved in some future release At this point, is it safe to use BIGINT datatype and indexes on those fields? Thank for your answers, Regards, Eng. Denis Gasparin: [EMAIL PROTECTED] --- Programmer System Administrator - Edistar srl At 14.57 24/08/01, Denis Gasparin

[GENERAL]

2001-08-23 Thread Denis Gasparin
Hi to all! I have created a table using the CREATE TABLE new_table (col1,col2,col3) AS SELECT col1,col2,col3 FROM org_table. I create an index on this table using the statement: CREATE UNIQUE INDEX table_idx ON new_table (col1). Then i do a select as this: SELECT * FROM

[GENERAL] Pgsql vs Interbase: Transaction benchmark

2001-06-01 Thread Denis Gasparin
Hi to all! I'm doing some benchmarks to test Interbase vs PostgreSQL. The test are done with the respective PHP client. The two servers are installed on the same machine with RedHat 7.0. Pgsql has been started with these configuration options: - sort_mem = 512 - fsync

Re: [GENERAL] Pgsql vs Interbase: Transaction benchmark

2001-06-01 Thread Denis Gasparin
groups of 1 recors each = 1.000.000 records) Denis At 16.14 01/06/01, Tom Lane wrote: Denis Gasparin [EMAIL PROTECTED] writes: All the operations are perfomed in the same table with 1.000.000 of records and the searches (those specified by the WHERE clause of SELECT and UPDATE) are done

Re: [GENERAL] Kylix, dbexpress PostgreSql

2001-05-29 Thread Denis Gasparin
Zeos (www.zeoslib.org) has released the last version of their library and now it supports kylix! Obviously, it isn't dbexpress but it uses directly the pgsql.so library. Give it a try! It works... Denis Gasparin At 23.16 28/05/01, [EMAIL PROTECTED] wrote: Hello, There is one under