Re: [GENERAL] Post Install / Secure PostgreSQL

2010-09-15 Thread Alan Hodgson
On September 15, 2010 11:10:45 am Carlos Mennens wrote: > Doesn't that show I'm connected to the 'postgres' database and there > is a table called 'pg_user' which holds all my PostgreSQL user info? > That doesn't make sense to me if the database is empty unless I am > missing something here. The on

Re: [GENERAL] Post Install / Secure PostgreSQL

2010-09-14 Thread Alan Hodgson
On September 14, 2010 09:50:30 am Carlos Mennens wrote: > Obviously there appears to be a specific password for both accounts > which I think are completely seperate from the Linux shell passwords, > right? PostgreSQL has internal passwords for roles which can be set with "alter role" or while cr

Re: [GENERAL] Missing rows in resultset

2010-08-30 Thread Alan Hodgson
On Sunday, August 29, 2010, björn lundin wrote: > eyetv=# select * from programmes where title like 'Star*'; * isn't the SQL wildcard character. % is. -- "No animals were harmed in the recording of this episode. We tried but that damn monkey was just too fast." -- Sent via pgsql-general mail

Re: [GENERAL] Backups / replication

2010-06-15 Thread Alan Hodgson
On Tuesday, June 15, 2010, "Oliver Kohll - Mailing Lists" wrote: > Are either of those two likely? Any other suggestions? Another question > is will the replication coming in v9.0 change things and would it be > worth holding off until then? In particular Command Prompt's PITR tools > look useful

Re: [GENERAL] Disk performance

2010-06-15 Thread Alan Hodgson
On Tuesday, June 15, 2010, Janning wrote: > ok, I will look for a hoster who can provide this. Most hosters normaly > offer lots of ram and cpu but no advanced disk configuration. > I've noticed that too, even Rackspace doesn't offer a standard config that anyone would actually want to use for

Re: [GENERAL] database response slows while pg_dump is running (8.4.2)

2010-06-10 Thread Alan Hodgson
On Thursday, June 10, 2010, Aleksey Tsalolikhin wrote: > Thanks anyway - glad to hear dumping from a slave is > a popular approach, that's what we'll do. This is good, > it'll allow us to increase our pg_dumps from 1 a day to > as many as we want to feel safe. You should look into PITR backups.

Re: [GENERAL] pg/linux How much swap relative to physical memory is needed?

2010-06-10 Thread Alan Hodgson
On Thursday, June 10, 2010, Kelly Burkhart wrote: > Should I be concerned? > > Thanks, The default Linux kernel settings will tend to swap stuff out to make more memory available for filesystem cache. You can lower the value set in /proc/sys/vm/swappiness to decrease this tendency. I don't thi

Re: [GENERAL] What Linux edition we should chose?

2010-05-31 Thread Alan Hodgson
On Monday 31 May 2010, Devrim Gündüz wrote: > On Mon, 2010-05-31 at 21:14 +0530, Nilesh Govindarajan wrote: > > if you install some libraries like python clients or some > > software depending on PgSql from the repositories in RPM/DPKG based > > OS, you will have a tough time with the dependency s

Re: [GENERAL] postgreSQL not working after upgrade to Ubuntu 10.4

2010-05-07 Thread Alan Hodgson
On Friday 07 May 2010, AllieH wrote: > Yesterday I upgraded from Ubuntu 9.10 to 10.4. Unfortunately this has > caused me serious problems with everything related to postgreSQL. It > seems as though the new version of ubuntu is requiring me to use > PostgreSQL 8.4 instead of 8.3 which I was prev

Re: [GENERAL] VACUUM process running for a long time

2010-04-14 Thread Alan Hodgson
On Wednesday 14 April 2010, Jan Krcmar wrote: > > > You might consider partitioning this table by date, either by day or by > > week, and instead of deleting old rows, drop entire old partitions > > this is not really good workaround... Actually it's a very good workaround, that a lot of people u

Re: [GENERAL] alter table performance

2009-12-17 Thread Alan Hodgson
On Thursday 17 December 2009, Antonio Goméz Soto wrote: > Hi, > > I am regularly altering tables, adding columns setting default values > etc. This very often takes a very long time and is very disk intensive, > and this gets pretty annoying. > > Things are hampered by the fact that some of our s

Re: [GENERAL] Add pg server to cluster

2009-12-07 Thread Alan Hodgson
On Monday 07 December 2009, AlannY wrote: > What should I do exactly? Create NFS folder in new server? And then? > Mount NFS folder to /var/lib/pgsql/data? If so, I will confront with > space problem again, when space will ends at the new server... > > Or maybe there are more advanced modes with N

Re: [GENERAL] READ ONLY & I/O ERROR

2009-11-26 Thread Alan Hodgson
On Thursday 26 November 2009, Sam Jas wrote: > We are daily processing millions of rows and loadiing into database. We > have marked that when we create a new database it worked fine upto 20 or > 25 days. After that we are getting errors like "read only file system" , > data is corrupted. Therefo

Re: [GENERAL] get a log of queries that take up a lot of CPU or take a very long time.

2009-11-23 Thread Alan Hodgson
On Monday 23 November 2009, Tim Uckun wrote: > Is there a way I can get a list of the top 10 longest running queries > for the day/week/month or the top 10 queries that took the most CPU? > > select * from pg_stat_activity only shows the current status. You can enable query logging, store the log

Re: [GENERAL] Incremental Backups in postgres

2009-11-10 Thread Alan Hodgson
On Tuesday 10 November 2009, akp geek wrote: > So Is it always good to have the backup using PG_dump instead of PITR or > a combination of both > I like to do both. Ongoing PITR, daily base backups (by updating an rsync copy), and weekly pg_dumps that in turn go to tape. PITR gives a very rece

Re: [GENERAL] Slow running query with views...how to increase efficiency? with index?

2009-10-27 Thread Alan Hodgson
On Tuesday 27 October 2009, fox7 wrote: > I have tries this: > CREATE INDEX View1_index > ON View1 > USING btree > (term1); > > It isn't correct because this syntax is for tables, instead View1 is a > view. Do you know the syntax to create view index? > thanks a lot You can't create indexes

Re: [GENERAL] Partitioned table question

2009-10-14 Thread Alan Hodgson
On Wednesday 14 October 2009, Reid Thompson wrote: > So we know have data in ~30 partitioned tables. > Our requirements now necessitate adding some columns to all these tables > ( done ) which will get populated via batch sql for the older tables and > by normal processing as we move forward. > >

Re: [GENERAL] bulk inserts

2009-09-29 Thread Alan Hodgson
On Tuesday 29 September 2009, Sam Mason wrote: > > I think a big reason is also that the client can stream the data > > without waiting for a network round trip ack on every statement. > > I don't think so. I'm pretty sure you can send multiple statements in a > single round trip. libpq is defin

Re: [GENERAL] bulk inserts

2009-09-29 Thread Alan Hodgson
On Tuesday 29 September 2009, Sam Mason wrote: > ?? I'm not sure what you're implying about the semantics here, but it > doesn't seem right. COPY doesn't somehow break out of ACID semantics, > it's only an *optimization* that allows you to get large quantities of > data into the database faster.

Re: [GENERAL] Storage of Foreign Keys

2009-09-21 Thread Alan Hodgson
On Monday 21 September 2009, Christian Koetschan wrote: > Is everything I insert into mycolA and mycolB stored twice, or > is there something like a pointer/reference from mycolA to the things > stored in mycolB? > It's stored twice and for performance you need to index it in both tables. If yo

Re: [GENERAL] REINDEX "is not a btree"

2009-07-10 Thread Alan Hodgson
On Friday 10 July 2009, Vanessa Lopez wrote: > What do you mean by we can't simply take a filesystem copy of a > running database? :-O ... How should we then do the backups (so next > time I will not have the same problem again) ? There is extensive documentation on how to do backups. For filesys

Re: [GENERAL] Data corruption (8.2.5 Windows XP)

2009-06-30 Thread Alan Hodgson
On Tuesday 30 June 2009, regis.boum...@steria.com wrote: > SELECT * FROM t_table t WHERE t.id=1; => no result > > Is there a reason for this? > Is there a way to "repair" the database? > reindex -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] planned recovery from a certain transaction

2009-06-25 Thread Alan Hodgson
On Thursday 25 June 2009, "Chris Spotts" wrote: > The transaction itself works flawlessly, but every once and awhile the > data the it uploads from comes in flawed and we have to find a way to > reset it. This reset involves restoring a backup that was taken right > before the proc started. If w

Re: [GENERAL] Postgres online backup and restore has errors that are concerning

2009-06-25 Thread Alan Hodgson
On Thursday 25 June 2009, Chris Barnes wrote: > I started an online backup of postgres, tar’d my data folder, copy to > usb drive in production > and restored it into my RC environment. Have I missed > something important? > You need the transaction logs archived during and immediately after t

Re: [GENERAL] Controlling proliferation of postgres.exe processes

2009-06-23 Thread Alan Hodgson
On Tuesday 23 June 2009, Radcon Entec wrote: > Greetings! > > At the current moment, our customer's computer has 22 instances of > postgres.exe running.  When a colleague checked a few minutes ago, there > were 29.  Our contract specifies that we cannot consume more than 40% of > the computer's me

Re: [GENERAL] Disaster recovery (server died)

2009-06-19 Thread Alan Hodgson
On Friday 19 June 2009, Miguel Miranda wrote: > Hi, the worst have ocurred, my server died (cpu), so i reinstalled > another server with the same postgres version. > I have the old data directory from the old server, how can i restore my > databases from this directory to the new one? > I dont hav

Re: [GENERAL] How to store text files in the postgresql?

2009-06-12 Thread Alan Hodgson
On Friday 12 June 2009, Scott Ribe wrote: > > It's far easier to backup and restore a database than millions of small > > files. Small files = random disk I/O. The real downside is the CPU time > > involved in storing and retrieving the files. If it isn't a show > > stopper, then putting them in t

Re: [GENERAL] Having trouble restoring our backups

2009-06-12 Thread Alan Hodgson
On Friday 12 June 2009, Bryan Murphy wrote: > What am I doing wrong? FYI, we're running 8.3.7. See the documentation on PITR backups for how to do this correctly. -- WARNING: Do not look into laser with remaining eye. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] How to store text files in the postgresql?

2009-06-12 Thread Alan Hodgson
On Friday 12 June 2009, Greg Stark wrote: > Also, it makes backups a pain since it's a lot easier to back up a > file system than a database. But that gets back to whether you need > transactional guarantees. The reason it's a pain to back up a database > is precisely because it needs to make thos

Re: [GENERAL] Schema, databse, or tables in different system folder

2009-06-05 Thread Alan Hodgson
On Tuesday 02 June 2009, "Carlos Oliva" wrote: > Thank you for your response. The tablespace should work for us. Perhaps > you can help me with the following questions: > > 1) If we were to create a different table space for a database that has > archival tables -- they will be backed up once, i

Re: [GENERAL] Schema, database, or tables in different folders?

2009-06-05 Thread Alan Hodgson
On Tuesday 02 June 2009, "Carlos Oliva" wrote: > Is there a way to create a database or a table of a database in its own > folder? We are looking for ways to backup the sytem files of the > database to tape and one to exclude some tables from this backup. We > can selectively backup folders of t

Re: [GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Alan Hodgson
On Tuesday 12 May 2009, Vasiliy Vasin wrote: > I have database on production server that backups every day. Database is > not big ~ 10mb. But I added several tables that takes big capacity and I > don't want to backup data from them. > > So, I backup my database in two files: schema and data: > pg

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread Alan Hodgson
On Friday 01 May 2009, PostGre Newbie wrote: >I do not know of any open source backup utilities > that can take snapshots of the filesystem. I get the overall concept > of online backups but I am still unclear EXACTLY how the system works. > I would be grateful if anyone could explain it to me. I

Re: [GENERAL] possible consistency problem

2009-04-30 Thread Alan Hodgson
On Thursday 30 April 2009, Sebastian Böhm wrote: > when I do: > alter table only payments drop constraint y; > > it says : > ERROR: "" is an index > > note: the constraint in the error message in differed from the > constraint in my drop statement !!! (I tried to drop the forei

Re: [GENERAL] pg_dump and pg_restore problem

2009-04-30 Thread Alan Hodgson
On Wednesday 29 April 2009, "Michele Petrazzo - Unipex" wrote: > The unique solution that I found it's that to export with pg_dump all my > tables except the table_three and, after, exporting only that and on the > other host and import that alone... > > It's this a normal behavior, a "missing fe

Re: [GENERAL] Question about hosting and server grade

2009-03-26 Thread Alan Hodgson
On Thursday 26 March 2009, Ivan Sergio Borgonovo wrote: > Could IO load show up as apparent CPU load? It would show up as CPU busy in iowait state. If the CPU is actually busy it would show mostly in user state, some in system. -- Even a sixth-grader can figure out that you can’t borrow money

Re: [GENERAL] postmaster hangs on delete from

2009-03-13 Thread Alan Hodgson
On Friday 13 March 2009, e...@devdep.com wrote: > Hi, > > I have a serious issue with delete from. > > When I do something like: > > "delete from CALC_INVOICE_DATA where PERIOD_END>='2011-01-01'" > > the postmaster takes 100% CPU and then nothing happens. > Some possibilities: 1) If it's using 10

Re: [GENERAL] I don't want to back up index files

2009-03-12 Thread Alan Hodgson
On Wednesday 11 March 2009, Glen Parker wrote: > We have yet to recover from a PG disaster. We back up every night, and > never use the back ups for anything. To me, it seems perfectly > reasonable to get a quicker back up every night, with the remote > possibility of ever having to pay the pric

Re: [GENERAL] Strange behavior: row won't delete

2009-03-03 Thread Alan Hodgson
On Tuesday 03 March 2009, Phoenix Kiula wrote: > HI. I made a small alteration to a table (added a column). > > Now when I do: > > vacuum analyze TABLENAME > > or > > delete from TABLENAME where id = 99 > > Nothing happens! The carriage return means the my shell cursor goes to > the next line,

Re: [GENERAL] php4 and postgresql 8.3

2009-03-02 Thread Alan Hodgson
On Monday 02 March 2009, shadrack wrote: > My basic question is...are php4 and postgresql 8.3 compatible? > I'm running Linux Redhat 3.4.6, php4.3.9, and postgresql 8.3. I know, > some of those versions are old...its government, and I unfortunately > don't have control over the version. In fact,

Re: [GENERAL] How to pipe the psql copy command to Unix 'Date' command

2009-03-02 Thread Alan Hodgson
On Monday 02 March 2009, John R Pierce wrote: > SHARMILA JOTHIRAJAH wrote: > > Is it possible to sent this 'time' output to a file... > > If I try > > time cmd1 someargs1 | cmd2 someargs2 > output.log > > > > it doesn't sent the "time" to the file... > > time (cmd1 someargs1 | cmd2 someargs2) > ou

Re: [GENERAL] When adding millions of rows at once, getting out of disk space errors

2009-02-18 Thread Alan Hodgson
On Wednesday 18 February 2009, Mike Christensen wrote: > > ERROR: could not extend relation 1663/41130/41177: No space left on > device HINT: Check free disk space. > It seems to me there's some sort of "max table size" before you have to > allocate more space on the disk, however I can't seem

Re: [GENERAL] Remote Connection

2009-02-12 Thread Alan Hodgson
On Thursday 12 February 2009, "Bob Pawley" wrote: > I also ran - listen virtual; on the receiving server. > > It hasn't connected successfully. I get the message 'Server not > listening' > > What else can I do?? Setup PostgreSQL on the server to listen on its external interface. Adjust the firew

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Alan Hodgson
On Tuesday 03 February 2009, Phoenix Kiula wrote: > The autovacuum was clearly not enough, so we also have a crontab that > vacuums the tables every hour. This is PG 8.2.9. How did you determine it wasn't enough? As others have stated, you're causing your own slowdown by running vacuum so much o

Re: [GENERAL] PGSQL or other DB?

2009-01-30 Thread Alan Hodgson
> > This "one datadir" is seems to be not too good for us. We used DBISAM > > in our clients, and many times when we got some filesystem error, we > > can simply recover the tables - from the files. > pg_dump files with the custom format can be used to selectively restore tables. It's really easy

Re: md5 doesn't work (Was Re: [GENERAL] Pet Peeves?)

2009-01-29 Thread Alan Hodgson
On Thursday 29 January 2009, rhubbell wrote: > On Thu, 29 Jan 2009 11:34:00 -0800 (PST) > > Jeff Frost wrote: > > On Thu, 29 Jan 2009, rhubbell wrote: > > > Umm, because md5 doesn't work and trust does work. > > > > Generally this is because you haven't yet set a password for the > > postgres use

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread Alan Hodgson
On Thursday 29 January 2009, Gregory Stark wrote: > I'm putting together a talk on "PostgreSQL Pet Peeves" for discussion at > FOSDEM 2009 this year. I have a pretty good idea what some them are of > course, but I would be interested to hear if people have any complaints > from personal experience

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread Alan Hodgson
On Thursday 29 January 2009, Terry Fielder wrote: > and that ties to: > 2) If I try to kill 1 postgres pid (e.g. to abort a bad query), the > whole backend shuts down and rolls back. > Can we get a way to look at and then kill a specific bad query? select pg_cancel_backend(pid). Or kill pid from

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Alan Hodgson
On Thursday 22 January 2009, David Goodenough wrote: > > You have not understood what I said. I ran iconv, and it changes the > encoding of the data, but not the ENCODING= statements that are > embedded in the datastream. Yes I can change those with sed, but > I do not know what else I need to

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Alan Hodgson
On Thursday 22 January 2009, Vladimir Konrad wrote: > > iconv does not change the database encodings embedded in the file > > (and it is quite large). > > Have you read the manual? > >file A pathname of an input file. If no file operands are >specified, or if a file operand is '-

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Alan Hodgson
On Thursday 15 January 2009, Jason Long wrote: > *I am attempting to vacuum and reindex my database. It keeps timing > out. See commands and last part of output below. The vacuum or reindex > only takes a short time to complete normally because the database it > less than 50 mb. I have the qu

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Alan Hodgson
On Tuesday 13 January 2009, Jason Long wrote: > I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) > to store 100 GB of images in PostgreSQL. > > Once they are in there I can deal with them. My main purpose is to use > rsync to get the files into the database. > > Is there a better wa

Re: [GENERAL] column "id" is of type integer but expression is of type character

2009-01-08 Thread Alan Hodgson
On Thursday 08 January 2009, "Andrus" wrote: > Commands: > > create temp table test ( id int, baas char(10) ); > create temp table lisa ( id int, baas char(10) ); > alter table lisa drop column id; > INSERT INTO test SELECT * FROM lisa; > How to fix ? INSERT INTO test (baas) SELECT baas FROM l

Re: [GENERAL] Slow Vacuum was: vacuum output question

2009-01-06 Thread Alan Hodgson
On Tuesday 06 January 2009, "Dan Armbrust" wrote: > What on earth could be going on between PostgreSQL 8.1 and Fedora 6 > that is bloating and/or corrupting the indexes like this? Obviously the choice of operating system has no impact on the contents of your index. A better question might be,

Re: [GENERAL] Postgre Tables problem

2008-12-18 Thread Alan Hodgson
On Tuesday 16 December 2008, Danail Pavlov wrote: > I have to create a postgre database programmatically from VB .Net and > after that to create a tables. After successfully creating the Data Base, > when a try to create a table in this DB i have this error - "schema > "dbName" does not exist, Cod

Re: [GENERAL] db backup script in gentoo

2008-11-29 Thread Alan Hodgson
On Saturday 29 November 2008, "Andrus" <[EMAIL PROTECTED]> wrote: > How to create automated backup script in Gentoo which in every night 3:00 > PM backups one database and sends backup > with ftp using unique file name? > > In windows I can use scheduler and script > > set FILENAME=%DATE:~8,4%%DATE

Re: [GENERAL] lo data type

2008-11-20 Thread Alan Hodgson
On Thursday 20 November 2008, "John Zhang" <[EMAIL PROTECTED]> wrote: > Hi there, > > I am writing to seek your assistance on how to set up the lo data type > for large objects. I am using postres 3.3. By default, the data type lo > is not created by the installation, right? How to create one? Any

Re: [GENERAL] error on vacuum - could not read block

2008-11-13 Thread Alan Hodgson
On Thursday 13 November 2008, "glok_twen" <[EMAIL PROTECTED]> wrote: > INFO: vacuuming "public.monthly_res_01" > > ERROR: could not read block 43775860 of relation 1663/11511/24873: read > only 4096 of 8192 bytes > > ERROR: could not read block 43775860 of relation 1663/11511/24873: read > only

Re: [GENERAL] merge 2 dumps

2008-11-12 Thread Alan Hodgson
On Tuesday 11 November 2008, Joao Ferreira gmail <[EMAIL PROTECTED]> wrote: > could I just get the "COPY TO" sections from the files and load them one > after the other ? > > I never tried this before... You might have drop foreign keys before doing so and recreate them after - the dumps aren't

Re: [GENERAL] serial data type usage

2008-11-06 Thread Alan Hodgson
On Thursday 06 November 2008, "EXT-Rothermel, Peter M" <[EMAIL PROTECTED]> wrote: > I have thought about using the serial data type for the employee.id but > I also want to automate the prepending of the { W, M, E } prefix. > You'll need write a before-insert trigger to assign the ID. -- Alan

Re: [GENERAL] Speeding up query

2008-11-05 Thread Alan Hodgson
On Wednesday 05 November 2008, "Andrus" <[EMAIL PROTECTED]> wrote: > takes 34 seconds. Tables are indexed and logfile shows autovacuum > running. I ran VACUUM ANALYZE. > It returns > > INFO: free space map contains 22501 pages in 77 relations > DETAIL: A total of 2 page slots are in use (incl

Re: [GENERAL] Debugging infrequent pegged out CPU usage

2008-11-03 Thread Alan Hodgson
On Monday 03 November 2008, Jason Long <[EMAIL PROTECTED]> wrote: > I would greatly appreciate any advice on debugging this problem. While > there are relatively live few users the data is extremely important and > the users will not wait for me to see what is wrong. They demand > immediate reso

Re: [GENERAL] speed up restore from dump

2008-10-30 Thread Alan Hodgson
On Thursday 30 October 2008, Joao Ferreira <[EMAIL PROTECTED]> wrote: > well. see for yourself... (360 RAM , 524 SWAP) that's what it is... > it supposed to be somewhat an embedded product... > Clearly your hardware is your speed limitation. If you're swapping at all, anything running on the

Re: [GENERAL] speed up restore from dump

2008-10-30 Thread Alan Hodgson
On Thursday 30 October 2008, Joao Ferreira gmail > During restore: > # vmstat > procs memory--- ---swap-- -io -system-- cpu > r b swpd free buff cache si so bi bo in cs us sy id wa > 3 1 230204 4972 1352 110128 21 17 63 24 56 12 2 85

Re: [GENERAL] speed up restore from dump

2008-10-30 Thread Alan Hodgson
On Thursday 30 October 2008, Joao Ferreira gmail <[EMAIL PROTECTED]> wrote: > What other cfg paramenters shoud I touch ? work_mem set to most of your free memory might help. You're probably just disk-bound, though. What does vmstat say during the restore? -- Alan -- Sent via pgsql-general ma

Re: [GENERAL] max time in a table query takes ages

2008-10-24 Thread Alan Hodgson
On Friday 24 October 2008, "Grzegorz Jaśkiewicz" <[EMAIL PROTECTED]> wrote: > with two sata discs in software raid 1 on linux. And it seems to spend > loads of time (40-60% sometimes) on waits. I guess this is due to lack of > >aio support in postgresql, No, it's due to the fact that hard disks

Re: [GENERAL] Escape wildcard problems.

2008-10-24 Thread Alan Hodgson
On Friday 24 October 2008, "Gauthier, Dave" <[EMAIL PROTECTED]> wrote: > I read in the docs (section 9.7.1) that the backslash... \ ... is the > default escape char to use in "like" expressions. Yet when I try it, it > doesn't seem to work the ay I expect. Here's an example... > > select name fro

Re: [GENERAL] Annoying Reply-To

2008-10-23 Thread Alan Hodgson
On Thursday 23 October 2008, Collin Kidder <[EMAIL PROTECTED]> wrote: > You must use Reply All. You > might say that that makes Thunderbird crippled but I see it more as a > sign that nobody outside of a few fussy RFC worshipping types would ever > want the behavior of the Postgre list. Yes, I'll h

Re: [GENERAL] ideal server

2008-10-17 Thread Alan Hodgson
On Friday 17 October 2008, "Brian Modra" <[EMAIL PROTECTED]> wrote: > I'm thinking of a 4xCPU and 20 Gigs and one of those large ram disks > which has its own battery and writes all RAM to hard disk in the event of > power failure. Hey, if you really have enough cash for a RamSan you can do pretty

Re: [GENERAL] Why Does UPDATE Take So Long?

2008-09-30 Thread Alan Hodgson
On Tuesday 30 September 2008, Bill Thoen <[EMAIL PROTECTED]> wrote: > Sorry for the hyperbole; I should have qualified that ridiculous > statement with "...on my machines." No doubt the problem has something > to do with configuration, because I don't know much about that. One of > my machines is r

Re: [GENERAL] Why Does UPDATE Take So Long?

2008-09-30 Thread Alan Hodgson
On Tuesday 30 September 2008, Bill Thoen <[EMAIL PROTECTED]> wrote: > Working with PG 8.1 I'm trying to update a char(4) column, and it's > taking a very long time; 15 minutes so far and no end in sight. From the > explain, it doesn't seem like it should take that long, and this column > is not ind

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread Alan Hodgson
On Tuesday 23 September 2008, William Garrison <[EMAIL PROTECTED]> wrote: > 1) other workarounds > 2) someone else who can confirm that this bug is either fixed, or not > fixed. If it is supposedly fixed, then I guess I need to make a smaller > version of my database to demonstrate the problem.

Re: [GENERAL] PITR and base + full backups

2008-09-16 Thread Alan Hodgson
On Tuesday 16 September 2008, "Joey K." <[EMAIL PROTECTED]> wrote: > Hello, > > Just to be sure of our backups we plan to do a base + full backups (yes, > we are overly paranoid) > > (1) (`date`) > > (2) perform hot rsync first (while the database is running) > $ rsync -avr pgdata /backup/`date`/

Re: [GENERAL] "Healing" a table after massive updates

2008-09-11 Thread Alan Hodgson
On Thursday 11 September 2008, "Gauthier, Dave" <[EMAIL PROTECTED]> wrote: > I have a job that loads a large table, but then has to "update" about > half the records for various reasons. My perception of what happens on > update for a particular recors is... > > - a new record will be inserted wi

Re: [GENERAL] LEFT JOIN issue

2008-09-09 Thread Alan Hodgson
On Tuesday 09 September 2008, "David Jaquay" <[EMAIL PROTECTED]> wrote: > I'm seeing a problem with a LEFT JOIN in 8.3.3, running on what I > believe to be an Ubuntu Heron server. The sql below demonstrates the > issue. explain doesn't execute the query. Show the output of the actual select - it

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Alan Hodgson
> > > Have you tried bundling all the INSERT statements into a single > > > transaction? > > > > Yes, the developer already made sure of that and I verified. I would verify that again, because fsync shouldn't make much of a difference in that circumstance. I might not do all 16 million in one tra

Re: [GENERAL] WAL file questions - how to relocate on Windows, how to replay after total loss, etc

2008-08-28 Thread Alan Hodgson
On Thursday 28 August 2008, "John T. Dow" <[EMAIL PROTECTED]> wrote: > B - To protect against permanent server failure (such as physical > destruction of the server's hard drives), do a pg_dump backup regularly. > The only data loss is data inserted or updated since the last pg_dump. > Use pg_dumpa

Re: [GENERAL] WAL file questions - how to relocate on Windows, how to replay after total loss, etc

2008-08-28 Thread Alan Hodgson
On Thursday 28 August 2008, Shane Ambler <[EMAIL PROTECTED]> wrote: > If you have a filesystem backup from 6 hours ago, then the WAL files as > they are now can be used to update the backup to match the db as it is > now. This makes the filesystem backup have two points of interest. First > the ent

Re: [GENERAL] Partitioned Tables - How/Can does slony handle it?

2008-08-28 Thread Alan Hodgson
On Thursday 28 August 2008, Magnus Hagander <[EMAIL PROTECTED]> wrote: > Ow Mun Heng wrote: > > I posed this question to the Slony List as well, but no response yet. > > It's actually in the Slony docs: > http://www.slony.info/documentation/partitioning.html > > I haven't actually used it in produc

Re: [GENERAL] New to postgres -' how to' tips needed

2008-08-21 Thread Alan Hodgson
On Thursday 21 August 2008, "Markova, Nina" <[EMAIL PROTECTED]> wrote: > Hi, > > > I'm completely new to postgres. My main job will be to install and > configure it properly and I'm not sure how much I can rely on the default > values. > > Are there any good articles howto install and configure po

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Alan Hodgson
On Thursday 21 August 2008, Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote: > I've a large table with a pk and several smaller tables with fk > referencing to it. > > deleting from the first table is very slow. > > Not all the related fk have indexes but they are VERY small (0 to > 100 records) w

Re: [GENERAL] Updates and deletes with joins

2008-08-19 Thread Alan Hodgson
On Tuesday 19 August 2008, Gordon <[EMAIL PROTECTED]> wrote: > I want to be able to restrict any query that updates or deletes from > the articles table so that they can only occur if there isn't a > corresponding entry in the locks table. As far as I can tell, > however, you can't join tables whe

Re: [GENERAL] Index creation and maintenance_work_mem

2008-07-29 Thread Alan Hodgson
On Tuesday 29 July 2008, "Francisco Reyes" <[EMAIL PROTECTED]> wrote: > On 2:53 pm 07/29/08 Alan Hodgson <[EMAIL PROTECTED]> wrote: > > --sar 2 30 > > Linux 2.6.9-42.ELsmp (trans03) 07/29/2008 > > 12:58:09 PM CPU %user %nice %system

Re: [GENERAL] Index creation and maintenance_work_mem

2008-07-29 Thread Alan Hodgson
On Tuesday 29 July 2008, "Francisco Reyes" <[EMAIL PROTECTED]> wrote: > Besides maintenance_work_mem, what else can be changed to improve index > creation? > Depends where the bottleneck is. 1 CPU core 100% user/system = buy faster CPU cores. System in I/O wait = upgrade disk channel. -- Alan

Re: [GENERAL] Optimizing a like-cause

2008-07-22 Thread Alan Hodgson
On Tuesday 22 July 2008, Stefan Sturm <[EMAIL PROTECTED]> wrote: > Hello, > > I'm developing a autocomplete Feature using php and PostgreSQL 8.3. > To fill the autocomplete box I use the following SQL Statement: > select * from _table_ where upper( _field_ ) like '%STRING%'; > > This SQL Statement

Re: [GENERAL] question about performance

2008-07-20 Thread Alan Hodgson
On Sunday 20 July 2008, Robert Urban <[EMAIL PROTECTED]> wrote: > Hi PostgreSQLer, > > if I have a table, the_table, with a DATE field, i'll call it 'day', and > I'd like to find all rows whos day falls within a given month, which of > the following methods is faster/costs less: > > 1. > > SE

Re: [GENERAL] High inserting by syslog

2008-07-03 Thread Alan Hodgson
On Thursday 03 July 2008, Richard Huxton <[EMAIL PROTECTED]> wrote: > You might want to partition the table monthly. That will make it easier > to manage a few years from now. > http://www.postgresql.org/docs/current/static/ddl-partitioning.html Definitely pay attention to this point ... it's pret

Re: [GENERAL] Losing data

2008-06-19 Thread Alan Hodgson
On Thursday 19 June 2008, Garry Saddington <[EMAIL PROTECTED]> wrote: > I read in a > Postgres manual that the hard disk may report to the OS that a write has > occured when it actually has not, is this possible? Yeah. But unless the power suddenly turned off that wouldn't cause data loss. > Oh

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-18 Thread Alan Hodgson
On Wednesday 18 June 2008, Craig Ringer <[EMAIL PROTECTED]> wrote: > > Every file from /var/lib/pgsql/ before I started this is on the > > weekly backup tape from last Friday night. If need be I can restore > > from that and start over. > > Well, no worries then. I'm sure you can understand that

Re: [GENERAL] auto-vacuum questions

2008-05-08 Thread Alan Hodgson
On Thursday 08 May 2008, John Gateley <[EMAIL PROTECTED]> wrote: > But the new database, mydbtest, always has slow queries. > I run an analyze and they speed up. Do the query plans actually change, or are you just seeing caching effects from running the analyze? -- Alan signature.asc Descrip

Re: [GENERAL] Backup setup

2008-04-23 Thread Alan Hodgson
On Wednesday 23 April 2008, "Gabor Siklos" <[EMAIL PROTECTED]> wrote: > I need to back up our database off-site for disaster recovery. If I just > back up the entire database data directory (i.e. /var/lib/pgsql/data) > will I be able to restore from there? Technically you can do this, if you do it

Re: [GENERAL] In the belly of the beast (MySQLCon)

2008-04-18 Thread Alan Hodgson
On Friday 18 April 2008, Geoffrey <[EMAIL PROTECTED]> wrote: > What about the: > > 8.1 -> slony -> 8.3 > switch users to 8.3 databases > > solution. 15+ million row inserts/updates a day across 1000+ tables. Oh, and an extensive existing Slony structure for some portions of the database. I could

Re: [GENERAL] In the belly of the beast (MySQLCon)

2008-04-18 Thread Alan Hodgson
On Friday 18 April 2008, Chris Browne <[EMAIL PROTECTED]> wrote: > I note in the blog that the "in place upgrade" issue came up. > (Interesting to observe that it *also* came up pretty prominently in > the intro session at PG East... This is obviously a matter of Not > Inconsiderable Interest...)

Re: [GENERAL] Problem after VACUUM ANALYZE

2008-04-08 Thread Alan Hodgson
On Tuesday 08 April 2008, [EMAIL PROTECTED] wrote: > The problem is that we have peaktimes were everything is running fine. It > has something to do with the vacuum process running. To simplify my > problem: > > - I run vaccum analyze concurrently with some few user queries: slows > down to a crawl

Re: [GENERAL] slow pgsql tables - need to vacuum?

2008-04-07 Thread Alan Hodgson
On Monday 07 April 2008, Dan99 <[EMAIL PROTECTED]> wrote: > Does TRUNCATE TABLE keep all necessary table > information such as indexes, constraints, triggers, rules, and > privileges? Yes. It does require an exclusive lock on the table very briefly, though, which DELETE does not. > Currently a m

Re: [GENERAL] Survey: renaming/removing script binaries (createdb, createuser...)

2008-03-26 Thread Alan Hodgson
On Wednesday 26 March 2008, Zdeněk Kotala <[EMAIL PROTECTED]> wrote: > 1) What type of names do you prefer? > --- > > a) old notation - createdb, createuser ... > b) new one with pg_ prefix - pg_createdb, pg_creteuser ... > c) new one with pg prefix - pgcreatedb, pgcreat

Re: [GENERAL] select any table

2008-03-26 Thread Alan Hodgson
On Tuesday 25 March 2008, "Roberts, Jon" <[EMAIL PROTECTED]> wrote: > We are adding tables and schemas all of the time and we need to grant > auditors read-only access to the database. Make a "grant select on table to auditors;" a standard part of your table creation process. -- Alan -- Sent v

Re: [GENERAL] searching using indexes 8.3

2008-03-10 Thread Alan Hodgson
On Monday 10 March 2008, LARC/J.L.Shipman/jshipman <[EMAIL PROTECTED]> wrote: > Hi, > When I do a search such as: > > EXPLAIN ANALYZE SELECT * FROM itemsbyauthor; > QUERY PLAN > ---

Re: [GENERAL] using warm standby with drbd???

2008-03-04 Thread Alan Hodgson
On Tuesday 04 March 2008, "libra dba" <[EMAIL PROTECTED]> wrote: > How else can i replicate the wal_files? ( i don't want to user common > file system ,,, NFS,,, etc.)? scp > > Another thing which i want to ask is that if we are generating archives > every 1 minute. then what happens to the data

Re: [GENERAL] GRANT ALL ON recursive for all tables in my scheme?

2008-03-04 Thread Alan Hodgson
On Tuesday 04 March 2008, "A Lau" <[EMAIL PROTECTED]> wrote: > I recently searched for a way to grant permissions to a new created user > for all tables in a scheme or database. I just found ways who uses psql > and scripts. But I'm astonished that there is no way to do it with the > "grant all on

<    1   2   3   >