[GENERAL] text search in 8.1

2010-02-22 Thread AI Rumman
Does Postgresql 8.1 support Full Text Search? If yes, please provide the link about documentation.

Re: [GENERAL] text search in 8.1

2010-02-22 Thread David Fetter
On Mon, Feb 22, 2010 at 02:47:00PM +0600, AI Rumman wrote: Does Postgresql 8.1 support Full Text Search? If yes, please provide the link about documentation. It's available as an add-on, but since 8.1 is so close to its end of life, consider moving to 8.4 first, or if the project is out past Q3

Re: [GENERAL] text search in 8.1

2010-02-22 Thread AI Rumman
I have a plan to upgrade database, but right now I have to use text search indexing for performance improvement. Following is the rpm status of my server: [r...@vcrmdev01 ~]# rpm -qa|grep postgres postgresql-8.1.11-1.el5_1.1 postgresql-python-8.1.11-1.el5_1.1 postgresql-server-8.1.11-1.el5_1.1

[GENERAL] Missing clog, PITR

2010-02-22 Thread Patryk Sidzina
Hello everyone, my company has been using pg_standby as a replication solution for a while and it has been working great for our needs. Unfortunately, about once a month we get the following error on the standby bases: vacuumdb: vacuuming of database failed: ERROR: could not access status

[GENERAL] What is unsecure postgres languages? How to disable them?

2010-02-22 Thread dipti shah
Hi, Could anyone please tell me what is unsecure postgres languages(like C, pgperl, pgpython??). How to disable them or restrict them only for super user? Thanks, Dipti

[GENERAL] helo

2010-02-22 Thread beulah prasanthi
Helo I am working on spring project with postgres 8.4 i wrote a function in postgrees which i am passing the argument email email[] array From front end we need to insesrt data into that emailarray .so i used java.arraylist.util while i am running i got the following error Please help me

[GENERAL] Questions regarding SET option.

2010-02-22 Thread Jignesh Shah
Hello All, I have been writing a function with SECURITY DEFINER enabled. Basically, I am looking for ways to override the users SET option settings while executing my function to prevent the permissions breach. For example, to override SET search_path, I am setting search path in my function

[GENERAL] TypeCast: util.list to array type

2010-02-22 Thread beulah prasanthi
Helo I am working on spring project with postgres 8.4 i wrote a function in postgrees which i am passing the argument email email[] array From front end we need to insesrt data into that emailarray .so i used java.arraylist.util while i am running i got the following error Please help me

Re: [GENERAL] Questions regarding SET option.

2010-02-22 Thread Pavel Stehule
Hello you can overwrite standard settings only for function CREATE [ OR REPLACE ] FUNCTION name ( [ [ argmode ] [ argname ] argtype [ { DEFAULT | = } default_expr ] [, ...] ] ) [ RETURNS rettype | RETURNS TABLE ( column_name column_type [, ...] ) ] { LANGUAGE lang_name |

Re: [GENERAL] What is unsecure postgres languages? How to disable them?

2010-02-22 Thread Tino Wildenhain
Hi, Am 22.02.2010 11:56, schrieb dipti shah: Hi, Could anyone please tell me what is unsecure postgres languages(like C, pgperl, pgpython??). How to disable them or restrict them only for super user? They are already restricted for the super user because of their insecure nature. That means

[GENERAL] tsearch2 gives NOTICE: word is too long

2010-02-22 Thread AI Rumman
When I am using the query: select length(description), to_tsvector('default',description) as c from crmentity ; Getting error: NOTICE: word is too long Postgresql 8.1. Could anyone please tell me why?

Re: [GENERAL] Asynchronous queries - processing listen (notify) in a procedural language

2010-02-22 Thread Merlin Moncure
On Sun, Feb 21, 2010 at 10:32 PM, Merlin Moncure mmonc...@gmail.com wrote: On Sun, Feb 21, 2010 at 9:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com writes: On Sat, Feb 20, 2010 at 9:38 PM, Petr Chmelar chmel...@fit.vutbr.cz wrote: Is there a way how to listen and

[GENERAL] pgsql exception.

2010-02-22 Thread Ravi
Hi, while passing util list to Postgres stored procedure getting an exception saying *org.postgresql.util.PSQLException: Cannot cast an instance of java.util.ArrayList to type Types.ARRAY* can you help to resolve it? its urgent Method in Dao public void savePerson(Person person, ListAddress

[GENERAL] ECPG: No multidimensional array support for simple data types

2010-02-22 Thread mike stanton
Hello all, I get the following error message when ecpg precompiles an EXEC SQL INCLUDE on this variable: short cst_vent[MAX_SUC][12]; (MAX_SUC is defined as 24) Mesage: No multidimensional array support for simple data types Is there a fix or am I stuck? Version: PostgreSQL

Re: [GENERAL] ECPG: No multidimensional array support for simple data types

2010-02-22 Thread Boszormenyi Zoltan
mike stanton írta: Hello all, I get the following error message when ecpg precompiles an EXEC SQL INCLUDE on this variable: short cst_vent[MAX_SUC][12]; (MAX_SUC is defined as 24) Mesage: No multidimensional array support for simple data types Is there a fix or am I

Re: [GENERAL] Questions regarding SET option.

2010-02-22 Thread Albe Laurenz
Jignesh Shah wrote: I have been writing a function with SECURITY DEFINER enabled. Basically, I am looking for ways to override the users SET option settings while executing my function to prevent the permissions breach. For example, to override SET search_path, I am setting search path in

Re: [GENERAL] What is unsecure postgres languages? How to disable them?

2010-02-22 Thread Albe Laurenz
dipti shah wrote: Could anyone please tell me what is unsecure postgres languages(like C, pgperl, pgpython??). How to disable them or restrict them only for super user? I have never heard of unsecure languages - what exactly do you mean? If you mean untrusted languages like PL/PerlU, they

Re: [GENERAL] text search in 8.1

2010-02-22 Thread Albe Laurenz
AI Rumman wrote: I have a plan to upgrade database, but right now I have to use text search indexing for performance improvement. Following is the rpm status of my server: [r...@vcrmdev01 ~]# rpm -qa|grep postgres postgresql-8.1.11-1.el5_1.1 postgresql-python-8.1.11-1.el5_1.1

Re: [GENERAL] tsearch2 gives NOTICE: word is too long

2010-02-22 Thread Albe Laurenz
AI Rumman wrote: When I am using the query: select length(description), to_tsvector('default',description) as c from crmentity ; Getting error: NOTICE: word is too long Postgresql 8.1. Could anyone please tell me why? Because there is a word in the description column that

Re: [GENERAL] helo

2010-02-22 Thread Allan Kamau
On Mon, Feb 22, 2010 at 2:10 PM, beulah prasanthi itsbeu...@gmail.com wrote: Helo I am working on spring project with postgres 8.4 i wrote a function in postgrees which i am passing the argument email email[] array From front end we need to insesrt data into that emailarray .so i used

[GENERAL] Performance cost of a sort-merge join

2010-02-22 Thread Yang Zhang
Hi, I have the given tables and query, but I'm confused why the cost of the query is so high. I've left it running over night. By comparison, a select * from metarelcloud_transactionlog order by transactionid takes on the order of seconds/minutes (at least in MySQL). As far as I can tell, the

Re: [GENERAL] Performance cost of a sort-merge join

2010-02-22 Thread Tom Lane
Yang Zhang yanghates...@gmail.com writes: Hi, I have the given tables and query, but I'm confused why the cost of the query is so high. The reason the estimated cost is so high is that the estimated number of rows out of the join is enormous. It's going to take awhile. One question worth

Re: [GENERAL] Un successful Restoration of DATA using WAL files

2010-02-22 Thread Bruce Momjian
Based on your suggestions, I have applied the attached patch to mention _not_ to use pg_dump or pg_dumpall in two places, and to briefly explain why. Thanks. --- Craig Ringer wrote: On Mon, 2009-10-19 at 07:18 -0700,

Re: [GENERAL] [BUGS] helo

2010-02-22 Thread Kris Jurka
On Mon, 22 Feb 2010, beulah prasanthi wrote: Helo I am working on spring project with postgres 8.4 i wrote a function in postgrees which i am passing the argument email email[] array From front end we need to insesrt data into that emailarray .so i used java.arraylist.util while i am

Re: [GENERAL] What is unsecure postgres languages? How to disable them?

2010-02-22 Thread dipti shah
Sorry Albe for confusion. Yes, I meant untrusted languages like C, PL/PerlU, PL/PythonU etc... Thanks a lot you and Tino for nice reply. Could you guys tell me how could I verify whether those languages are installed on my PostGreSQL server? Thanks for being there, Dipti On Mon, Feb 22, 2010 at

Re: [GENERAL] [BUGS] helo

2010-02-22 Thread Kevin Grittner
Kris Jurka bo...@ejurka.com wrote: You need to pass an instance of java.sql.Array, not a Collection or something else that is array like. Ah, right. After extracting an array from the java.util.ArrayList, it needs to be turned into a java.sql.Array using the Connection.createArrayOf method.

Re: [GENERAL] Performance cost of a sort-merge join

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 12:10 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've left it running over night. By comparison, a select * from metarelcloud_transactionlog order by transactionid takes on the order of seconds/minutes (at least in MySQL). That's got approximately nothing to do with this

Re: [GENERAL] Questions regarding SET option.

2010-02-22 Thread Jignesh Shah
Thanks a ton Laurenz and Pavel for your responses but I really didn't follow you. I am not master in PostGreSQL yet. Could you please give me some example? Basically, I want to know how many such SET options I should reset before executing my function and at the end it should also be restored to

Re: [GENERAL] What is unsecure postgres languages? How to disable them?

2010-02-22 Thread Scott Bailey
dipti shah wrote: Sorry Albe for confusion. Yes, I meant untrusted languages like C, PL/PerlU, PL/PythonU etc... Thanks a lot you and Tino for nice reply. Could you guys tell me how could I verify whether those languages are installed on my PostGreSQL server? Thanks for being there, Dipti

[GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
I have the exact same table of data in both MySQL and Postgresql. In Postgresql: tpcc=# \d metarelcloud_transactionlog Table public.metarelcloud_transactionlog Column| Type | Modifiers

Re: [GENERAL] Questions regarding SET option.

2010-02-22 Thread Pavel Stehule
2010/2/22 Jignesh Shah jignesh.shah1...@gmail.com: Thanks a ton Laurenz and Pavel for your responses but I really didn't follow you. I am not master in PostGreSQL yet. Could you please give me some example? Basically, I want to know how many such SET options I should reset before executing

[GENERAL] SET Role doesn't work from Security Definer Function...

2010-02-22 Thread dipti shah
Hi, I have just noticed that SET ROLE doesn't work from security definer function. I don;t know why but it clearly gives the error that SET role doesn;t work in security definer context. Basically, I am trying to write a store procedure which creates a table asked by user along with other

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Pavel Stehule
hello the speed depends on setting of working_memory. Try to increase a working_memory set working_memory to '10MB'; Regards Pavel Stehule 2010/2/22 Yang Zhang yanghates...@gmail.com: I have the exact same table of data in both MySQL and Postgresql. In Postgresql: tpcc=# \d

[GENERAL] Complex SELECT Statement help needed

2010-02-22 Thread flashbangpop
I'm new to postgres and am trying to display rows in a table that are have a value between 2 fields. The rows I want to display should be selected by the grademin or grademax fields. I'd like to display the rows in sections that are labeled Grades 3-5, 6-8, and 9-12. The problem that I am

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Frank Heikens
There is no index on the column transactionid in your PostgreSQL- table, as there is in your MySQL-table. This explains the difference. CREATE INDEX i_transactionid ON public.metarelcloud_transactionlog (transactionid); Op 22 feb 2010, om 19:10 heeft Yang Zhang het volgende geschreven: I

Re: [GENERAL] Complex SELECT Statement help needed

2010-02-22 Thread Raymond O'Donnell
On 22/02/2010 18:14, flashbangpop wrote: I'm new to postgres and am trying to display rows in a table that are have a value between 2 fields. The rows I want to display should be selected by the grademin or grademax fields. I'd like to display the rows in sections that are labeled Grades

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Richard Broersma
On Mon, Feb 22, 2010 at 10:17 AM, Frank Heikens frankheik...@mac.com wrote: There is no index on the column transactionid in your PostgreSQL-table, as there is in your MySQL-table. This explains the difference. CREATE INDEX i_transactionid ON public.metarelcloud_transactionlog

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule pavel.steh...@gmail.com wrote: hello the speed depends on setting of working_memory. Try to increase a working_memory set working_memory to '10MB'; It's already at tpcc=# show work_mem; work_mem -- 2kB (1 row) I also wouldn't

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 1:30 PM, Richard Broersma richard.broer...@gmail.com wrote: On Mon, Feb 22, 2010 at 10:17 AM, Frank Heikens frankheik...@mac.com wrote: There is no index on the column transactionid in your PostgreSQL-table, as there is in your MySQL-table. This explains the difference.

Re: [GENERAL] Questions regarding SET option.

2010-02-22 Thread Jignesh Shah
set work_mem to '1MB' set search_path = 'public'; Thanks for the example Pavel. I understood it. Are there any other SET options except above that I need to set to prevent security breach? Thanks, Jack On Mon, Feb 22, 2010 at 11:41 PM, Pavel Stehule pavel.steh...@gmail.comwrote: 2010/2/22

Re: [GENERAL] Questions regarding SET option.

2010-02-22 Thread Pavel Stehule
2010/2/22 Jignesh Shah jignesh.shah1...@gmail.com: set work_mem to '1MB' set search_path = 'public'; Thanks for the example Pavel. I understood it. Are there any other SET options except above that I need to set to prevent security breach? I am not sure - I know only search_path Pavel

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Frank Heikens
Op 22 feb 2010, om 19:30 heeft Richard Broersma het volgende geschreven: On Mon, Feb 22, 2010 at 10:17 AM, Frank Heikens frankheik...@mac.com wrote: There is no index on the column transactionid in your PostgreSQL- table, as there is in your MySQL-table. This explains the difference.

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Alban Hertroys
On 22 Feb 2010, at 19:35, Yang Zhang wrote: I also wouldn't have imagined an external merge-sort as being very Where's that external merge-sort coming from? Can you show an explain analyze? If your work-mem is too low there's a good chance that Postgres has to use your disks for sorting,

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Alvaro Herrera
Yang Zhang escribió: I'm running: select * from metarelcloud_transactionlog order by transactionid; It takes MySQL 6 minutes, but Postgresql is still running after 70 minutes. Is there something like a glaring misconfiguration that I'm overlooking? Thanks in advance. How large is the

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 1:48 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 22 Feb 2010, at 19:35, Yang Zhang wrote: I also wouldn't have imagined an external merge-sort as being very Where's that external merge-sort coming from? Can you show an explain analyze? I just

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 2:03 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Yang Zhang escribió: I'm running:   select * from metarelcloud_transactionlog order by transactionid; It takes MySQL 6 minutes, but Postgresql is still running after 70 minutes. Is there something like a

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Frank Heikens
Op 22 feb 2010, om 20:07 heeft Yang Zhang het volgende geschreven: On Mon, Feb 22, 2010 at 1:48 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 22 Feb 2010, at 19:35, Yang Zhang wrote: I also wouldn't have imagined an external merge-sort as being very Where's that

[GENERAL] Info about concurrent sequential scans

2010-02-22 Thread Daniele Varrazzo
Hello, at Prato PgDay in 2007 I remember hearing in a speech about a (then yet to come) seqscan piggyback feature, allowing concurrent sequential scans to use the same disk reads. I've now googled for info about this feature, but I found nothing conclusive (e.g. [1], [2] - which I don't know

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 2:15 PM, Frank Heikens frankheik...@mac.com wrote: Op 22 feb 2010, om 20:07 heeft Yang Zhang het volgende geschreven: On Mon, Feb 22, 2010 at 1:48 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 22 Feb 2010, at 19:35, Yang Zhang wrote: I also

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Alvaro Herrera
Yang Zhang escribió: I have the exact same table of data in both MySQL and Postgresql. In Postgresql: I just noticed two things: [snip lots of stuff] 1. ) ENGINE=MyISAM AUTO_INCREMENT=50410166 DEFAULT CHARSET=latin1 You're doing a comparison to MyISAM. 2. select * from

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 2:27 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Yang Zhang escribió: I have the exact same table of data in both MySQL and Postgresql. In Postgresql: I just noticed two things: [snip lots of stuff] 1. ) ENGINE=MyISAM AUTO_INCREMENT=50410166 DEFAULT

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 12:30 PM, Yang Zhang yanghates...@gmail.com wrote: This isn't some microbenchmark. This is part of our actual analytical application. We're running large-scale graph partitioning algorithms. It's important to see how it runs if you can fit more / most of the data set

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Frank Heikens
Op 22 feb 2010, om 20:28 heeft Yang Zhang het volgende geschreven: If your work-mem is too low there's a good chance that Postgres has to use your disks for sorting, which will obviously be quite slow. Relative to the non-terminating 80-minute-so-far sort, Unix sort runs much

Re: [GENERAL] Complex SELECT Statement help needed

2010-02-22 Thread flashbangpop
Thanks, I got these working: $query = SELECT lessonwebid,lessontitle,gradelevel,grademin,grademax,reviewedby FROM lessonplans WHERE grademin = 3 AND grademin = 5 OR grademax = 3 AND grademax = 5; Raymond O'Donnell wrote: On 22/02/2010 18:14, flashbangpop wrote: I'm new to postgres and

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 2:39 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 12:30 PM, Yang Zhang yanghates...@gmail.com wrote: This isn't some microbenchmark. This is part of our actual analytical application. We're running large-scale graph partitioning algorithms.

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang yanghates...@gmail.com wrote: I have the exact same table of data in both MySQL and Postgresql. In Postgresql: Just wondering, are these on the same exact machine? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Info about concurrent sequential scans

2010-02-22 Thread Bruce Momjian
Daniele Varrazzo wrote: Hello, at Prato PgDay in 2007 I remember hearing in a speech about a (then yet to come) seqscan piggyback feature, allowing concurrent sequential scans to use the same disk reads. I've now googled for info about this feature, but I found nothing conclusive (e.g. [1],

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 2:52 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang yanghates...@gmail.com wrote: I have the exact same table of data in both MySQL and Postgresql. In Postgresql: Just wondering, are these on the same exact machine?

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 12:50 PM, Yang Zhang yanghates...@gmail.com wrote: On Mon, Feb 22, 2010 at 2:39 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 12:30 PM, Yang Zhang yanghates...@gmail.com wrote: This isn't some microbenchmark. This is part of our actual

Re: [GENERAL] Info about concurrent sequential scans

2010-02-22 Thread Andreas Kretschmer
Daniele Varrazzo daniele.varra...@gmail.com wrote: Hello, at Prato PgDay in 2007 I remember hearing in a speech about a (then yet to come) seqscan piggyback feature, allowing concurrent sequential scans to use the same disk reads. I've now googled for info about this feature, but I found

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 2:41 PM, Frank Heikens frankheik...@mac.com wrote: Op 22 feb 2010, om 20:28 heeft Yang Zhang het volgende geschreven: If your work-mem is too low there's a good chance that Postgres has to use your disks for sorting, which will obviously be quite slow. Relative to

Re: [GENERAL] Missing clog, PITR

2010-02-22 Thread Richard Huxton
On 22/02/10 09:57, Patryk Sidzina wrote: Hello everyone, my company has been using pg_standby as a replication solution for a while and it has been working great for our needs. Unfortunately, about once a month we get the following error on the standby bases: vacuumdb: vacuuming of database

Re: [GENERAL] Info about concurrent sequential scans

2010-02-22 Thread Daniele Varrazzo
On Mon, Feb 22, 2010 at 7:59 PM, Andreas Kretschmer akretsch...@spamfence.net wrote: Daniele Varrazzo daniele.varra...@gmail.com wrote: Hello, at Prato PgDay in 2007 I remember hearing in a speech about a (then yet to come) seqscan piggyback feature, allowing concurrent sequential scans to

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yeb Havinga
Scott Marlowe wrote: On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang yanghates...@gmail.com wrote: I have the exact same table of data in both MySQL and Postgresql. In Postgresql: Just wondering, are these on the same exact machine? Just reading up on this interesting thread. WFIW, 2

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Tom Lane
Yang Zhang yanghates...@gmail.com writes: On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule pavel.steh...@gmail.com wrote: the speed depends on setting of working_memory. Try to increase a working_memory It's already at 2kB According to your original posting, you're trying to sort

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 12:53 PM, Yang Zhang yanghates...@gmail.com wrote: On Mon, Feb 22, 2010 at 2:52 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang yanghates...@gmail.com wrote: I have the exact same table of data in both MySQL and Postgresql.

Re: [GENERAL] SET Role doesn't work from Security Definer Function...

2010-02-22 Thread Tom Lane
dipti shah shahdipti1...@gmail.com writes: I have just noticed that SET ROLE doesn't work from security definer function. I don;t know why but it clearly gives the error that SET role doesn;t work in security definer context. This is intentional because allowing it creates security holes. If

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 3:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Yang Zhang yanghates...@gmail.com writes: On Mon, Feb 22, 2010 at 1:13 PM, Pavel Stehule pavel.steh...@gmail.com wrote: the speed depends on setting of working_memory. Try to increase a working_memory It's already at  

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Tom Lane
Yeb Havinga yebhavi...@gmail.com writes: Just reading up on this interesting thread. WFIW, 2 years ago I and a collegue of mine did a hardware comparison of early Intel and AMD desktop quadcore processors to run postgres database, with most other parts comparable. The intel processor was 20

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Igor Neyman
When in doubt - test. Why not remove index in MySQL (or create index in PostgreSQL) and see what happens. Why trying compare apples and oranges? Igor Neyman -Original Message- From: Yang Zhang [mailto:yanghates...@gmail.com] Sent: Monday, February 22, 2010 1:37 PM To: Richard

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 5:31 PM, Igor Neyman iney...@perceptron.com wrote: When in doubt - test. Why not remove index in MySQL (or create index in PostgreSQL) and see what happens. Why trying compare apples and oranges? Continue reading this thread -- I also tried using an index in

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 3:33 PM, Yang Zhang yanghates...@gmail.com wrote: On Mon, Feb 22, 2010 at 5:31 PM, Igor Neyman iney...@perceptron.com wrote: When in doubt - test. Why not remove index in MySQL (or create index in PostgreSQL) and see what happens. Why trying compare apples and oranges?

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 3:33 PM, Yang Zhang yanghates...@gmail.com wrote: On Mon, Feb 22, 2010 at 5:31 PM, Igor Neyman iney...@perceptron.com wrote: When in doubt - test. Why not remove index in MySQL (or create index in PostgreSQL) and see what happens. Why trying compare apples and oranges?

Re: [GENERAL] tuning bgwriter in 8.4.2

2010-02-22 Thread Ben Chobot
On Feb 17, 2010, at 6:38 PM, Greg Smith wrote: Ben Chobot wrote: Is there a way to tell if I really am just keeping the same few pages dirty throughout every checkpoint? I wouldn't have expected that, but given our application I suppose it is possible. You can install pg_buffercache and

Re: [GENERAL] tuning bgwriter in 8.4.2

2010-02-22 Thread Greg Smith
Ben Chobot wrote: Is it reading it correctly to say that the bgwriter probably wouldn't help much, because a majority of the dirty pages appear to be popular? Yes. The background writer cleaner process only does something useful if there are pages with low usage counts it can evict. You

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Alex Hunsaker
On Mon, Feb 22, 2010 at 11:10, Yang Zhang yanghates...@gmail.com wrote: I have the exact same table of data in both MySQL and Postgresql. In ? Postgresql: FWIW on a stock (unchanged postgresql.conf) 8.3.9 I get (best of 3 runs) 79 seconds, 26 using an index and 27 seconds with it clustered.

[GENERAL] Anyone interested in a San Diego Postgres Users Group (SD-PUG)?

2010-02-22 Thread Joe Conway
Anyone out there interested in a San Diego PostgreSQL Users Group? If so, I created a meetup here: http://www.meetup.com/SD-PUG/ Please sign up and contact me off list. Thanks, Joe signature.asc Description: OpenPGP digital signature

[GENERAL] Table Column Retrieval

2010-02-22 Thread dmp
Recently I read that one of the distinctions between a standard database and a columnar one, which led to an increase in its efficiency, was and I quote: Only relevant columns are retrieved (A row-wise database would pull all columns and typically discard 80-95% of them) Is this true of

Re: [GENERAL] Table Column Retrieval

2010-02-22 Thread Joshua Tolley
On Mon, Feb 22, 2010 at 07:23:09PM -0700, dmp wrote: Recently I read that one of the distinctions between a standard database and a columnar one, which led to an increase in its efficiency, was and I quote: Only relevant columns are retrieved (A row-wise database would pull all columns

[GENERAL] how do I do dump and restore without bugging with constraint?

2010-02-22 Thread Net Tree Inc.
Hi all, I am dumping both schema and data from old database to new one. The new database schema is somehow contain slightly different schema then the old one. When I do restore it shown alot errors related with constraints. How can I dump and to restore from old to new without dealing with

[GENERAL] Re: [ADMIN] how do I do dump and restore without bugging with constraint?

2010-02-22 Thread Kevin Grittner
Net Tree Inc. wrote: When I do restore it shown alot errors related with constraints. How can I dump and to restore from old to new without dealing with constraint and just forces data dump to where it suppose to belong? What version are you dumping from and to? Exactly what errors are

Re: [GENERAL] how do I do dump and restore without bugging with constraint?

2010-02-22 Thread John R Pierce
Net Tree Inc. wrote: Hi all, I am dumping both schema and data from old database to new one. The new database schema is somehow contain slightly different schema then the old one. When I do restore it shown alot errors related with constraints. How can I dump and to restore from old to new

Re: [GENERAL] COPY command character set

2010-02-22 Thread Bruce Momjian
I have updated the documentation to be more direct about COPY encoding behavior. Patch attached and applied. --- Peter Headland wrote: Maybe the link might help?

Re: [GENERAL] comment on constraint

2010-02-22 Thread Bruce Momjian
Andreas Kretschmer wrote: Hi, There is a question in the german pg-forum: It is possible to add a comment on a constraint, but \dd doesn't display that comment. There is also a old question in this mailing-list without an answer:

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
nOn Mon, Feb 22, 2010 at 3:45 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 12:53 PM, Yang Zhang yanghates...@gmail.com wrote: On Mon, Feb 22, 2010 at 2:52 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 11:10 AM, Yang Zhang

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Mon, Feb 22, 2010 at 9:30 PM, Alex Hunsaker bada...@gmail.com wrote: On Mon, Feb 22, 2010 at 11:10, Yang Zhang yanghates...@gmail.com wrote: I have the exact same table of data in both MySQL and Postgresql. In ? Postgresql: FWIW on a stock (unchanged postgresql.conf) 8.3.9 I get (best of

Re: [GENERAL] COPY command character set

2010-02-22 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I have updated the documentation to be more direct about COPY encoding behavior. Patch attached and applied. Uh, why exactly do you find that better? Processes data seems a lot vaguer to me than the previous wording. I certainly don't think that this

Re: [GENERAL] COPY command character set

2010-02-22 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I have updated the documentation to be more direct about COPY encoding behavior. Patch attached and applied. Uh, why exactly do you find that better? Processes data seems a lot vaguer to me than the previous wording. I certainly

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Tom Lane
Yang Zhang yanghates...@gmail.com writes: # select count(1) from (SELECT * from metarelcould_transactionlog order by transactionid) as foo; Does it strike anyone else that the query optimizer/rewriter should be able to toss out the sort from such a query altogether? It could, if it knew that

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Tom Lane
Yang Zhang yanghates...@gmail.com writes: I'm relieved that Postgresql itself does not, in fact, suck, but slightly disappointed in the behavior of psql. I suppose it needs to buffer everything in memory to properly format its tabular output, among other possible reasons I could imagine.

Re: [GENERAL] how do I do dump and restore without bugging with constraint?

2010-02-22 Thread Net Tree Inc.
Ok, I am just trying to find the proper way to back and restore database that contain restriction. The other way to ask. If I have two 99% schema similar databases. The old one might contain few columns that does not exist in the new one and contain constrains that the new DB does not have. In

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 10:51 PM, Yang Zhang yanghates...@gmail.com wrote: nOn Mon, Feb 22, 2010 at 3:45 PM, Scott Marlowe scott.marl...@gmail.com wrote: What do things like vmstat 10 say while the query is running on each db?  First time, second time, things like that. Awesome -- this

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Alex Hunsaker
On Mon, Feb 22, 2010 at 22:51, Yang Zhang yanghates...@gmail.com wrote: vmstat showed no swapping-out for a while, and then suddenly it started spilling a lot. Checking psql's memory stats showed that it was huge -- apparently, it's trying to store its full result set in memory. As soon as I

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-22 Thread Yang Zhang
On Tue, Feb 23, 2010 at 1:48 AM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Feb 22, 2010 at 10:51 PM, Yang Zhang yanghates...@gmail.com wrote: nOn Mon, Feb 22, 2010 at 3:45 PM, Scott Marlowe scott.marl...@gmail.com wrote: What do things like vmstat 10 say while the query is

[GENERAL] How to Output PSQL Errors to a Log File?

2010-02-22 Thread Wang, Mary Y
Hi, I used 'pg_dumpall' to dump the database in Postgres 7.1.3 and I'm in the process of restoring the databases in Postgres 8.3.8. There were lots errors showed on the screen when I ran this command 'psql -e template1 -f 21.bak' and it actually displayed the line numbers where the errors

Re: [GENERAL] How to Output PSQL Errors to a Log File?

2010-02-22 Thread Joshua D. Drake
On Mon, 22 Feb 2010 23:19:34 -0800, Wang, Mary Y mary.y.w...@boeing.com wrote: Hi, I used 'pg_dumpall' to dump the database in Postgres 7.1.3 and I'm in the process of restoring the databases in Postgres 8.3.8. There were lots errors showed on the screen when I ran this command 'psql -e

Re: [GENERAL] How to Output PSQL Errors to a Log File?

2010-02-22 Thread John R Pierce
Wang, Mary Y wrote: Hi, I used 'pg_dumpall' to dump the database in Postgres 7.1.3 and I'm in the process of restoring the databases in Postgres 8.3.8. There were lots errors showed on the screen when I ran this command 'psql -e template1 -f 21.bak' and it actually displayed the line

Re: [GENERAL] How to Output PSQL Errors to a Log File?

2010-02-22 Thread Nilesh Govindarajan
On 02/23/2010 12:54 PM, Nilesh Govindarajan wrote: On 02/23/2010 12:49 PM, Wang, Mary Y wrote: Hi, I used 'pg_dumpall' to dump the database in Postgres 7.1.3 and I'm in the process of restoring the databases in Postgres 8.3.8. There were lots errors showed on the screen when I ran this command

Re: [GENERAL] how do I do dump and restore without bugging with constraint?

2010-02-22 Thread Scott Marlowe
On Mon, Feb 22, 2010 at 11:39 PM, Net Tree Inc. nettree...@gmail.com wrote: Ok, I am just trying to find the proper way to back and restore database that contain restriction. The other way to ask. If I have two 99% schema similar databases. The old one might contain few columns that does not

Re: [GENERAL] How to Output PSQL Errors to a Log File?

2010-02-22 Thread Wang, Mary Y
No. I dumped the 7.1 with the 7.1 version of pg_dump. Is it better to dump with the 8.3 version of pg_dump? I thought I read it some where in the mailing lists. I don't know how I would be able to dump with the 8.3 version of pg_dump. The database and Postgres 7.1 is loaded on the current

  1   2   >