Re: [GENERAL] Most effective settings for deleting lots of data?

2015-08-26 Thread Alan Hodgson
On Wednesday, August 26, 2015 08:25:02 PM Cory Tucker wrote: > What settings would you recommend? Also, it just occurred to me that I > should try to disable/drop all indexes (especially since they will be > recreated) later so that those are not updated in the process. Don't drop the indexes you

Re: [GENERAL] Checkpoint Err on Startup of Rsynced System

2016-05-31 Thread Alan Hodgson
On Tuesday, May 31, 2016 10:13:14 AM Jim Longwill wrote: > I am trying to setup a 2nd, identical, db server (M2) for development > and I've run into a problem with starting up the 2nd Postgres installation. > > Here's what I've done: >1) did a 'clone' of 1st (production) machine M1 (so both ma

Re: [GENERAL] Help on recovering my standby

2016-06-22 Thread Alan Hodgson
On Tuesday 21 June 2016 19:34:18 Ramalingam, Sankarakumar wrote: > Hi I have my standby (streaming replication) down due to missing wal files. > You would see the same error in the logs stating "cannot find the wal file > ..." What is the best way to get it going so that when we switch between > st

Re: [GENERAL] streaming replication and WAL

2016-10-25 Thread Alan Hodgson
On Tuesday 25 October 2016 17:08:26 t.dalpo...@gmail.com wrote: > Hi, > let's suppose I have: > - a primary server with its own local archive location, configured for > continuous archiving > - a standby server without archive. > These servers are configured for Sync streaming replication . > L

Re: [GENERAL] HELP!!! The WAL Archive is taking up all space

2015-12-09 Thread Alan Hodgson
On Wednesday, December 09, 2015 07:55:09 AM FattahRozzaq wrote: > archive_mode = on > archive_command = 'cp -i %p /home/postgres/archive/master/%f' > > > The WAL archive folder is at /home/postgres/archive/master/, right? > This directory consumes around 750GB of Disk-1. > Each segment in the /ho

Re: [GENERAL] Does PostgreSQL support to write glusterfs by Libgfapi

2015-12-16 Thread Alan Hodgson
On Tuesday, December 15, 2015 11:26:40 PM zh1029 wrote: > Hi, > It seems low performance PostgreSQL(9.3.6) while writing data to glusterFS > distributed file system. libgfapi is provide since GlusterFS version 3.4 to > avoid kernel visits/data copy which can improve its performance. But I > didn'

Re: [GENERAL] Problem after replication switchover

2016-04-05 Thread Alan Hodgson
On Tuesday, April 05, 2016 12:55:04 PM Lars Arvidson wrote: > Is there something I missed in the switchover or could this be a bug? > I'd guess it's probably more like option 3 - Glusterfs ate my database. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] Problem after replication switchover

2016-04-06 Thread Alan Hodgson
On Wednesday, April 06, 2016 10:33:16 AM Lars Arvidson wrote: > > I'd guess it's probably more like option 3 - Glusterfs ate my database. > > Hi, thanks for your reply! > We do archive logs on a distributed Glusterfs volume in case the streaming > replication gets too far behind and the transactio

Re: [GENERAL] Any difference between commit/rollback when only temp tables and \copy are used

2016-05-16 Thread Alan Hodgson
On Monday, May 16, 2016 03:41:23 PM David G. Johnston wrote: > I have a psql script that obtains data via the \copy command and loads it > into a temporary table. Additional work is performed possibly generating > additional temporary tables but never any "real" tables. Then the script > outputs,

Re: [GENERAL] Migrate 2 DB's - v8.3

2016-05-27 Thread Alan Hodgson
On Friday, May 27, 2016 05:32:08 PM Melvin Davidson wrote: > Well, Slony certainly will do the trick. > Keep in mind you will need to do schema only first to the slave. > You set up replication from the old server with the db on the new server as > the slave. Then you initiate replication. It will

Re: [GENERAL] DBI/DBD::Pg and transactions

2007-07-18 Thread Alan Hodgson
On Wednesday 18 July 2007 14:29, "Roderick A. Anderson" <[EMAIL PROTECTED]> wrote: > In the mean time if the script gets triggered again and the first > instance isn't finished the second needs to not be able to select those > records already being handled. select for update won't do that. It wil

Re: [GENERAL] EXPLAIN ANALYZE not considering primary and unique indices!

2007-08-27 Thread Alan Hodgson
On Monday 27 August 2007 05:21, Sanjay <[EMAIL PROTECTED]> wrote: >Wondering why it is not using the index, which would have > been > automatically created for the primary key. Because you not only have just one row in the whole table, 100% of them will match the query. In short, one page fetch f

Re: [GENERAL] Inherited FK Indexing

2007-09-14 Thread Alan Hodgson
On Friday 14 September 2007, Ketema Harris <[EMAIL PROTECTED]> wrote: > as expected I can do select * from states and get everything out of > the child table as well. What I can't do is create a FK to the > states table and have it look in the child table as well. Is this on > purpose? Is it pos

Re: [GENERAL] Problem dropping table

2007-09-18 Thread Alan Hodgson
On Tuesday 18 September 2007 10:30, Ken Logan <[EMAIL PROTECTED]> wrote: > When we try to drop the table we get the error: > ERROR: "member_pkey" is an index You have to remove the table from it's Slony set before you can drop it. Slony does some hackish things to subscriber tables that make the

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Alan Hodgson
On Monday 01 October 2007, Mike Charnoky <[EMAIL PROTECTED]> wrote: > This is strange... count(*) operations over a period of one day's worth > of data now take ~1-2 minutes to run or ~40 minutes. It seems that the > first time the data is queried it takes about 40 minutes. If I try the > query a

Re: [GENERAL] Upgrading PG

2007-10-01 Thread Alan Hodgson
On Monday 01 October 2007, "Gauthier, Dave" <[EMAIL PROTECTED]> wrote: > I'm going to move from v7.4.13 to v8.2.0 (suse-64). I have 2 > pre-existing DBs. Do I need to "convert" or port them to v8 in any way > after I start up with a v8 postmaster? > All major version upgrades require a dump and r

Re: RES: [GENERAL] 8.2.4 selects make applications wait indefinitely

2007-10-11 Thread Alan Hodgson
On Thursday 11 October 2007, "Carlos H. Reimer" <[EMAIL PROTECTED]> wrote: > Don´t know but apparently the problem is not an issue in the client, as > I´m able to connect and do the select * in other 8.2.4 servers. > > Don´t know what kind of tests I should do to help fixing this problem. > > Any

Re: [GENERAL] DB errors

2007-10-12 Thread Alan Hodgson
On Friday 12 October 2007, "Akash Garg" <[EMAIL PROTECTED]> wrote: > We had a crash of one of our db systems last night. After doing a fsck > of he file system and getting the db backup, we're getting a lot of these > messages in our logs. The DB will also occasionally crash now. > > Oct 12 07:40

Re: [GENERAL] Importing MySQL dump into PostgreSQL 8.2

2007-10-15 Thread Alan Hodgson
On Friday 12 October 2007, wido <[EMAIL PROTECTED]> wrote: > > hi! but what happens when somebody sent you a dump file and you can't > convert the tables? all i have is a 116MB sql file, and i won't > convert it by hand :P Restore it into MySQL and then extract it in whatever form you like. Free

Re: [GENERAL] Resetting SEQUENCEs

2007-10-18 Thread Alan Hodgson
On Thursday 18 October 2007, Laurent ROCHE <[EMAIL PROTECTED]> wrote: > Hi, > > I am quite surprised I could not find a way to automatically reset the > value of a sequence for all my tables. > > Of course, I can write: > SELECT setval('serial', max(id)) FROM distributorsBut if I reload data > into

Re: re[GENERAL] lations does not exist

2007-10-18 Thread Alan Hodgson
On Tuesday 16 October 2007, ctorres <[EMAIL PROTECTED]> wrote: > Hi, > > I doing a simple insert into a table re Perl/DBI > "INSERT INTO party (party_id, party_type_id, description, status_id) >VALUES ($partyId, 'PERSON', 'Initial > Import','PARTY_ENABLED') > > and

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-22 Thread Alan Hodgson
On Sunday 21 October 2007, Kevin Hunter <[EMAIL PROTECTED]> wrote: > Heh. And as Tom points out downthread, that "shortcut" probably doesn't > gain anything in the long run. Considering how expensive updates are in PostgreSQL, I suspect that isn't true. However, the current behaviour does seem

Re: [GENERAL] "Resurrected" data files - problem?

2007-11-08 Thread Alan Hodgson
On Thursday 08 November 2007, "Albe Laurenz" <[EMAIL PROTECTED]> wrote: > Can you give me a good reason why? > > > Try re-reading the instructions on backup in the manual. > > I know them well. That is why I ask if this questionable procedure > could lead to damage. You cannot backup a live datab

Re: [GENERAL] How to automate password requests?

2007-11-28 Thread Alan Hodgson
On Wednesday 28 November 2007, Marten Lehmann <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to automate some postgresql scripts, but I cannot find a way > to pass a password directly to commands like pg_dump psql and so on. > Even a > > echo "password" | psql > > doesn't work, the password pro

Re: [GENERAL] Disk configurations....

2008-01-24 Thread Alan Hodgson
On Thursday 24 January 2008, Nathan Wilhelmi <[EMAIL PROTECTED]> wrote: > Hello - Typically case of a software guy needing to spec hardware for a > new DB server. Further typified case of not knowing exact amount of data > and I/O patterns. So if you were to spec a disk system for a new general > p

Re: [GENERAL] Why Select Count(*) from table - took over 20 minutes?

2010-10-26 Thread Alan Hodgson
On October 26, 2010 10:18:41 am Ozz Nixon wrote: > I have hung off indexes for each column, to resolve my previous > "performance" issue from 3+ weeks ago. However, COUNT() is still dog slow > - this table is a write once, read many... *never* update, nor delete. > > Any suggestions? If you need

Re: [GENERAL] 9.0 replication -- multiple hot_standby servers

2010-10-29 Thread Alan Hodgson
On October 29, 2010, "Dean Gibson (DB Administrator)" wrote: > My question is, how do I configure the other three (still) hot_standby > boxes to now use the new primary? Clearly I can change the > "recovery.conf" file on each standby box, but that seems like an > unnecessary nuisance. I'm curio

Re: [GENERAL] 9.0 replication -- multiple hot_standby servers

2010-10-29 Thread Alan Hodgson
On October 29, 2010, "Dean Gibson (DB Administrator)" wrote: > On 2010-10-29 11:17, Alan Hodgson wrote: > > I'm curious about this too. It seems that currently I'd have to > > rebuild any additional slaves basically from scratch to use the new > > mas

Re: [GENERAL] Restore problem

2010-12-28 Thread Alan Hodgson
On December 28, 2010, Adrian Klaver wrote: > On 12/28/2010 07:40 PM, Bob Pawley wrote: > >> Open the file in Wordpad and see if it looks better. > >> > >> I downloaded an sql editor and it looks the same in it as well. > >> > >> At least the editor will make it easier to fix the problem. However

Re: [GENERAL] Restore problem

2010-12-28 Thread Alan Hodgson
On December 28, 2010, "Bob Pawley" wrote: > It's often a good idea to maintain function definitions outside the > database, > under version control, and apply them to the database from there. > > I would appreciate a more detailed explanation of this. Treat them like source code. > > Bob > >

Re: [GENERAL] Backup and restore sequences

2011-01-07 Thread Alan Hodgson
On January 7, 2011, gvim wrote: > PostgreSQL 9.0.1/pgAdminIII 1.12.1 > > I want to copy selected tables from one database to another and maintain > the sequences which I originally setup with: > > CREATE SEQUENCE venues_id_seq START WITH 1122; > ALTER TABLE venues ALTER COLUMN id SET DEFAULT nex

Re: [GENERAL] HA solution

2011-01-14 Thread Alan Hodgson
On January 14, 2011, "Jaiswal Dhaval Sudhirkumar" wrote: > Hi, > > I am looking for active-active clustering solution. > > I have one SAN box and two separate NODES, where I need to create > active-active cluster. My data directory would be one and mounted to the > SAN box for both the nodes. (

Re: [GENERAL] upgrade

2011-02-03 Thread Alan Hodgson
On February 2, 2011, "William Bruton" wrote: > How do I know which version to upgrade to from 8.1.4? > Well, 8.1 is no longer supported, it seems. So an upgrade to any supported version will likely require application changes, or at least thorough testing. You might as well go right to 9.0.3 t

Re: [GENERAL] bytea Issue - Reg

2014-06-06 Thread Alan Hodgson
On Wednesday, June 04, 2014 10:49:18 PM sramay wrote: > relation "public.file_attachments" does not exist .. is almost certainly not a size problem. What does your PostgreSQL log say? I suspect your app is connecting to the wrong database. -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] pg_standby replication problem

2014-06-09 Thread Alan Hodgson
On Monday, June 09, 2014 04:28:53 PM Khangelani Gama wrote: > Please help me with this, my secondary server shows a replication problem. > It stopped at the file called *00054BAF00AF …*then from here > primary server kept on sending walfiles, until the walfiles used up the > disc space

Re: [GENERAL] pg_standby replication problem

2014-06-09 Thread Alan Hodgson
On Monday, June 09, 2014 08:05:41 PM Khangelani Gama wrote: > Hi All > > I would like to re-post the problem we have. The secondary server ran out > the disc space due the replication problem (Connection Time out). The secondary server would not (could not) run out of drive space due to a proble

Re: [GENERAL] How to store fixed size images?

2014-06-19 Thread Alan Hodgson
On Thursday, June 19, 2014 10:21:56 AM Andy Colson wrote: > On 06/16/2014 08:10 PM, sunpeng wrote: > > We have many small size(most fixed size) images, how to store them? There > > are two options: 1. Store images in folders, managed by os file system, > > only store path in postgresql 2. Store ima

Re: [GENERAL] Upgrade to 9.3

2014-07-21 Thread Alan Hodgson
On Monday, July 21, 2014 09:05:18 PM Karthik Iyer wrote: > Hello, > > We are planning to upgrade Postgres from 9.0 to 9.3. Was wondering > if there are any serious changes that I have to look out for > (syntax/datatypes changes) so that my code does not break. > http://www.postgresql.org/do

Re: [GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread Alan Hodgson
On Friday, August 29, 2014 04:14:35 AM Yogesh. Sharma wrote: > Dear David, > > > Are you currently using PostgreSQL? > > Currently we are using PostgreSQL 8.1.18 version on RHEL 5.8. > Now we plan to update this to PostgreSQL 9.0 version with RHEL6.5. As in > verion 9.0 I found least Compatibili

Re: [GENERAL] large table

2014-09-22 Thread Alan Hodgson
On Monday, September 22, 2014 11:17:05 AM Luke Coldiron wrote: > The actual size of the table is around 33 MB. > The myFunc function is called every 2.5 seconds and the wasUpdated function > every 2 seconds by separate processes. I realize that running a FULL VACUUM > or CLUSTER command on the tabl

Re: [GENERAL] Where art thou, plpython2.dll? (EDB installer)

2014-09-23 Thread Alan Hodgson
On Tuesday, September 23, 2014 02:05:48 PM Nick Guenther wrote: > I uninstalled all the postgres subpackages and rebuilt them from > ports, and ended up with an identical plpython2.so, which has these > checksums: > SHA256 (/usr/local/lib/postgresql/plpython2.so) = > 8c7ff6358d9bf0db342e3aca1762cd7

Re: [GENERAL] Processor usage/tuning question

2014-10-03 Thread Alan Hodgson
On Friday, October 03, 2014 11:24:31 AM Israel Brewster wrote: > I have a Postgresql 9.3.5 server running on CentOS 6.5. In looking at some > stats today, I saw that it was handling about 4-5 transactions/second > (according to the SELECT sum(xact_commit+xact_rollback) FROM > pg_stat_database; quer

Re: [GENERAL] Storing Video's or vedio file in DB.

2014-12-17 Thread Alan Hodgson
On Wednesday, December 17, 2014 01:55:46 PM Thomas Kellerer wrote: > Albe Laurenz schrieb am 17.12.2014 um 11:07: > > and the performance will be worse than reading files from the file system. > > There is a Microsoft research [1] (from 2006) which tested this "myth" using > SQL Server. It showed

Re: [GENERAL] pg_Restore

2013-01-21 Thread Alan Hodgson
On Monday, January 21, 2013 08:40:05 PM bhanu udaya wrote: > Hello,Thanks alot for all your replies. I tried all settings suggested, it > did not work. pg_restore is very slow. It does not come out less than 1 1/2 > hour. Can you please let me know the procedure for Template. Will it > restore the

Re: [GENERAL] Trouble with Postgresql RPM

2013-01-23 Thread Alan Hodgson
On Wednesday, January 23, 2013 09:10:40 AM Ian Harding wrote: > The System: > > Linux beta 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 > x86_64 x86_64 x86_64 GNU/Linux > That looks like a CentOS 6 system. Go to http://yum.postgresql.org/repopackages.php Find the repo appropr

Re: [GENERAL] Postgres DB crashing

2013-06-20 Thread Alan Hodgson
On Thursday, June 20, 2013 07:52:21 AM Merlin Moncure wrote: > OP needs to explore use of connection pooler, in particular pgbouncer. > Anyways none of this explains why the server is actually crashing. It might be hitting file descriptor limits. I didn't dig into the earlier part of this thread

Re: [GENERAL] "Database does not exist" weirdness

2017-02-17 Thread Alan Hodgson
On Friday 17 February 2017 18:18:20 Michael Tyson wrote: > postgres=# \q > pi@raspi ~ $ sudo -u postgres psql testdb > psql: FATAL: database "testdb" does not exist > pi@raspi ~ $ sudo -u postgres createdb testdb > createdb: database creation failed: ERROR: duplicate key value violates > unique c

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Alan Hodgson
> On Fri, Apr 21, 2017 at 12:40 PM, Edson Lidorio > > wrote: > > Hi, > > There was a disaster in my development note. I was able to recover the > > data folder. PostgreSQL 9.6.2, was installed in Centos 7. > > > > Here are the procedures I'm trying to initialize Postgresql for me to do a > > bac

Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?

2017-05-04 Thread Alan Hodgson
On Thursday 04 May 2017 14:21:00 John R Pierce wrote: > or EBS, and I've heard from more than a few people that EBS can be > something of a sand trap. > Sorry for following up off-topic, but EBS has actually improved considerably in the last few years. You can get guaranteed (and very high) IOPS

Re: [GENERAL] Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?

2017-05-04 Thread Alan Hodgson
On Thursday 04 May 2017 14:47:54 John R Pierce wrote: > On 5/4/2017 2:28 PM, Alan Hodgson wrote: > > On Thursday 04 May 2017 14:21:00 John R Pierce wrote: > >> or EBS, and I've heard from more than a few people that EBS can be > >> something of a sand trap. >

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Alan Hodgson
On Wednesday 10 May 2017 17:13:50 Ron Ben wrote: > Not possible > https://www.postgresql.org/download/linux/debian/ > > To upgrade I do: apt-get install postgresql-9.3 > There is no way to "roll back" from here. > I can not choose which version to install, it install the latest version > packed

Re: [GENERAL] installing in another directory

2008-02-08 Thread Alan Hodgson
On Friday 08 February 2008, "Hua-Ying Ling" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to install postgresql in a custom directory. when I run rpm > --prefix I'm getting a package is not relocatable error. Suggestions on > how do I get around this? Build your own package, or install from so

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Alan Hodgson
On Thursday 28 February 2008, John Evans <[EMAIL PROTECTED]> wrote: >I've heard that upgrading to 8.2 or 8.3 will allow me to setup a > timeout value for WAL log creation, but upgrading at this time is not an > option for various reasons. > >Any insight that you can provide will be greatly

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Alan Hodgson
On Thursday 28 February 2008, Erik Jones <[EMAIL PROTECTED]> wrote: > Or, even simpler: > > SELECT pg_switch_xlog(); The original poster is using 8.1. -- Alan ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Documenting a DB schema

2008-03-04 Thread Alan Hodgson
On Tuesday 04 March 2008, "Shahaf Abileah" <[EMAIL PROTECTED]> wrote: > > However, Postgres doesn't support the "comment" keyword. Is there an > alternative? comment on table table_name is 'comment'; comment on column table.column_name is 'comment'; -- Alan ---(end of

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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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, 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] PostgreSQL Point In Time Recovery

2013-10-24 Thread Alan Hodgson
On Thursday, October 24, 2013 11:31:38 AM John R Pierce wrote: > On 10/24/2013 9:47 AM, Jeff Janes wrote: > > I restore from my base backup plus WAL quite often. It is how I get a > > fresh dev or test instance when I want one. (It is also how I have > > confidence that everything is working well

Re: [GENERAL] PostgreSQL Point In Time Recovery

2013-10-25 Thread Alan Hodgson
On Thursday, October 24, 2013 11:13:34 PM Jayadevan wrote: > Alan Hodgson wrote > > > That's basically what warm standby's do, isn't it? As long as they keep > > recovery open it should work. > > A warn standby will be almost in sync with the primary, righ

Re: [GENERAL] Is it possible to "pip" pg_dump output into new db ?

2014-03-25 Thread Alan Hodgson
On Tuesday, March 25, 2014 02:56:48 PM Frank Foerster wrote: > Hi, > > we are currently in the process of upgrading a production/live 1 TB > database from 9.2 to 9.3 via pg_dump, which is quite a lengthy process. > > Fortunately we have a capable spare-server so we can restore into a clean, > fre

Re: [GENERAL] Is it safe to stop postgres in between pg_start_backup and pg_stop_backup?

2014-04-03 Thread Alan Hodgson
On Thursday, April 03, 2014 02:48:03 PM Steven Schlansker wrote: > On Apr 2, 2014, at 3:08 PM, Jacob Scott wrote: > • pg_start_backup > • Take a filesystem snapshot (of a volume containing postgres data but > not > pg_xlog) • pg_stop_backup > • pg_ctl stop > • Bring a new

Re: [GENERAL] Linux vs FreeBSD

2014-04-09 Thread Alan Hodgson
On Wednesday, April 09, 2014 09:02:02 PM Brent Wood wrote: > Given the likely respective numbers of each OS actually out there, I'd > suggests BSD is very over-represented in the high uptime list which is > suggestive. Suggestive of ... sysadmins who don't do kernel updates? -- Sent via pgsql-

Re: [GENERAL] CentOS 6 and Postgresql 9.3.4 from PGDG

2014-04-14 Thread Alan Hodgson
On Monday, April 14, 2014 09:13:51 AM Steve Clark wrote: > How did you deal with binaries and libraries, as well as third party apps > like perl modules or php/apache modules? The 8.4 library package usually ends up installed to satisfy other package requirements. Binaries get handled through th

Re: [GENERAL] pgsql 9.0.1 table corruption

2011-04-14 Thread Alan Hodgson
On April 14, 2011 08:10:47 am Dan Biagini wrote: > I suspect that it may have occurred during a filesystem level backup > (ie pg_start_backup(), tar -czf..., pg_stop_backup()), as I performed > a backup and moved the database to a different system. After > restoring the files and starting postgre

Re: [GENERAL] Locale and UTF8 for template1 in 8.4.4

2011-05-06 Thread Alan Hodgson
On May 6, 2011, Iain Barnett wrote: > Would anyone be able to point out to me how I can get the template1 > database to be utf8 and en_GB? (or US, I'm not *that* fussed) Use the --encoding and --locale options to initdb.

Re: [GENERAL] replication problems 9.0

2011-06-07 Thread Alan Hodgson
On June 7, 2011 04:38:16 PM owen marinas wrote: > Thx, Merci, Gracias Rodrigo > it worked indeed, Im wondering why replication is not included in "All" > Probably because it gives access to all the data being written to the database. -- Obama has now fired more cruise missiles than all other N

Re: [GENERAL] Write performance on a large database

2011-06-09 Thread Alan Hodgson
On June 9, 2011 05:15:26 AM Håvard Wahl Kongsgård wrote: > Hi, I have performance issues on very large database(100GB). Reading from > the database is no problem, but writing(or heavy writing) is a nightmare. > I have tried tuning postgresql, but that does not seem to improving the > writing perfor

Re: [GENERAL] Invalid byte sequence for encoding "UTF8": 0xedbebf

2011-06-15 Thread Alan Hodgson
On June 15, 2011 01:18:27 PM BRUSSER Michael wrote: > Unless there's no other options I don't want to use sed or break file into > pieces, if possible, iconv loads everything into RAM. You can use "split", convert the pieces, and then recombine, I did that when converting a large database to utf-

Re: [GENERAL] Add Foreign Keys To Table

2011-07-07 Thread Alan Hodgson
On July 7, 2011 10:40:11 AM Rich Shepard wrote: > alter table station_information add column sta_type varchar(50) > unique not null references station_type(sta_type); > NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index > "station_information_sta_type_key" for table "station_information"

Re: [GENERAL] Add Foreign Keys To Table

2011-07-07 Thread Alan Hodgson
On July 7, 2011 11:55:25 AM Rich Shepard wrote: > On Thu, 7 Jul 2011, Alan Hodgson wrote: > > You need a unique index on station_type.sta_type > > Alan, > >station_type(sta_type) is part of a composite primary key. Doesn't > primary key automatically imply uni

Re: [GENERAL] Add Foreign Keys To Table

2011-07-07 Thread Alan Hodgson
On July 7, 2011 12:30:35 PM Rich Shepard wrote: > On Thu, 7 Jul 2011, Alan Hodgson wrote: > > It implies the composite is unique. Not sta_type. > >OK. Now I understand. How, then, do I add a unique constraint to each > component of the composite key so I can add them as f

Re: [GENERAL] Need linux uid in pg-psql

2011-08-19 Thread Alan Hodgson
On August 19, 2011 07:01:33 AM Gauthier, Dave wrote: > Is there a way to get the linux idsid of a user, even for a remote network > connection? > > I could write a pg-perlu to get this, but I suspect it won't give me the > original user when there's a remote connect. > > Thanks for any suggestion

Re: [GENERAL] Streaming Replication: Observations, Questions and Comments

2011-08-24 Thread Alan Hodgson
On August 24, 2011 08:33:17 AM Samba wrote: > One strange thing I noticed is that the pg_xlogs on the master have > outsized the actual data stored in the database by at least 3-4 times, > which was quite surprising. I'm not sure if 'restore_command' has anything > to do with it. I did not understa

  1   2   3   >