Re: [GENERAL] Performance tuning in Pgsql

2010-12-10 Thread Scott Marlowe
On Fri, Dec 10, 2010 at 12:53 AM, Adarsh Sharma adarsh.sha...@orkash.com wrote: 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

[GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Alexander Farber
Hello, I'd like to have a local PostgreSQL copy of a table stored (and growing) at the remote Oracle database: SQL desc qtrack; Name Null?Type

[GENERAL] Cannot Achieve Performance

2010-12-10 Thread Adarsh Sharma
Dear all, Performance tuning is what, which all i sured to achieve in pgsql. I am currently testing on 5 GB table with select operation that takes about 229477 ms ( 3.82 minutes ) with simple configuration. I have 4 GB RAM. So I change some parameters such as shared_buffers to 512 MB ,

Re: [GENERAL] Cannot Achieve Performance

2010-12-10 Thread Szymon Guz
On 10 December 2010 12:28, Adarsh Sharma adarsh.sha...@orkash.com wrote: Dear all, Performance tuning is what, which all i sured to achieve in pgsql. I am currently testing on 5 GB table with select operation that takes about 229477 ms ( 3.82 minutes ) with simple configuration. I have 4

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Thomas Kellerer
Alexander Farber, 10.12.2010 12:02: I'm preparing a PHP-script to be run as a nightly cronjob and will first find the latest qdatetime stored in my local PostgreSQL database and then just select in remote Oracle, insert into the local PostgreSQL database in a loop. But I wonder if there is

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Alexander Farber
On Fri, Dec 10, 2010 at 12:33 PM, Thomas Kellerer spam_ea...@gmx.net wrote: And I'm not sure how to copy the Oracle's strange DATE column best into PostgreSQL, without losing precision? Oracle's DATE includes a time part as well. So simply use a timestamp in PostgreSQL and everything should

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Thomas Kellerer
Alexander Farber, 10.12.2010 12:53: On Fri, Dec 10, 2010 at 12:33 PM, Thomas Kellererspam_ea...@gmx.net wrote: And I'm not sure how to copy the Oracle's strange DATE column best into PostgreSQL, without losing precision? Oracle's DATE includes a time part as well. So simply use a timestamp

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Dmitriy Igrishin
Hey Thomas, Alexander 2010/12/10 Thomas Kellerer spam_ea...@gmx.net Alexander Farber, 10.12.2010 12:53: On Fri, Dec 10, 2010 at 12:33 PM, Thomas Kellererspam_ea...@gmx.net wrote: And I'm not sure how to copy the Oracle's strange DATE column best into PostgreSQL, without losing

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

2010-12-10 Thread Reid Thompson
On Thu, 2010-12-09 at 17:40 +, Paul Taylor wrote: what have I got to be careful of. I think that was in reference to turning fsync off, not work_mem values.

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

2010-12-10 Thread tv
Hi ( sorry for the double posting, thought Id use the wrong email address but both have been posted anyway). As far as the db is concerned Im just reading data then writing the data to a lucene search index (which is outside of the database) , but my labtop is jut a test machine I want to run

Re: [GENERAL] Performance tuning in Pgsql

2010-12-10 Thread Scott Marlowe
Please keep the list cc'd as there are others who might be able to help or could use this thread for help. On Fri, Dec 10, 2010 at 2:53 AM, Adarsh Sharma adarsh.sha...@orkash.com wrote: Scott Marlowe wrote: On Fri, Dec 10, 2010 at 12:53 AM, Adarsh Sharma adarsh.sha...@orkash.com wrote:

[GENERAL] Checking for data changes across a very large table

2010-12-10 Thread Stephen Hutchings
I'd like some general guidance on a security issue please. This may belong in the another list so please push me there if appropriate. We have an application design which includes a potential 2 billion row table (A). When the application user kicks off an analysis process, there is a

Re: [GENERAL] Checking for data changes across a very large table

2010-12-10 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 We have an application design which includes a potential 2 billion row table (A). When the application user kicks off an analysis process, there is a requirement to perform a check on that table to verify that the data within hasn't

[GENERAL] Schema manipulation from plpgsql

2010-12-10 Thread Gevik Babakhani
I was wondering if there are any schema manipulation statements which are not allowed from within a PL/PGSQL function. (Except from create/drop a database) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Schema manipulation from plpgsql

2010-12-10 Thread Guillaume Lelarge
Le 10/12/2010 16:01, Gevik Babakhani a écrit : I was wondering if there are any schema manipulation statements which are not allowed from within a PL/PGSQL function. (Except from create/drop a database) create/drop tablespace They are the only exception AFAICT. -- Guillaume

Re: [GENERAL] Quite a fast lockless vacuum full implemenation

2010-12-10 Thread Merlin Moncure
On Thu, Dec 9, 2010 at 1:37 AM, Maxim Boguk maxim.bo...@gmail.com wrote: 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

Re: [GENERAL] monitoring warm standby lag in 8.4?

2010-12-10 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 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:

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Alexander Farber
Please help, struggling since hours with this :-( I've created the following table (columns here and in the proc sorted alphabetically) to acquire data copied from Oracle: # \d qtrack Table public.qtrack Column|Type | Modifiers

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Dmitriy Igrishin
Hey Alexander, Can you post the SQL with call of the function (SQL_UPSERT) I guess ? 2010/12/10 Alexander Farber alexander.far...@gmail.com Please help, struggling since hours with this :-( I've created the following table (columns here and in the proc sorted alphabetically) to acquire

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Adrian Klaver
On Friday 10 December 2010 8:51:19 am Alexander Farber wrote: Please help, struggling since hours with this :-( I've created the following table (columns here and in the proc sorted alphabetically) to acquire data copied from Oracle: # \d qtrack Table public.qtrack

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Dmitriy Igrishin
Hey Adrian, 2010/12/10 Adrian Klaver adrian.kla...@gmail.com On Friday 10 December 2010 8:51:19 am Alexander Farber wrote: Please help, struggling since hours with this :-( I've created the following table (columns here and in the proc sorted alphabetically) to acquire data copied from

Re: [GENERAL] monitoring warm standby lag in 8.4?

2010-12-10 Thread Scott Mead
Yeah, my website is busted. I'll fix it for you. On Thu, Dec 9, 2010 at 2:30 PM, Josh Kupershmidt schmi...@gmail.com wrote: 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

Re: [GENERAL] Extended query protocol and exact types matches.

2010-12-10 Thread Merlin Moncure
On Thu, Dec 9, 2010 at 1:24 PM, Dmitriy Igrishin dmit...@gmail.com wrote: 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,   

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Adrian Klaver
On Friday 10 December 2010 9:20:19 am Dmitriy Igrishin wrote: Hey Adrian, 2010/12/10 Adrian Klaver adrian.kla...@gmail.com On Friday 10 December 2010 8:51:19 am Alexander Farber wrote: Please help, struggling since hours with this :-( I've created the following table (columns here

Re: [GENERAL] Extended query protocol and exact types matches.

2010-12-10 Thread Dmitriy Igrishin
Hey Merlin, Thank you for explanation ! Yes, I understand that specifying NULL instead real OID will provoke the parser attempts to infer the data types in the same way as it would do for untyped literal string constants. But there are three string types: text, varchar(n) and character(n) which

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Dmitriy Igrishin
Huh! Yes, indeed ! But how is it possible ?! I see EMAIL = _EMAIL, EMAILID = _EMAILID, rather than EMAIL = $7, EMAILID = $8, in the function definition... 2010/12/10 Adrian Klaver

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Adrian Klaver
On 12/10/2010 09:45 AM, Dmitriy Igrishin wrote: Huh! Yes, indeed ! But how is it possible ?! I see EMAIL = _EMAIL, EMAILID = _EMAILID, rather than EMAIL = $7, EMAILID = $8, in

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Dmitriy Igrishin
2010/12/10 Adrian Klaver adrian.kla...@gmail.com On 12/10/2010 09:45 AM, Dmitriy Igrishin wrote: Huh! Yes, indeed ! But how is it possible ?! I see EMAIL = _EMAIL, EMAILID = _EMAILID, rather than EMAIL =

Re: [GENERAL] Extended query protocol and exact types matches.

2010-12-10 Thread Merlin Moncure
On Fri, Dec 10, 2010 at 12:40 PM, Dmitriy Igrishin dmit...@gmail.com wrote: Hey Merlin, Thank you for explanation ! Yes, I understand that specifying NULL instead real OID will provoke the parser attempts to infer the data types in the same way as it would do for untyped literal string

Re: [GENERAL] A cronjob for copying a table from Oracle

2010-12-10 Thread Alexander Farber
On Fri, Dec 10, 2010 at 6:15 PM, Adrian Klaver adrian.kla...@gmail.com wrote: On Friday 10 December 2010 8:51:19 am Alexander Farber wrote: SQLSTATE[22001]: String data, right truncated: 7 ERROR:  value too long for type character varying(16) CONTEXT:  SQL statement update qtrack set

[GENERAL] Using regexp_replace to remove small words

2010-12-10 Thread Henrique de Lima Trindade
Hi, I'm trying to find a regular expression that removes all small (length N) words from a string. But, until now I've not been successful. For example: If I pass 'George W Bush' as parameter, I want regexp_replace to return 'George Bush'. Other examples are: select

Re: [GENERAL] Extended query protocol and exact types matches.

2010-12-10 Thread Dmitriy Igrishin
2010/12/10 Merlin Moncure mmonc...@gmail.com On Fri, Dec 10, 2010 at 12:40 PM, Dmitriy Igrishin dmit...@gmail.com wrote: Hey Merlin, Thank you for explanation ! Yes, I understand that specifying NULL instead real OID will provoke the parser attempts to infer the data types in the

Re: [GENERAL] Invalid byte sequence

2010-12-10 Thread Vick Khera
Was the original DB in UTF8 encoding? You need to make sure the new DB is created with the same encoding as the original, or do the necessary translations using something like iconv. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

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

2010-12-10 Thread Vick Khera
On Thu, Dec 9, 2010 at 10:56 PM, Shoaib Mir shoaib...@gmail.com wrote: I guess I misread it... use the following: - Import all the data into say an integer column. - Now create a sequence and give it a start value of where your import ended. - Make the default value for the column using the

Re: [GENERAL] Using regexp_replace to remove small words

2010-12-10 Thread Peter Eisentraut
On fre, 2010-12-10 at 10:47 -0200, Henrique de Lima Trindade wrote: I'm trying to find a regular expression that removes all small (length N) words from a string. But, until now I've not been successful. Here is a start: select regexp_replace('Tommy Lee Jones', $$\y\w{2,3}\y$$, ' ', 'g' );

[GENERAL] pg_dump order of rows

2010-12-10 Thread jan
Hello, today I stumbled across a interesting question about the order rows are dumped out while exporting a database with pg_dump. I know questions like this are around this list sometimes, but I think this is a bit more special. First of all I know that dumping a database is a somewhat

[GENERAL] pg_dump order of rows

2010-12-10 Thread jan
Hello, today I stumbled across a interesting question about the order rows are dumped out while exporting a database with pg_dump. I know questions like this are around this list sometimes, but I think this is a bit more special. First of all I know that dumping a database is a somewhat

[GENERAL] pg_dump order of rows

2010-12-10 Thread jan
Hello, today I stumbled across a interesting question about the order rows are dumped out while exporting a database with pg_dump. I know questions like this are around this list sometimes, but I think this is a bit more special. First of all I know that dumping a database is a somewhat

[GENERAL] GiST indexing question

2010-12-10 Thread Greg Landrum
Hi, I'm attempting to expand an existing postgresql extension and I've run into a wall with the way operator classes should be defined for GiST indices. What I have that works is the following two operators: CREATE OPERATOR @ ( LEFTARG = mol, RIGHTARG = mol, PROCEDURE =