Re: [GENERAL] Implement online database using Postgresql

2010-12-09 Thread Ivano Luberti
Kalai this is not the proper list to ask, in my opinion. And sincerely I don't know if a proer list exists. What you want to achieve is to build a web application and the most followed way to do that is to use a web framework. Web frameworks are software that allows you build a web application,

[GENERAL] Which query is good - IN or OR

2010-12-09 Thread AI Rumman
A simple query I can write in any of the following two ways: 1. Select col1 from table where col2 in ('A','B'); 2. Select col1 from table where col2 = 'A' or col2 = 'B' Here IN condition may be more than two. I need to know which one is good for good performance. Any idea please.

Re: [GENERAL] Which query is good - IN or OR

2010-12-09 Thread Pavel Stehule
Hello 2010/12/9 AI Rumman rumman...@gmail.com: A simple query I can write in any of the following two ways: 1. Select col1 from table where col2 in ('A','B'); 2. Select col1 from table where  col2 = 'A' or  col2 = 'B' Here IN condition may be more than two. I need to know which one

[GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Paul Taylor
Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that I'm only a single user but manipulating large amounts of data , i.e processing

[GENERAL] How can I create a PgAgent job creation script?

2010-12-09 Thread Rob Richardson
I am preparing an installation disk for a customer. Their installation includes over ten scheduled jobs. The only way I know of to create a job is through PGAdmin, using a wizard to enter each piece of information one screen at a time. I don't want to have to prepare an instruction document

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Andy Colson
On 12/9/2010 6:25 AM, Paul Taylor wrote: Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that I'm only a single user but manipulating

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Andy Colson
On 12/9/2010 8:50 AM, Andy Colson wrote: On 12/9/2010 6:25 AM, Paul Taylor wrote: Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Reid Thompson
On 12/09/2010 09:59 AM, Andy Colson wrote: On 12/9/2010 8:50 AM, Andy Colson wrote: On 12/9/2010 6:25 AM, Paul Taylor wrote: You need to bump up your SHMMAX is your OS. sorry: SHMMAX _in_ your OS. its an OS setting not a PG one. -Andy scroll down to the section on OSX

Re: [GENERAL] SELECT is immediate but the UPDATE takes forever

2010-12-09 Thread Vick Khera
On Wed, Dec 8, 2010 at 10:58 PM, Raimon Fernandez co...@montx.com wrote: well, after a VACUUM things are going faster ... I'm still trying to analyze the function as it seems there are other bottlechecnk, but at least the first update now is faster as before ... If that's the case then your

[GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Paul Taylor
Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that I'm only a single user but manipulating large amounts of data , i.e processing

[GENERAL] Quite a fast lockless vacuum full implemenation

2010-12-09 Thread Maxim Boguk
Hi there, First: I must say thanks to authors of this two posts: http://blog.endpoint.com/2010/09/reducing-bloat-without-locking.html and http://www.depesz.com/index.php/2010/10/17/reduce-bloat-of-table-without-longexclusive-locks/ These two posts was provided me exellent ideas and starting point

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread tv
Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that I'm only a single user but manipulating large amounts of data , i.e processing

Re: [GENERAL] SELECT is immediate but the UPDATE takes forever

2010-12-09 Thread Raimon Fernandez
On 9dic, 2010, at 14:32 , Vick Khera wrote: well, after a VACUUM things are going faster ... I'm still trying to analyze the function as it seems there are other bottlechecnk, but at least the first update now is faster as before ... If that's the case then your 'no' answer to is the

Re: [GENERAL] Postgresql 9.1 pg_last_xact_replay_timestamp limitations

2010-12-09 Thread Gabi Julien
On Wednesday 08 December 2010 21:58:46 you wrote: On Thu, Dec 9, 2010 at 1:37 AM, Gabi Julien gabi.jul...@broadsign.com wrote: slave# /etc/init.d/postgresql start slave# psql -hlocalhost my_db -c select pg_last_xact_replay_timestamp(), now() as not_modified_since;  

[GENERAL] calculation of database size

2010-12-09 Thread Jaiswal Dhaval Sudhirkumar
How can I measure the approximate database size based on row data. Is there any calculation template? -- Thanks Regards DJ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review,

Re: [GENERAL] calculation of database size

2010-12-09 Thread Jaiswal Dhaval Sudhirkumar
Ignore the previous mail. How can I measure the approximate database size based on raw* data. Is there any calculation template? -- Thanks Regards DJ -- Thanks Regards Dhaval Jaiswal | Technical Specialist - Database | Microland Limited Fax: +91 80 4328 0044. Cell: +91 80953.978.43

Re: [GENERAL] use a variable name for an insert in a trigger for an audit

2010-12-09 Thread Raimon Fernandez
On 9dic, 2010, at 04:40 , Raimon Fernandez wrote: Hello, I have to audit all the changes for all rows of one database. I have a trigger that executes BEFORE any update or delete, and simply copy the row (INSERT INTO) into the replicated table. For example, every table has the same

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Paul Taylor
On 09/12/2010 15:12, Reid Thompson wrote: On 12/09/2010 09:59 AM, Andy Colson wrote: On 12/9/2010 8:50 AM, Andy Colson wrote: On 12/9/2010 6:25 AM, Paul Taylor wrote: You need to bump up your SHMMAX is your OS. sorry: SHMMAX _in_ your OS. its an OS setting not a PG one. -Andy scroll down

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Reid Thompson
On 12/09/2010 12:36 PM, Paul Taylor wrote: On 09/12/2010 15:12, Reid Thompson wrote: On 12/09/2010 09:59 AM, Andy Colson wrote: On 12/9/2010 8:50 AM, Andy Colson wrote: On 12/9/2010 6:25 AM, Paul Taylor wrote: You need to bump up your SHMMAX is your OS. sorry: SHMMAX _in_ your OS. its an

[GENERAL] Extended query protocol and exact types matches.

2010-12-09 Thread Dmitriy Igrishin
Hey general@, To be assured and just for calmness. Problem: 1. CREATE TABLE test_tab (id integer, dat varchar(64)); 2. INSERT INTO test_tab VALUES($1, $2) via PQexecParams, where paramTypes[0] == OID of bigint, paramTypes[1] == OID of text. Questions: Whether this case falls to

Re: [GENERAL] Using PG with Windows EFS or TrueCrypt for encryption

2010-12-09 Thread Brady Mathis
Hey Harald - The permissions! Of course! Thanks, you fixed me. Brady On Wed, Dec 8, 2010 at 6:18 AM, Massa, Harald Armin c...@ghum.de wrote: Brady, Then I attempted to mount a normal encrypted volume with TrueCrypt, move the data\ and sub-folders to this volume and reconfigure PG to

[GENERAL] monitoring warm standby lag in 8.4?

2010-12-09 Thread Josh Kupershmidt
Hi all, I'm wondering if there's an accepted way to monitor a warm standby machine's lag in 8.4. The wiki[1] has a link[2] to a script which parses the output of pg_controldata, looking for a line like this: Time of latest checkpoint:Thu 09 Dec 2010 01:35:46 PM EST But I'm not

Re: [GENERAL] calculation of database size

2010-12-09 Thread bricklen
On Thu, Dec 9, 2010 at 8:37 AM, Jaiswal Dhaval Sudhirkumar jaiswa...@microland.com wrote: How can I measure the approximate database size based on raw* data. Is there any calculation template? -- Thanks Regards DJ One option: select pg_size_pretty( pg_database_size( 'yourdatabase' ) ); --

Re: [GENERAL] use a variable name for an insert in a trigger for an audit

2010-12-09 Thread Merlin Moncure
On Thursday, December 9, 2010, Raimon Fernandez co...@montx.com wrote: On 9dic, 2010, at 04:40 , Raimon Fernandez wrote: Hello, I have to audit all the changes for all rows of one database. I have a trigger that executes BEFORE any update or delete, and simply copy the row (INSERT INTO)

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Paul Taylor
On 09/12/2010 15:51, t...@fuzzy.cz wrote: Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that I'm only a single user but manipulating

Re: [GENERAL] Tuning Postgres for single user manipulating large amounts of data

2010-12-09 Thread Scott Marlowe
On Thu, Dec 9, 2010 at 5:25 AM, Paul Taylor ij...@fastmail.fm wrote: Hi, Im using Postgres 8.3 on a Macbook Pro Labtop. I using the database with just one db connection to build a lucene search index from some of the data, and Im trying to improve performance. The key thing is that I'm only a

[GENERAL] Invalid byte sequence

2010-12-09 Thread Robert Fitzpatrick
I am getting the following error when trying to migrate a db from 8.4.0/FreeBSD 7.1 to 9.0.1/FreeBSD 8.1, both are VMware virtual machines with FreeBSD amd64... data1# psql -U pgsql template1 /data/maia.sql snip template1 /data/incoming.sql ERROR: invalid byte sequence for encoding UTF8:

Re: [GENERAL] Postgresql 9.1 pg_last_xact_replay_timestamp limitations

2010-12-09 Thread Fujii Masao
On Fri, Dec 10, 2010 at 1:24 AM, Gabi Julien gabi.jul...@broadsign.com wrote: On Wednesday 08 December 2010 21:58:46 you wrote: On Thu, Dec 9, 2010 at 1:37 AM, Gabi Julien gabi.jul...@broadsign.com wrote: slave# /etc/init.d/postgresql start slave# psql -hlocalhost my_db -c select

[GENERAL] Import id column then convert to SEQUENCE?

2010-12-09 Thread gvim
I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create an simple integer `id` column, import the data then convert the new `id` column to a SEQUENCE. Is this possible/the best solution? Maybe a migration utility would be

Re: [GENERAL] Import id column then convert to SEQUENCE?

2010-12-09 Thread Shoaib Mir
On Fri, Dec 10, 2010 at 2:44 PM, gvim gvi...@gmail.com wrote: I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create an simple integer `id` column, import the data then convert the new `id` column to a SEQUENCE. Is this

Re: [GENERAL] Import id column then convert to SEQUENCE?

2010-12-09 Thread Shoaib Mir
On Fri, Dec 10, 2010 at 2:53 PM, Shoaib Mir shoaib...@gmail.com wrote: On Fri, Dec 10, 2010 at 2:44 PM, gvim gvi...@gmail.com wrote: I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create an simple integer `id` column,

Re: [GENERAL] calculation of database size

2010-12-09 Thread Jaiswal Dhaval Sudhirkumar
Got the link. http://wiki.postgresql.org/wiki/FAQ#What_is_the_maximum_size_for_a_row.2C_a_table.2C_and_a_database.3F -- Thanks Regards DJ From: Jaiswal Dhaval Sudhirkumar Sent: Thu 12/9/2010 10:07 PM To: Jaiswal Dhaval Sudhirkumar;

[GENERAL] Import ID column data then convert to SEQUENCE?

2010-12-09 Thread gvim
I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create the `id` column, import the data then convert the new `id` column to a SEQUENCE. Is this possible/the best solution? Maybe a migration utility would be better?

Re: [GENERAL] Import ID column data then convert to SEQUENCE?

2010-12-09 Thread John R Pierce
On 12/09/10 7:36 PM, gvim wrote: I'm migrating a database from MySQL and need to keep the original `id` column (AUTO_INCREMENT) intact so my plan is to create the `id` column, import the data then convert the new `id` column to a SEQUENCE. Is this possible/the best solution? Maybe a migration

[GENERAL] Performance tuning in Pgsql

2010-12-09 Thread Adarsh Sharma
Dear all, I am researched a lot about Performance tuning in Pgsql. I found that we have to change shared_buffer parameter and effective_cache_size parameter. I changed shared_buffer to 2 GB but I can't able to locate effective_cache_size parameter in postgresql.conf file. Also i want to