[GENERAL] conditional alter table

2008-05-30 Thread Brian Cox
I'd like to either 1) execute an alter table to re-add a constraint only if it doesn't exist or 2) have psql ignore the failure when setting it's exit status. Any ideas on how to do either would be appreciated. Posgres 8.1.2 Thanks, Brian -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] query performance

2008-04-24 Thread Brian Cox
Tom Lane [EMAIL PROTECTED] wrote: At the very end ... you're looking for these messages: ereport(elevel, (errmsg("free space map contains %d pages in %d relations", storedPages, numRels), errdetail("A total of %.0f page slots are in use (including overhe

Re: [GENERAL] query performance

2008-04-24 Thread Brian Cox
Scott Marlowe [EMAIL PROTECTED] wrote: There's bits spread throughout the file, but the summary is at the bottom. Here's a tail of the 'vacuum verbose' output: INFO: vacuuming "pg_toast.pg_toast_797619965" INFO: index "pg_toast_797619965_index" now contains 0 row versions in 1 pages DETAIL

Re: [GENERAL] query performance

2008-04-24 Thread Brian Cox
Tom Lane [EMAIL PROTECTED] wrote: You need a database-wide vacuum verbose (not just 1 table) to get that output ... I ran: > pgsql -U admin -d cemdb -c 'vacuum verbose' > /tmp/pgvac.log 2>&1 the output file has 2593 lines and, while I haven't looked at all of them, a: > fgrep -i fsm /tmp/p

Re: [GENERAL] query performance

2008-04-24 Thread Brian Cox
Tom Lane [EMAIL PROTECTED] wrote: I suspect that your FSM settings are too low, causing free space found by VACUUM to be forgotten about. I read in another thread that vacuum verbose would tell me how much FSM is needed, but I ran it and didn't see any output about this. What is the way to de

[GENERAL] query performance

2008-04-23 Thread Brian Cox
I have a largish (pg_dump output is 4G) database. The query: select count(*) from some-table was taking 120 secs to report that there were 151,000+ rows. This seemed very slow. This db gets vacuum'd regularly (at least once per day). I also did a manual 'vacuum analyze', but after it completed,

[GENERAL] insert deadlock

2005-12-06 Thread Brian Cox
rs as tables A/B seem to have no connection with C; can anyone explain this? This is using PG version 8.0.3. Thanks, Brian Cox ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org