Re: [GENERAL] build model from existing db

2012-07-05 Thread Craig Ringer
On 07/06/2012 11:13 AM, ssylla wrote: Dear list, I have an existing PostgreSQL DB and I would like to draw a model of the DB structure. Is there some software (Freeware) around that can read the existing structure of my DB and automatically draw e.g. an ER-model of that? I use and like SchemaSp

[GENERAL] build model from existing db

2012-07-05 Thread ssylla
Dear list, I have an existing PostgreSQL DB and I would like to draw a model of the DB structure. Is there some software (Freeware) around that can read the existing structure of my DB and automatically draw e.g. an ER-model of that? The software that I have found so far (e.g. Open System Architec

[GENERAL] Draw Model from existing DB

2012-07-05 Thread ssylla
Dear list, I have an existing PostgreSQL DB and I would like to draw a model of the DB structure. Is there some software (Freeware) around that can read the existing structure of my DB and automatically draw e.g. an ER-model of that? The software that I have found so far (e.g. Open System Archit

Re: [GENERAL] [PERFORM] The need for clustered indexes to boost TPC-V performance

2012-07-05 Thread Craig Ringer
On 07/06/2012 09:33 AM, Samuel Gendler wrote: Some other potential issues - with only 10MB of work_mem, you might be gong to temp space on disk more than you realize. Explain analyze might reveal that, but only if you happen to pick a query that exceeds work_mem on at least one step. Rather

Re: [GENERAL] Suboptimal query plan fixed by replacing OR with UNION

2012-07-05 Thread Jasen Betts
I note you've decided to rewrite this query as a union > SELECT * FROM account > WHERE user_id in > (SELECT user_id FROM account > WHERE id = > ANY('{-02f6-379d-c000-00026810,-0320-b467-c000-00026810,-000d-cefb-c000-00026810}')) > OR > id =

[GENERAL] Issue with extension updates to pg_extension table

2012-07-05 Thread Keith Fiske
For reasons I've brought up before (http://archives.postgresql.org/pgsql-general/2012-06/msg00174.php), I need to stop some of my extension tables from dumping data when a schema only dump is done because they have the potential to contain A LOT of data. For reference my extension is https://githu

Re: [GENERAL] Suboptimal query plan fixed by replacing OR with UNION

2012-07-05 Thread Steven Schlansker
On Jul 5, 2012, at 3:51 PM, Tom Lane wrote: > Steven Schlansker writes: >> Why is using an OR so awful here? > > Because the OR stops it from being a join (it possibly needs to return > some rows that are not in the semijoin of the two tables). > >> Why does it pick a sequential scan? Is this

Re: [GENERAL] Packt's PostgreSQL 9 Administration Cookbook: LITE Editions?

2012-07-05 Thread James Hartley
On Thu, Jul 5, 2012 at 3:53 PM, Simon Riggs wrote: > I think Packt were experimenting with a kind of "pocket book" format, > so I'm sure they'd welcome your feedback on how well that works. I'm > not sure there was any intention for people to buy both. > > Thanks to both of you for your comments

Re: [GENERAL] Packt's PostgreSQL 9 Administration Cookbook: LITE Editions?

2012-07-05 Thread Simon Riggs
On 5 July 2012 22:09, James Hartley wrote: > Although the titles are *very* similar, these don't appear to be the same, > however, they do resemble the information found in the lengthier 2010 tome > (which I already have...): The LITE books are subsets of the main book. They're not identical but

Re: [GENERAL] Suboptimal query plan fixed by replacing OR with UNION

2012-07-05 Thread Tom Lane
Steven Schlansker writes: > Why is using an OR so awful here? Because the OR stops it from being a join (it possibly needs to return some rows that are not in the semijoin of the two tables). > Why does it pick a sequential scan? Is this an optimizer bug No. It can't transform OR into a UNION

Re: [GENERAL] Server writing short WAL files

2012-07-05 Thread Tom Lane
beamsplit...@gmail.com writes: > I'm having trouble with WAL files. Every 4th WAL file written by the server > into pg_xlog is 24576 bytes instead of 16MB. A short WAL causes a fatal > error during recovery. Hm. It's fairly hard to see how you could get into such a state to start with, but once t

[GENERAL] Suboptimal query plan fixed by replacing OR with UNION

2012-07-05 Thread Steven Schlansker
Hi all, I have a query which is being optimized very differently depending on whether it is written using an OR clause or a UNION clause. I believe that the query results should be the same, and even if I've missed something with regards to something small (e.g. NULL handling) I do not believe

Re: [GENERAL] Packt's PostgreSQL 9 Administration Cookbook: LITE Editions?

2012-07-05 Thread Steve Atkins
On Jul 5, 2012, at 2:09 PM, James Hartley wrote: > > > By scouring the table of contents, it appears that these "newer" LITE > editions are subsets of the older volume. It does not appear that there is > any new material in these newer offerings. > > I am *very* much a fan of Simon Riggs' 201

[GENERAL] Server writing short WAL files

2012-07-05 Thread beamsplitter
Hi, I'm having trouble with WAL files. Every 4th WAL file written by the server into pg_xlog is 24576 bytes instead of 16MB. A short WAL causes a fatal error during recovery. This behavior is perfectly consistent. For example, if archive_timeout is 5 mins, every 20 minutes the new WAL file is 245

[GENERAL] Packt's PostgreSQL 9 Administration Cookbook: LITE Editions?

2012-07-05 Thread James Hartley
In poking about Amazon's PostgreSQL titles recently, I found two that I had not seen before: PostgreSQL 9 Administration Cookbook LITE: Configuration, Monitoring, & Maintenance: http://www.amazon.com/gp/product/1849516421/ref=ox_sc_act_title_7?ie=UTF8&m=ATVPDKIKX0DER PostgreSQL Administration C

Re: [GENERAL] Cancel a pg_ctl stop

2012-07-05 Thread Magnus Hagander
On Wed, Jul 4, 2012 at 2:38 AM, Andy Chambers wrote: > Is it possible to "cancel" a pg_ctl stop if some clients remain > connected and there is no longer a need to stop the DB? Nope. Once started it can't be cancelled. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-

[GENERAL] Cancel a pg_ctl stop

2012-07-05 Thread Andy Chambers
Is it possible to "cancel" a pg_ctl stop if some clients remain connected and there is no longer a need to stop the DB? -- Andy Chambers Software Engineer (e) achamb...@mcna.net (t) 954-682-0573 CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-05 Thread Alban Hertroys
> Per Toms suggestion you need to check the permissions on the schema. > One way to do that is, from psql type the following and enter: > \dn+ One other thing you might want to verify: Does user XXX have the PUBLIC schema in their search_path? It is by default, but some people take it out for sec

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-05 Thread Adrian Klaver
On 07/05/2012 07:46 AM, Stefan Schwarzer wrote: Now, when I launch a query which includes "crosstab()" as a postgres user, everything works fine. However, if I launch it as user XXX, it complaints: The search path is indicated as: "$user", public, metadata, admin, gis, tablefunc, post

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-05 Thread Tom Lane
Stefan Schwarzer writes: > Ahh…. Indeed, no "tablefunc" schema in there. If the textual value of search_path (as per "show search_path") lists the schema but current_schemas() doesn't, I have to think that you've got a permissions problem --- the system will silently ignore any search_path entrie

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-05 Thread Stefan Schwarzer
> Now, when I launch a query which includes "crosstab()" as a postgres > user, everything works fine. However, if I launch it as user XXX, it > complaints: >>> Are you schema qualifying the function name when you use it? If not, does user XXX have schema tablefunc in their

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-05 Thread Adrian Klaver
On 07/04/2012 11:20 PM, Stefan Schwarzer wrote: Now, when I launch a query which includes "crosstab()" as a postgres user, everything works fine. However, if I launch it as user XXX, it complaints: Are you schema qualifying the function name when you use it? If not, does user XXX have schema

Re: [GENERAL] question about source download site.

2012-07-05 Thread Magnus Hagander
On Thu, Jul 5, 2012 at 8:15 AM, Tatsuo Ishii wrote: >> Hi, >> >> I have a small question about the site of PostgreSQL source. >> http://www.postgresql.org/ftp/source/ >> >> Now I can see some directories of PostgreSQL 9.2beta1/2. >> - v9.2.0beta1 >> - v9.2.0beta2 >> - v9.2beta1 >> - v9.2beta2 >> >