Re: [GENERAL] Pgdump error invalid page header in block

2011-03-04 Thread John R Pierce
On 03/03/11 11:47 PM, tuanhoanganh wrote: Yesterday, I had some problem with postgresql 9.0.2. Today i backup postgres and has error pg_dump: reading dependency data pg_dump: SQL command failed pg_dump: Error message from server: ERROR: invalid page header in block 299 of relation

Re: [GENERAL] invalid byte sequence

2011-03-04 Thread Craig Ringer
On 04/03/11 00:02, Maximilian Tyrtania wrote: After upgrading to pg 9.0.3 (from 8.4.2) on my Mac OS 10.6.2 machine i find this in my log file (a lot): postgres%192.168.254.210%2011-03-03 16:37:30 CET%22021STATEMENT: SELECT pg_file_read('pg_log/postgresql-2011-03-03_00.log', 25, $

[GENERAL] full text search

2011-03-04 Thread zab08
The full text search of postgres is not support Chinese, who can give me some advises?

Re: [GENERAL] updating all records of a table

2011-03-04 Thread Andrew Sullivan
On Thu, Mar 03, 2011 at 08:03:59PM -0700, Gauthier, Dave wrote: Hi: I have to update all the records of a table. I'm worried about what the table will look like in terms of fragmentation when this is finished. Is there some sort of table healing/reorg/rebuild measure I should take if I

Re: [GENERAL] updating all records of a table

2011-03-04 Thread Vibhor Kumar
On Mar 4, 2011, at 5:17 PM, Andrew Sullivan wrote: On Thu, Mar 03, 2011 at 08:03:59PM -0700, Gauthier, Dave wrote: Hi: I have to update all the records of a table. I'm worried about what the table will look like in terms of fragmentation when this is finished. Is there some sort of

Re: [GENERAL] Pgdump error invalid page header in block

2011-03-04 Thread Vibhor Kumar
On Mar 4, 2011, at 1:17 PM, tuanhoanganh wrote: pg_dump: reading dependency data pg_dump: SQL command failed pg_dump: Error message from server: ERROR: invalid page header in block 299 of relation pg_depend_depender_index pg_dump: The command was: SELECT classid, objid, refclassid,

[GENERAL] How to select a list of sequences?

2011-03-04 Thread Kenneth Buckler
How can I select a list of sequences in Postgres 8.4? I'm writing functions which select names of tables, tablespaces, sequences, etc. For example, I can select a list of table names using the following command: SELECT tablename FROM pg_tables WHERE schemaname = 'public'; However, I can't seem

Re: [GENERAL] invalid byte sequence

2011-03-04 Thread Maximilian Tyrtania
Am 04.03.2011 um 11:01 schrieb Craig Ringer: On 04/03/11 00:02, Maximilian Tyrtania wrote: After upgrading to pg 9.0.3 (from 8.4.2) on my Mac OS 10.6.2 machine i find this in my log file (a lot): postgres%192.168.254.210%2011-03-03 16:37:30 CET%22021STATEMENT: SELECT

Re: [GENERAL] Screencasts for PostgreSQL

2011-03-04 Thread James B. Byrne
On Thu, March 3, 2011 09:18, Willy-Bas Loos wrote: maybe this? http://enterprisedb.com/resources-community/webcasts-podcasts-videos http://enterprisedb.com/resources-community/webcasts-podcasts-videos cheers, Thanks for the tip. I am taking a browse through these. -- ***

Re: [GENERAL] How to select a list of sequences?

2011-03-04 Thread Raghavendra
Hi Kenneth, You can retrieve the sequence information from the pg_catalog pg_statio_all_sequences or select * from pg_class where relkind='S' Best Regards, Raghavendra EnterpriseDB Corporation The Enterprise Postgres Company On Fri, Mar 4, 2011 at 7:32 PM, Kenneth Buckler

Re: [GENERAL] How to select a list of sequences?

2011-03-04 Thread Raghavendra
Thank you. Please do add 'pgsql-general@postgresql.org' while replying. Best Regards, Raghavendra EnterpriseDB Corporation The Enterprise Postgres Company On Fri, Mar 4, 2011 at 8:04 PM, Kenneth Buckler kenneth.buck...@gmail.comwrote: Perfect! Thanks a bunch! Ken On Fri, Mar 4, 2011 at

Re: [GENERAL] updating all records of a table

2011-03-04 Thread Rob Sargent
On 03/04/2011 04:54 AM, Vibhor Kumar wrote: On Mar 4, 2011, at 5:17 PM, Andrew Sullivan wrote: On Thu, Mar 03, 2011 at 08:03:59PM -0700, Gauthier, Dave wrote: Hi: I have to update all the records of a table. I'm worried about what the table will look like in terms of fragmentation

Re: [GENERAL] How to select a list of sequences?

2011-03-04 Thread salah jubeh
This might be helpful, as Raghavendrahave a look on relkind SELECT n.nspname as Schema, c.relname as Name, CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as Type, r.rolname as Owner FROM

Re: [GENERAL] updating all records of a table

2011-03-04 Thread Gauthier, Dave
I like the cluster and reindex ideas. The table is not that big and I do have the disk space. This table will also grow over time, so if the table ends up taking more space in the end, that's OK, it'll get used. The DB will also be unavailable to the users while this is happening, so I won't

[GENERAL] gmane?

2011-03-04 Thread Thufir Hawat
Looking at: Group gmane.comp.db.postgresql.general Description General discussion Address pgsql-general@... Status requires subscription to mailing list to post http://dir.gmane.org/gmane.comp.db.postgresql.general Is this info correct? thanks, Thufir -- Sent via pgsql-general mailing

[GENERAL] script errors or PEBKAC?

2011-03-04 Thread Thufir Hawat
I cannot get the script here: https://docs.google.com/leaf?id=0B5hKxkS1VyAxOGMzZjY4ZjktZjZkOS00Zjc3LWExYmEtYTU3ZThjYzZiMjk3hl=en to run correctly. Looking at the output, many, many, errors, it seems to assume tables exist which don't. Is that correct? The script is supposed to create a

Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-03-04 Thread Adrian Klaver
On Thursday, March 03, 2011 6:15:50 pm Aleksey Tsalolikhin wrote: On Tue, Mar 1, 2011 at 7:24 AM, Tom Lane t...@sss.pgh.pa.us wrote: Adrian Klaver adrian.kla...@gmail.com writes: Looks like the TOAST compression is not working on the second machine. Not sure how that could come to be.

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Michael Black
I would check the order in which things are being created in your process. What I usually do is create all the tables sans indexing or constraints (except primary key). Once the table are done, load the data in to the tables that need to be populated. Then constraints, triggers and then

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Adrian Klaver
On 03/04/2011 07:48 AM, Thufir Hawat wrote: I cannot get the script here: https://docs.google.com/leaf?id=0B5hKxkS1VyAxOGMzZjY4ZjktZjZkOS00Zjc3LWExYmEtYTU3ZThjYzZiMjk3hl=en to run correctly. Looking at the output, many, many, errors, it seems to assume tables exist which don't. Is that

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Adrian Klaver
On 03/04/2011 07:48 AM, Thufir Hawat wrote: I cannot get the script here: https://docs.google.com/leaf?id=0B5hKxkS1VyAxOGMzZjY4ZjktZjZkOS00Zjc3LWExYmEtYTU3ZThjYzZiMjk3hl=en to run correctly. Looking at the output, many, many, errors, it seems to assume tables exist which don't. Is that

Re: [GENERAL] I need your help to get opinions about this situation

2011-03-04 Thread Rayner Julio Rodríguez Pimentel
Thanks to David and Greg, your responses helped me so much to organize my ideas. I'm agree with your opinions. The problem is that I have to build a solid data architecture for a comercial system that will have many reading queries and in some peak times many clients executing their. Thanks again.

[GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
Good afternoon. I've been looking at the Oracle Functionality package. It's very interesting. However, the one place I'm stuck is that while user Postgres can access the functions, no other user seems to have access. I'm sure this is something simple I'm missing, but so far Google hasn't shown me

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread John R Pierce
On 03/04/11 1:11 PM, Matt Warner wrote: Good afternoon. I've been looking at the Oracle Functionality package. ... what is this? doesn't sound like anything in PostgreSQL I'm familiar with. Is this part of EntepriseDB's Postgres+ package or something? You should probably contact them via

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
It's a contrib module: http://pgfoundry.org/projects/orafce/ Matt On Fri, Mar 4, 2011 at 1:20 PM, John R Pierce pie...@hogranch.com wrote: On 03/04/11 1:11 PM, Matt Warner wrote: Good afternoon. I've been looking at the Oracle Functionality package. ... what is this? doesn't sound

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
To be clear, this is open source Postgres I'm using, not the enterprise product. Matt On Fri, Mar 4, 2011 at 1:29 PM, Matt Warner m...@warnertechnology.comwrote: It's a contrib module: http://pgfoundry.org/projects/orafce/ Matt On Fri, Mar 4, 2011 at 1:20 PM, John R Pierce

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Vibhor Kumar
On Mar 5, 2011, at 2:50 AM, John R Pierce wrote: On 03/04/11 1:11 PM, Matt Warner wrote: Good afternoon. I've been looking at the Oracle Functionality package. ... what is this? doesn't sound like anything in PostgreSQL I'm familiar with. Is this part of EntepriseDB's Postgres+

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1); ^ HINT: No function matches the given

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
Here's how the script is defining the function, if that helps: CREATE FUNCTION nvl(anyelement, anyelement) RETURNS anyelement AS '$libdir/orafunc','ora_nvl' LANGUAGE C IMMUTABLE; On Fri, Mar 4, 2011 at 1:41 PM, Matt Warner m...@warnertechnology.comwrote: No luck: *** as postgres postgres=#

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Bosco Rama
Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1); ^

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread John R Pierce
On 03/04/11 1:41 PM, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1);

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Vibhor Kumar
On Mar 5, 2011, at 3:11 AM, Matt Warner wrote: postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE 1: select nvl(0,1); ^ HINT: No function matches the given name and argument types. You might need to

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Andrew Sullivan
On Fri, Mar 04, 2011 at 01:41:34PM -0800, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function nvl(integer, integer) does not exist LINE

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:48 PM, Bosco Rama postg...@boscorama.com wrote: Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR: function

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:49 PM, John R Pierce pie...@hogranch.com wrote: On 03/04/11 1:41 PM, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user offload= select nvl(0,1); ERROR:

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Bosco Rama
Matt Warner wrote: The function cannot be defined in the user's DB because language C is considered a security risk, so only the superuser can do that. Or that's what I get from reading anyway... psql -U postgres -d user_db will allow the superuser to then define the function in the user's

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:51 PM, Andrew Sullivan a...@crankycanuck.ca wrote: On Fri, Mar 04, 2011 at 01:41:34PM -0800, Matt Warner wrote: No luck: *** as postgres postgres=# GRANT all on function nvl(anyelement,anyelement) to public; GRANT postgres=# *** as unprivileged user

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 1:56 PM, Bosco Rama postg...@boscorama.com wrote: Matt Warner wrote: The function cannot be defined in the user's DB because language C is considered a security risk, so only the superuser can do that. Or that's what I get from reading anyway... psql -U postgres

Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-03-04 Thread Aleksey Tsalolikhin
On Fri, Mar 4, 2011 at 7:53 AM, Adrian Klaver adrian.kla...@gmail.com wrote: Weird. The pgstattuple data shows that the tables are essentially the same, the only difference being the dead tuples, as expected, on the production table. The TOAST size information shows approximately a

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread John R Pierce
On 03/04/11 1:57 PM, Matt Warner wrote: Not sure. I believe public and pg_catalog are in the path by default. Most of the create function declarations prepend pg_catalog, and I believe I saw somewhere that pg_catalog is the default. But I may be misunderstanding that... CREATE FUNCTION

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Matt Warner
On Fri, Mar 4, 2011 at 2:03 PM, John R Pierce pie...@hogranch.com wrote: On 03/04/11 1:57 PM, Matt Warner wrote: Not sure. I believe public and pg_catalog are in the path by default. Most of the create function declarations prepend pg_catalog, and I believe I saw somewhere that pg_catalog is

Re: [GENERAL] updating all records of a table

2011-03-04 Thread Chris Browne
robjsarg...@gmail.com (Rob Sargent) writes: On 03/04/2011 04:54 AM, Vibhor Kumar wrote: On Mar 4, 2011, at 5:17 PM, Andrew Sullivan wrote: On Thu, Mar 03, 2011 at 08:03:59PM -0700, Gauthier, Dave wrote: Hi: I have to update all the records of a table. I'm worried about what the table

[GENERAL] Significance of numbers in server errors?

2011-03-04 Thread Sebastien Boisvert
I'm wondering if there's a description anywhere of the significance of number reported in errors; for example I've recently run into this error: ERROR: could not read block 132 of relation 1663/16430/1249: read only 0 of 8192 bytes From some documentation I've read

Re: [GENERAL] Significance of numbers in server errors?

2011-03-04 Thread Peter Geoghegan
On 4 March 2011 23:15, Sebastien Boisvert sebastienboisv...@yahoo.com wrote:  I know the second is the database's directory, the last is the pg_attribute table (in this example), but I haven't figured out what the first is. I think that the first is probably the tablespace: postgres=# select

Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-03-04 Thread Adrian Klaver
On Friday, March 04, 2011 2:03:23 pm Aleksey Tsalolikhin wrote: On Fri, Mar 4, 2011 at 7:53 AM, Adrian Klaver adrian.kla...@gmail.com wrote: Weird. The pgstattuple data shows that the tables are essentially the same, the only difference being the dead tuples, as expected, on the production

Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-03-04 Thread Aleksey Tsalolikhin
On Fri, Mar 4, 2011 at 4:45 PM, Adrian Klaver adrian.kla...@gmail.com wrote: On Friday, March 04, 2011 2:03:23 pm Aleksey Tsalolikhin wrote: On Fri, Mar 4, 2011 at 7:53 AM, Adrian Klaver adrian.kla...@gmail.com wrote: What is the data being stored in the table? For the main part, it's an

[GENERAL] test data

2011-03-04 Thread Andy Colson
I seem to like having more realistic test data, to that end I have collected a large number of first names and last names over the last few years. Now I'd kinda like to collect business names. I've been searching around and cannot find anything. I was wondering if anyone had any business

Re: [GENERAL] database is bigger after dump/restore - why? (60 GB to 109 GB)

2011-03-04 Thread Adrian Klaver
On Friday, March 04, 2011 5:11:04 pm Aleksey Tsalolikhin wrote: On Fri, Mar 4, 2011 at 4:45 PM, Adrian Klaver adrian.kla...@gmail.com wrote: On Friday, March 04, 2011 2:03:23 pm Aleksey Tsalolikhin wrote: On Fri, Mar 4, 2011 at 7:53 AM, Adrian Klaver adrian.kla...@gmail.com wrote: What is

Re: [GENERAL] test data

2011-03-04 Thread David Johnston
You could try online yellow-pages and extract names from the HTML; I did this a long time ago for some reason. There may be copyright issues to consider but if you are using it for internal test data... -Original Message- From: pgsql-general-ow...@postgresql.org

Re: [GENERAL] invalid byte sequence

2011-03-04 Thread Craig Ringer
On 4/03/2011 10:18 PM, Maximilian Tyrtania wrote: Am 04.03.2011 um 11:01 schrieb Craig Ringer: On 04/03/11 00:02, Maximilian Tyrtania wrote: After upgrading to pg 9.0.3 (from 8.4.2) on my Mac OS 10.6.2 machine i find this in my log file (a lot): postgres%192.168.254.210%2011-03-03 16:37:30