[GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Catalin BOIE
Hello! I have a serious problem with one of my tables. Version: postgresql-server-8.4.3-1.fc12.x86_64 Kernel: kernel-2.6.32.11-99.fc12.x86_64 I reindexed all indexes on that table, but I still cannot workaround this problem. Memory is ECC and the storage is RAID10 (BIOS reported it OK). How I

Re: [GENERAL] Clustering, parallelised operating system, super-computing

2010-05-14 Thread Brian Modra
On 14/05/2010, Bruce Momjian br...@momjian.us wrote: Brian Modra wrote: Hi, I've been told that PostgreSQL and other similar databases don't work well on a parallelised operating system because they make good use of shared memory which does not cross the boundary between nodes in a cluster.

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Leonardo F
Personally I would lean toward making the bulk of security within the application so to simplify everything - the database would do what it does best - store and manipulate data - and the application would be the single point of entry. Protect the servers - keep the applications (like

Re: [GENERAL] pg_dumpall for Postgres Database Daily Backup?

2010-05-14 Thread Devrim GÜNDÜZ
On Thu, 2010-05-13 at 09:15 -0700, Wang, Mary Y wrote: By reading the documentation over here: http://www.postgresql.org/docs/8.3/static/backup-dump.html#BACKUP-DUMP-ALL (I only found the documentation for 8.3.10), If you replace 8.3 with current, you will get the current docs. and it

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Ivan Voras
On 14 May 2010 09:08, Leonardo F m_li...@yahoo.it wrote: Personally I would lean toward making the bulk of security within the application so to simplify everything - the database would do what it does best - store and manipulate data - and the application would be the single point of

Re: [GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Catalin BOIE
Some more info. The PANIC happens several times per minute, so, is really bad for me. I tried to narrow down based on a field (timestamp) and I found some bad points, but I cannot delete them (same PANIC message appear). Do you have any idea how can I correct that entries? The worry part is

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Scott Mead
On Fri, May 14, 2010 at 4:43 AM, Ivan Voras ivo...@freebsd.org wrote: On 14 May 2010 09:08, Leonardo F m_li...@yahoo.it wrote: Personally I would lean toward making the bulk of security within the application so to simplify everything - the database would do what it does best - store

Re: [GENERAL] pg_dumpall for Postgres Database Daily Backup

2010-05-14 Thread Scott Mead
On Thu, May 13, 2010 at 8:16 PM, Scott Marlowe scott.marl...@gmail.comwrote: On Thu, May 13, 2010 at 9:50 AM, Wang, Mary Y mary.y.w...@boeing.com wrote: Hi, I'm running on Postgres 8.3.8. My system admin is ready to set up a cron job for a daily database backup. By reading the

Re: [GENERAL] autovacuum: 50% iowait for hours

2010-05-14 Thread Scott Mead
On Thu, May 13, 2010 at 6:23 PM, Scott Marlowe scott.marl...@gmail.comwrote: On Thu, May 13, 2010 at 4:05 PM, Joao Ferreira joao.miguel.c.ferre...@gmail.com wrote: Hello all, I have a hard situation in hands. my autovacuum does not seem to be able to get his job done; database is

Re: [GENERAL] autovacuum: 50% iowait for hours

2010-05-14 Thread Scott Mead
On Thu, May 13, 2010 at 6:23 PM, Scott Marlowe scott.marl...@gmail.comwrote: On Thu, May 13, 2010 at 4:05 PM, Joao Ferreira joao.miguel.c.ferre...@gmail.com wrote: Hello all, I have a hard situation in hands. my autovacuum does not seem to be able to get his job done; database is

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Leonardo F
I think this point number 2 is pretty important. If at all possible, keep the webapp separate from the database, and keep the database server on a fairly restrictive firewall. This means that someone has got to get in to the webapp, then hop to the database server, it just adds another

Re: [GENERAL] Persistence problem

2010-05-14 Thread I. B.
Thanks for the reply. Why is that somewhere else in the memory if I reserve enough memory with palloc and copy the complete memory from the previously created type into that new object? realResult = (mPoint *)palloc(result-length); memcpy(realResult, result, result-length); OK, I suppose I

[GENERAL] appending items to record variable

2010-05-14 Thread x y
Hi all In plpgsql, is there a way to append rows to a record variable? Each time a query like SELECT mycolumn INTO myrecordvariable FROM ... is executed, myrecordvariable seems to be reseted and previous entries are lost. What I want to do is collect values throughout several conditionals and

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Jonathan Tripathy
From: pgsql-general-ow...@postgresql.org on behalf of Leonardo F Sent: Fri 14/05/2010 14:24 To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Authentication method for web app I think this point number 2 is pretty important. If at all possible, keep the

Re: [GENERAL] Authentication method for web app

2010-05-14 Thread Ivano Luberti
If you build a web-app the user doesn't connect to the db . It connects to the application. It is the web app that should have an auth mechanism. The web app will perform predefined and limited operations and it is the web programmer that has to guarantee that only operations provided by the web

[GENERAL] psql feature request (\dd+)

2010-05-14 Thread Richard Broersma
It'd be nice if there was a \dd+ command to return all of the comments of dependent objects in addition to the specified object; i.e. all dependent objects related to a table for example. Notice the difference between difference between a well documented DDL script versus the results returned by

Re: [GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Emanuel Calvo Franco
The PANIC happens several times per minute, so, is really bad for me. I tried to narrow down based on a field (timestamp) and I found some bad points, but I cannot delete them (same PANIC message appear). Do you have any idea how can I correct that entries? The worry part is how this

[GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
Hello, I hope you can provide some answers to a strange problem. This is in production and is a Severity #1 issue we are having, so any help you can provide would be appreciated. PG: PostgreSQL 8.3.7 OS: RHEL 5 64 bit We have two databases with the same DB schema managing different sets of

Re: [GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Igor Neyman
-Original Message- From: Catalin BOIE [mailto:cboie-pg...@66.com] Sent: Friday, May 14, 2010 5:43 AM To: pgsql-general@postgresql.org Subject: Re: PANIC: corrupted item pointer: 32766 Some more info. The PANIC happens several times per minute, so, is really bad for me. I

Re: [GENERAL] Pulling data from a constraint def

2010-05-14 Thread Vick Khera
On Thu, May 13, 2010 at 8:14 PM, David Fetter da...@fetter.org wrote: Well, the inability to change the list of values is certainly an unpleasant limitation, but is it so fatal that we should hide the feature from people who could possibly use it?  I think not. It's enough of a foot-gun that

Re: [GENERAL] appending items to record variable

2010-05-14 Thread Merlin Moncure
On Fri, May 14, 2010 at 9:12 AM, x y charlie...@googlemail.com wrote: Hi all In plpgsql, is there a way to append rows to a record variable? Each time a query like SELECT mycolumn INTO myrecordvariable FROM ... is executed, myrecordvariable seems to be reseted and previous entries are

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Vick Khera
On Fri, May 14, 2010 at 1:28 PM, keaton_ad...@mcafee.com wrote: I did run an ANALYZE, then vacuum full, then another ANALYZE on all tables involved in the query.  That didn't change things.  I compared QUERY TUNING settings in both postgresql.conf files and they are identical.  There is a

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Vick Khera
On Fri, May 14, 2010 at 2:16 PM, Vick Khera vi...@khera.org wrote: What's your default_statistics_target value?  ie, run select default_statistics_target; sorry... show default_statistics_target; -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
No luck. I set it in the postgresql.conf file and did a reload, ran analyze on the tables and the query plan isn't any better. mxl=# show default_statistics_target; default_statistics_target --- 100 (1 row) mxl=# analyze mxl_domain; ANALYZE mxl=# analyze

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Stephen Frost
* keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: No luck. I set it in the postgresql.conf file and did a reload, ran analyze on the tables and the query plan isn't any better. Are you sure the database schemas are identical, including indexes, etc? There's an index being used on the

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
Yes, I triple checked and the schemas, indexes, FKs, triggers all match. -K On 5/14/10 12:29 PM, Stephen Frost sfr...@snowman.net wrote: * keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: No luck. I set it in the postgresql.conf file and did a reload, ran analyze on the tables and

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Stephen Frost
* keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: Yes, I triple checked and the schemas, indexes, FKs, triggers all match. Have you checked over for any enable_* settings that are off? Identical work_mem and maintenance_work_mem settings? Thanks,

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Josh Kupershmidt
On Fri, May 14, 2010 at 1:28 PM, keaton_ad...@mcafee.com wrote: I did run an ANALYZE, then vacuum full, then another ANALYZE on all tables involved in the query.  That didn't change things.  I compared QUERY TUNING settings in both postgresql.conf files and they are identical.  There is a

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
Yes, PG settings are the same. Just checked again. -K On 5/14/10 12:54 PM, Stephen Frost sfr...@snowman.net wrote: * keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: Yes, I triple checked and the schemas, indexes, FKs, triggers all match. Have you checked over for any enable_*

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
OK, getting closer. If I comment out the last line ( AND users.user_id NOT IN (SELECT user_id FROM mxl_user_group)) the optimizer goes for a Merge Join (yea!) and the query runs in 30 seconds. So something with this NOT IN clause is throwing everything off. EXPLAIN SELECT

Re: [GENERAL] PANIC: corrupted item pointer: 32766

2010-05-14 Thread Alvaro Herrera
Excerpts from Catalin BOIE's message of vie may 14 02:32:01 -0400 2010: Hello! I have a serious problem with one of my tables. Version: postgresql-server-8.4.3-1.fc12.x86_64 Kernel: kernel-2.6.32.11-99.fc12.x86_64 Hmm, it's pretty unfortunate that those buffer checks are inside

Re: [GENERAL] Persistence problem

2010-05-14 Thread I. B.
I still have the same problem. Whatever I've tried didn't work out. It seems like VARSIZE is wrong. It's less than it should be. It seems like it's not counting on the size of units array, although it changes depending on the number of units. This is one of the things I've tried: Datum

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
OK, So if I change the NOT IN clause the query will run with a MERGE JOIN and complete in about 20 seconds. Have a look at the logic I am following and see if it makes sense. Might this just be a case where because there is more data in one DB compared to another (even though the counts are

[GENERAL] ALTER DOMAIN feature request

2010-05-14 Thread Richard Broersma
I'd be nice is ALTER DOMAIN could combine multiple operations in a single command similar to ALTER TABLE. I take it that this feature is not included in the SQL standard? Here is an example: alter domain tag_sequence_type drop constraint tag_sequence_type_check, add constraint

[GENERAL] --variable foo=bar vs. \set foo quux in ~/.psqlrc

2010-05-14 Thread Julian Mehnle
Hi all, I'm trying to add the database host name to my psql prompts. The obvious solution is to add %M or %m to the PROMPT{1,2} variables in ~/.psqlrc. However I have to work with a few databases that can be reached only through SSH tunnels, for which I use aliases like this: alias

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Keaton_Adams
It looks like it is just a difference in data volume. We are re-working the query to see what that will do. Thanks for the suggestions. -K On 5/14/10 2:23 PM, Adams, Keaton keaton_ad...@mcafee.com wrote: OK, So if I change the NOT IN clause the query will run with a MERGE JOIN and

Re: [GENERAL] Persistence problem

2010-05-14 Thread Tom Lane
I. B. i@live.com writes: How to fix this? As long as you keep on showing us wrappers, and not the code that actually does the work, we're going to remain in the dark. What you have shown us just copies data from point A to point B, and it looks like it would be fine if the source data

Re: [GENERAL] --variable foo=bar vs. \set foo quux in ~/.psqlrc

2010-05-14 Thread Tom Lane
Julian Mehnle jul...@mehnle.net writes: Can anyone confirm that --variable command-line options are evaluated before .psqlrc is read and executed? If so, does anyone know the rationale for that? It seems counterintuitive to me, as it makes overriding variables from the command-line

Re: [GENERAL] Persistence problem

2010-05-14 Thread I. B.
OK, here is the part of the code. typedef struct { int4 length; int noOfUnits; void *units; } mapping_t; typedef struct { timeint_t interval; double x1, x0, y1, y0; // fx(t) = x1*t+x0, fy(t) = y1*t+y0 } upoint_t; typedef struct { time_T start, end; short int LC,

Re: [GENERAL] Persistence problem

2010-05-14 Thread Tom Lane
I. B. i@live.com writes: OK, here is the part of the code. Well, as suspected, you're doing this typedef struct { void *units; } mapping_t; and this units = (uPoint *) realloc(units, result-noOfUnits * sizeof(uPoint)); // EXPLAINED AT THE END OF THE POST which means

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Stephen Frost
* keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: It looks like it is just a difference in data volume. We are re-working the query to see what that will do. Just my 2c, but I'd recommend using JOIN syntax instead of comma-joins. eg: select * from a JOIN b USING (col1,col2); or:

Re: [GENERAL] autovacuum: 50% iowait for hours

2010-05-14 Thread Joao Ferreira gmail
Hello guys, thx for your inputs. I consider you suggestions valid. We have hundreds or thousands of unreachable and unmaintained PG instalations. I'm totally unable to experiment in each of them. Usage profile can range from 100 rows per hour to 1000, 10.000, 50.000... sustained... for several

[GENERAL] hi,is it dangerous to only use tuple pointer through heap_getnext()?

2010-05-14 Thread sunpeng
hi,i use these codes to store only pointer of tuple : HeapTuple *tuple; tuple = heap_getnext(pHeapScanDesc,ForwardScanDirection); while(tuple){ //[1#]here i only store the pointer of tuple in an array for later using,that means i don't retrive attribute data from this tuple ,is

Re: [GENERAL] hi,is it dangerous to only use tuple pointer through heap_getnext()?

2010-05-14 Thread Alvaro Herrera
Excerpts from sunpeng's message of vie may 14 19:15:47 -0400 2010: hi,i use these codes to store only pointer of tuple : HeapTuple *tuple; tuple = heap_getnext(pHeapScanDesc,ForwardScanDirection); while(tuple){ //[1#]here i only store the pointer of tuple in an array for later

Re: [GENERAL] psql feature request (\dd+)

2010-05-14 Thread Craig Ringer
On 14/05/2010 11:35 PM, Richard Broersma wrote: It'd be nice if there was a \dd+ command to return all of the comments of dependent objects in addition to the specified object; i.e. all dependent objects related to a table for example. What gets me with Pg's COMMENT ON is the way the comments

Re: [GENERAL] psql feature request (\dd+)

2010-05-14 Thread Tom Lane
Craig Ringer cr...@postnewspapers.com.au writes: What gets me with Pg's COMMENT ON is the way the comments have to be separate from, and after, the objects they refer to. IMO it'd be significantly preferable to have something like: CREATE TABLE X ( somepk integer primary key, cost