Re: [GENERAL] pgadmin3 hangs during dump

2009-10-19 Thread Albe Laurenz
Dennis Gearon wrote: I set up the same characteristics on the console, and it runs fine, (COPY commands will import back, right? That's what it output.) On the console, it was: pg_dump -vaF p -f dbase.sql -U user-name dbase-name More details: about 11 tables, practically empty.

[GENERAL] Best practices for effective_io_concurrency

2009-10-19 Thread Sergey Konoplev
Hi, All I read documentation (http://www.postgresql.org/docs/8.4/interactive/runtime-config-resource.html) and googled effective_io_concurrency but have not found any expanded explanation of what it actually is. I feel it rater significant for PG performance and would like to ask gurus to provide

Re: [GENERAL] Function returning 2 columns evaluated twice when both columns are needed

2009-10-19 Thread Tom Lane
Gerhard Wiesinger li...@wiesinger.com writes: On Sun, 18 Oct 2009, Tom Lane wrote: The OFFSET bit is a kluge, but is needed to keep the planner from flattening the subquery and undoing your work. Thnx Tom. It also works without the OFFSET kludge. Any ideas why? Probably because you have the

[GENERAL] Index Question

2009-10-19 Thread Bierbryer, Andrew
I have created a table where a unique row is defined by 5 columns and have created an index on these 5 columns. If I then do a select with a where clause that only consists of 3 of these columns, will I get the speed benefits from the index that I have created, or will I need to create another

Re: [GENERAL] Index Question

2009-10-19 Thread Tom Lane
Bierbryer, Andrew abierbr...@klsdiversified.com writes: I have created a table where a unique row is defined by 5 columns and have created an index on these 5 columns. If I then do a select with a where clause that only consists of 3 of these columns, will I get the speed benefits from the

Re: [GENERAL] Best practices for effective_io_concurrency

2009-10-19 Thread Greg Smith
On Mon, 19 Oct 2009, Sergey Konoplev wrote: I feel it rater significant for PG performance and would like to ask gurus to provide some more description here. It's probably not as significant as you are hoping. Currently the code only kicks in when you're doing a Bitmap Heap Scan, which is

[GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
If you issue an immediate shutdown to the database, autovacumm will not process tables that should be vacuumed until manually re-analyzed. PG 8.3.8 Relevant settings: autovacuum = on log_autovacuum_min_duration = 0 autovacuum_max_workers = 3 autovacuum_naptime = 1min

[GENERAL] Un successful Restoration of DATA using WAL files

2009-10-19 Thread Mitesh51
I am unable to restore data with the use of WAL files by following procedure. I have done following changes in postgres.conf to enable WAL archiving... archive_mode = on # allows archiving to be done archive_command = 'copy %p C:\\archivedir\\%f' I have one database(built

[GENERAL] cast numeric with scale and precision to numeric plain

2009-10-19 Thread Sim Zacks
I'm using 8.2.4 Numeric with scale precision always shows the trailing zeros. Numeric plain only shows numbers after the decimal point that are being used. I would like to have the data in my table with scale and precision, but my views to be cast to numeric without any scale or precision.

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson bnich...@ca.afilias.info writes: If you issue an immediate shutdown to the database, autovacumm will not process tables that should be vacuumed until manually re-analyzed. AFAICS this is an unsurprising consequence of flushing stats on a crash. If you don't like it, avoid

Re: [GENERAL] cast numeric with scale and precision to numeric plain

2009-10-19 Thread Tom Lane
Sim Zacks s...@compulab.co.il writes: Numeric with scale precision always shows the trailing zeros. Numeric plain only shows numbers after the decimal point that are being used. That statement is false: regression=# select 1234.000::numeric; numeric -- 1234.000 (1 row) I'm not

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: Brad Nicholson bnich...@ca.afilias.info writes: If you issue an immediate shutdown to the database, autovacumm will not process tables that should be vacuumed until manually re-analyzed. AFAICS this is an unsurprising consequence of

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson bnich...@ca.afilias.info writes: On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: That seems like a fundamentally stupid idea, unless you are unconcerned with the time and cost of getting the DB running again, which seemingly you are. I disagree that this is fundamentally

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Scott Marlowe
On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Brad Nicholson bnich...@ca.afilias.info writes: On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: That seems like a fundamentally stupid idea, unless you are unconcerned with the time and cost of getting the DB running

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 10:53 -0600, Scott Marlowe wrote: On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Brad Nicholson bnich...@ca.afilias.info writes: On Mon, 2009-10-19 at 12:07 -0400, Tom Lane wrote: That seems like a fundamentally stupid idea, unless you are

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Scott Marlowe
On Mon, Oct 19, 2009 at 11:06 AM, Brad Nicholson bnich...@ca.afilias.info wrote: On Mon, 2009-10-19 at 10:53 -0600, Scott Marlowe wrote: On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Brad Nicholson bnich...@ca.afilias.info writes: On Mon, 2009-10-19 at 12:07 -0400, Tom

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 11:16 -0600, Scott Marlowe wrote: On Mon, Oct 19, 2009 at 11:06 AM, Brad Nicholson bnich...@ca.afilias.info wrote: On Mon, 2009-10-19 at 10:53 -0600, Scott Marlowe wrote: On Mon, Oct 19, 2009 at 10:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Brad Nicholson

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Scott Marlowe scott.marl...@gmail.com writes: All of this is completely besides the point that a database that's been shutdown immediately / had the power cord yanked comes back up and doesn't start autovacuuming automatically, which seems a non-optimal behaviour. It'll start as soon as

Re: [GENERAL] Function returning 2 columns evaluated twice when both columns are needed

2009-10-19 Thread Gerhard Wiesinger
On Mon, 19 Oct 2009, Tom Lane wrote: Gerhard Wiesinger li...@wiesinger.com writes: On Sun, 18 Oct 2009, Tom Lane wrote: The OFFSET bit is a kluge, but is needed to keep the planner from flattening the subquery and undoing your work. Thnx Tom. It also works without the OFFSET kludge. Any

Re: [GENERAL] Function returning 2 columns evaluated twice when both columns are needed

2009-10-19 Thread Christophe Pettus
On Oct 19, 2009, at 10:49 AM, Gerhard Wiesinger wrote: None of the function is declared VOLATILE. Any other idea? If they are not declared with a volatility category at all, the default is VOLATILE. Is that a possibility? -- -- Christophe Pettus x...@thebuild.com -- Sent via

Re: [GENERAL] Function returning 2 columns evaluated twice when both columns are needed

2009-10-19 Thread Tom Lane
Gerhard Wiesinger li...@wiesinger.com writes: On Mon, 19 Oct 2009, Tom Lane wrote: Probably because you have the function declared VOLATILE. None of the function is declared VOLATILE. Any other idea? [ shrug... ] There are other possible reasons why the planner would fail to flatten a

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Scott Marlowe
On Mon, Oct 19, 2009 at 11:27 AM, Tom Lane t...@sss.pgh.pa.us wrote: Scott Marlowe scott.marl...@gmail.com writes: All of this is completely besides the point that a database that's been shutdown immediately / had the power cord yanked comes back up and doesn't start autovacuuming

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Christophe Pettus
On Oct 19, 2009, at 11:26 AM, Scott Marlowe wrote: That could be a pretty bad worst case scenario for certain types of tables / usage patterns. Given that (presumably) the database server is not failing repeatedly without some kind of operator notification, isn't it at least somewhat

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 11:35 -0700, Christophe Pettus wrote: On Oct 19, 2009, at 11:26 AM, Scott Marlowe wrote: That could be a pretty bad worst case scenario for certain types of tables / usage patterns. Given that (presumably) the database server is not failing repeatedly without some

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson bnich...@ca.afilias.info writes: autoanalyze will automatically analyze new tables when they don't have stats. It seems logical that it should handle this case where the table also does not have stats. It will autoanalyze once a sufficient number of inserts have occurred. The

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 15:01 -0400, Tom Lane wrote: Brad Nicholson bnich...@ca.afilias.info writes: autoanalyze will automatically analyze new tables when they don't have stats. It seems logical that it should handle this case where the table also does not have stats. It will autoanalyze

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Brad Nicholson
On Mon, 2009-10-19 at 15:09 -0400, Brad Nicholson wrote: On Mon, 2009-10-19 at 15:01 -0400, Tom Lane wrote: Brad Nicholson bnich...@ca.afilias.info writes: autoanalyze will automatically analyze new tables when they don't have stats. It seems logical that it should handle this case where

[GENERAL] Free Tool to design Postgres Databases

2009-10-19 Thread Andre Lopes
Hi, I'am searching for a free tool to design a Postgre Database. There is something similar to MySQL Workbench? Best Regards, Andre.

Re: [GENERAL] autovacuum and immediate shutdown issues

2009-10-19 Thread Tom Lane
Brad Nicholson bnich...@ca.afilias.info writes: What about the question that Scott and I both asked - what about query plans. Will they be affected? No, they should be the same as what you were getting just before the crash. The planner only looks at pg_statistic which is a whole different

Re: [GENERAL] Best practices for effective_io_concurrency

2009-10-19 Thread Sergey Konoplev
On Mon, Oct 19, 2009 at 7:12 PM, Greg Smith gsm...@gregsmith.com wrote: On Mon, 19 Oct 2009, Sergey Konoplev wrote: I feel it rater significant for PG performance and would like to ask gurus to provide some more description here. It's probably not as significant as you are hoping.  Currently

Re: [GENERAL] Free Tool to design Postgres Databases

2009-10-19 Thread Peter Hunsberger
On Mon, Oct 19, 2009 at 2:18 PM, Andre Lopes lopes80an...@gmail.com wrote: Hi, I'am searching for a free tool to design a Postgre Database. There is something similar to MySQL Workbench? Search the archives this came up within the last couple of months. I currently use Power Architect, it's

[GENERAL] How to find the row corresponding to a given toast value?

2009-10-19 Thread David Boreham
I have a (large) corrupted 8.3.7 database that I'd like to fix. It has this problem : pg_dump: SQL command failed pg_dump: Error message from server: ERROR: missing chunk number 2 for toast value 10114 in pg_toast_16426 I've seen this particular syndrome before and fixed it by deleting

[GENERAL] Mac OS Roman import?

2009-10-19 Thread Christophe Pettus
Greetings, I find myself needing to regularly import data encoded as Mac OS Roman (yes, it is coming from an Macintosh OS 9 system) into a UTF-8 PostgreSQL database. Any advice on how to do so, since Mac OS Roman is (reasonably enough) not one of PG's standard character encodings?

Re: [GENERAL] Mac OS Roman import?

2009-10-19 Thread Sam Mason
On Mon, Oct 19, 2009 at 02:54:38PM -0700, Christophe Pettus wrote: I find myself needing to regularly import data encoded as Mac OS Roman (yes, it is coming from an Macintosh OS 9 system) into a UTF-8 PostgreSQL database. How tightly integrated into PG do you want it? You can define

Re: [GENERAL] Mac OS Roman import?

2009-10-19 Thread Scott Ribe
I find myself needing to regularly import data encoded as Mac OS Roman (yes, it is coming from an Macintosh OS 9 system) into a UTF-8 PostgreSQL database. Any advice on how to do so, since Mac OS Roman is (reasonably enough) not one of PG's standard character encodings? Use iconv; it's a

Re: [GENERAL] Mac OS Roman import?

2009-10-19 Thread Tom Lane
Christophe Pettus x...@thebuild.com writes: I find myself needing to regularly import data encoded as Mac OS Roman (yes, it is coming from an Macintosh OS 9 system) into a UTF-8 PostgreSQL database. Any advice on how to do so, since Mac OS Roman is (reasonably enough) not one of PG's

Re: [GENERAL] Mac OS Roman import?

2009-10-19 Thread Scott Ribe
Maybe iconv knows about it? On OS X it definitely does; on other platforms it may not since supported encodings are platform-dependent. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list

Re: [GENERAL] Mac OS Roman import?

2009-10-19 Thread Christophe Pettus
On Oct 19, 2009, at 4:39 PM, Scott Ribe wrote: On OS X it definitely does; on other platforms it may not since supported encodings are platform-dependent. The Centos version knows about it as well; thanks, that's the perfect solution. -- -- Christophe Pettus x...@thebuild.com --

[GENERAL] When much of a DB is large objects - PG 8.4

2009-10-19 Thread David Wall
We have a system in which a large amount of the data is stored as large objects now in PG 8.4. The relational aspects of these objects are stored using traditional tables, but we store a lot of binary data (files, images) and XML objects that are compressed and then encrypted. The ACID

Re: [GENERAL] How ad an increasing index to a query result?

2009-10-19 Thread Merlin Moncure
On Sun, Oct 18, 2009 at 12:00 PM, Raymond O'Donnell r...@iol.ie wrote: On 18/10/2009 11:30, Alban Hertroys wrote: Short of enumerating those results in your application, the easiest approach is probably to wrap your query in a join with generate_series like so: SELECT a, s.b FROM (    

Re: [GENERAL] When much of a DB is large objects - PG 8.4

2009-10-19 Thread Merlin Moncure
On Mon, Oct 19, 2009 at 9:11 PM, David Wall d.w...@computer.org wrote: We have a system in which a large amount of the data is stored as large objects now in PG 8.4.  The relational aspects of these objects are stored using traditional tables, but we store a lot of binary data (files, images)

Re: [GENERAL] Free Tool to design Postgres Databases

2009-10-19 Thread Guy Rouillier
Andre Lopes wrote: Hi, I'am searching for a free tool to design a Postgre Database. There is something similar to MySQL Workbench? Best Regards, Andre. From 9/11/2009 Open source database design tool , alternative to MicroOLDAP Open ModelSphere: http://www.modelsphere.org/ From

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

2009-10-19 Thread Craig Ringer
On Mon, 2009-10-19 at 07:18 -0700, Mitesh51 wrote: I am unable to restore data with the use of WAL files by following procedure. I have done following changes in postgres.conf to enable WAL archiving... archive_mode = on # allows archiving to be done archive_command = 'copy %p

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

2009-10-19 Thread Craig Ringer
On Mon, 2009-10-19 at 07:18 -0700, Mitesh51 wrote: I am unable to restore data with the use of WAL files by following procedure. I have done following changes in postgres.conf to enable WAL archiving... archive_mode = on # allows archiving to be done archive_command = 'copy %p

[GENERAL] About could not connect to server: Connection timed out

2009-10-19 Thread 黄永卫
Hi, When I use ecpg code to download File from database, error occurred occasionally as below: “could not connect to server: Connection timed outIs the server running on host DB and acceptingTCP/IP connections on port 5432?” This my code: conn =

Re: [GENERAL] About could not connect to server: Connection timed out

2009-10-19 Thread Craig Ringer
On Tue, 2009-10-20 at 12:12 +0800, 黄永卫 wrote: Oct 18 10:46:11 SUC02 postgres[10997]: [2-1] LOG: unexpected EOF on client connection Oct 18 10:46:11 SUC02 postgres[15899]: [2-1] LOG: could not receive data from client: Connection reset by peer That looks a lot like lower-level networking

Re: [GENERAL] Free Tool to design Postgres Databases

2009-10-19 Thread David Fetter
On Mon, Oct 19, 2009 at 10:48:47PM -0400, Guy Rouillier wrote: Andre Lopes wrote: Hi, I'am searching for a free tool to design a Postgre Database. There is something similar to MySQL Workbench? Best Regards, Andre. From 9/11/2009 Open source database design tool , alternative to

Re: [GENERAL] About could not connect to server: Connection timed out

2009-10-19 Thread Johan Nel
Craig Ringer wrote: On Tue, 2009-10-20 at 12:12 +0800, 黄永卫 wrote: Oct 18 10:46:11 SUC02 postgres[10997]: [2-1] LOG: unexpected EOF on client connection Oct 18 10:46:11 SUC02 postgres[15899]: [2-1] LOG: could not receive data from client: Connection reset by peer That looks a lot like