Re: [GENERAL] Importing large object (with lo_import) to table in separate tablespaces takes up lots of space in $PGDATA

2014-10-09 Thread Andreas Joseph Krogh
På torsdag 09. oktober 2014 kl. 07:29:30, skrev Guillaume Lelarge < guilla...@lelarge.info >: Hi, Le 9 oct. 2014 01:31, "Andreas Joseph Krogh" mailto:andr...@visena.com>> a écrit : > > Hi all. >   > I'm having a database, called "apeland", which at first (when cr

[GENERAL] Optimal checkpoint_setting

2014-10-09 Thread pinker
Hello All, I have a brand new machine to tune: x3750 M4, 4xE5-4640v2 2.2GHz; 512GBRAM (32x16GB), 4x300GB SAS + SSD (Easy Tier) in RAID 10 What's particularly important now is to choose optimal configuration for write operations. We have discussion about checkpoint_segments and checkpoint_timeout p

Re: [GENERAL] Converting char to varchar automatically

2014-10-09 Thread hari . fuchs
"Andrus" writes: > Hi! > > Thank you. > >>This revised query should give you what you need: >>SELECT 'ALTER TABLE ' || quote_ident(n.nspname) || '.' >>|| quote_ident(c.relname) >>|| ' ALTER COLUMN ' || quote_ident(a.attname) || ' TYPE varchar(' >> || i.character_maximum_l

[GENERAL] Understanding and implementing a GiST Index

2014-10-09 Thread Connor Wolf
Hi there! I'm trying to implement a custom indexing system using the GiST index framework, and I have a few questions. Basically, I'm trying to implement a system that allows me to search across a set of 64 bit integers by hamming distance. This is intended to be used in searching for similar

Re: [GENERAL] Understanding and implementing a GiST Index

2014-10-09 Thread Sergey Konoplev
On Thu, Oct 9, 2014 at 12:09 AM, Connor Wolf wrote: > I'm trying to implement a custom indexing system using the GiST index > framework, and I have a few questions. > Basically, I'm trying to implement a system that allows me to search across > a set of 64 bit integers by hamming distance. This is

Re: [GENERAL] Optimal checkpoint_setting

2014-10-09 Thread Jeff Janes
On Thu, Oct 9, 2014 at 3:52 AM, pinker wrote: > Hello All, > I have a brand new machine to tune: > x3750 M4, 4xE5-4640v2 2.2GHz; 512GBRAM (32x16GB), 4x300GB > SAS + SSD (Easy Tier) in RAID 10 > > What's particularly important now is to choose optimal configuration for > write operations. We have

Re: [GENERAL] Optimal checkpoint_setting

2014-10-09 Thread Dennis
Hi, a little off the general topic but I am just wondering if the “tar -cf - pgdata | wc -c” trick can be used as general trick to pre-warm the cache? Thanks. On Oct 9, 2014, at 10:55 AM, Jeff Janes wrote: > On Thu, Oct 9, 2014 at 3:52 AM, pinker wrote: > Hello All, > I have a brand new machi

[GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Rob Flemming
Hi I've had a a PostgreSQL 9.3 server running on Windows 7 for several months. While trying to diagnose a remote computer's connection problem (through ArcGIS, grrr), i was clicking through the postgres (data) directory and opened a couple of files using Notepad but promptly closed them without m

Re: [GENERAL] Optimal checkpoint_setting

2014-10-09 Thread John R Pierce
On 10/9/2014 1:13 PM, Dennis wrote: Hi, a little off the general topic but I am just wondering if the “tar -cf - pgdata | wc -c” trick can be used as general trick to pre-warm the cache? I wouldn't do this if your pgdata is larger than about 50% of your physical ram. -- john r pierce

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Raymond O'Donnell
On 09/10/2014 21:30, Rob Flemming wrote: > Hi I've had a a PostgreSQL 9.3 server running on Windows 7 for > several months. > > While trying to diagnose a remote computer's connection problem > (through ArcGIS, grrr), i was clicking through the postgres (data) > directory and opened a couple of f

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread John R Pierce
On 10/9/2014 1:41 PM, Raymond O'Donnell wrote: >The messages in the log file are: 2014-10-09 12:59:40 PDT LOG: >invalid connection type "" 2014-10-09 12:59:40 PDT CONTEXT: line 1 >of configuration file "C:/postgres/pg_hba.conf" 2014-10-09 12:59:40 >PDT FATAL: could not load pg_hba.conf Well,

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Ray Stell
On Oct 9, 2014, at 4:30 PM, Rob Flemming wrote: > 2014-10-09 12:59:40 PDT CONTEXT: line 1 of configuration file > "C:/postgres/pg_hba.conf" > 2014-10-09 12:59:40 PDT FATAL: could not load pg_hba.conf what’s on line 1 of pg_hba.conf? signature.asc Description: Message signed with Op

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread John R Pierce
On 10/9/2014 1:30 PM, Rob Flemming wrote: I added a line to the "pg_hba.conf" file and tried to restart the server, but now it will not run! The messages in the log file are: 2014-10-09 12:59:40 PDT LOG: invalid connection type "" 2014-10-09 12:59:40 PDT CONTEXT: line 1 of configurat

Re: [GENERAL] Optimal checkpoint_setting

2014-10-09 Thread Kevin Grittner
John R Pierce wrote: > On 10/9/2014 1:13 PM, Dennis wrote: >> Hi, a little off the general topic but I am just wondering if the “tar >> -cf - pgdata | wc -c” trick can be used as general trick to pre-warm >> the cache? > > I wouldn't do this if your pgdata is larger than about 50% of your > physi

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Raymond O'Donnell
On 09/10/2014 21:44, John R Pierce wrote: > On 10/9/2014 1:41 PM, Raymond O'Donnell wrote: >>> >The messages in the log file are: 2014-10-09 12:59:40 PDT LOG: >>> >invalid connection type "" 2014-10-09 12:59:40 PDT CONTEXT: line 1 >>> >of configuration file "C:/postgres/pg_hba.conf" 2014-10-09 12

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread John R Pierce
On 10/9/2014 1:52 PM, Rob Flemming wrote: I have just installed Notepad++. The file was UTF8, with no special characters... ok, whats the first line ? hmm. the file may also have to be in "unix" format, not "dos", as DOS format puts in front of each new-line. thats under Edit -> EOL Con

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Rob Flemming
I think that pg_hba.conf is a bit of a red herring, the first line of the log file is probably more important (?): PDT LOG: invalid connection type "" (I changed the file to Unix format anyway, just to rule that out). On 9 October 2014 13:56, John R Pierce wrote: > On 10/9/2014 1:52 PM, Rob F

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Adrian Klaver
On 10/09/2014 02:16 PM, Rob Flemming wrote: I think that pg_hba.conf is a bit of a red herring, the first line of the log file is probably more important (?): PDT LOG: invalid connection type "" No pg_hba.conf is where the issue is. From your original post: 2014-10-09 12:59:40 PDT LOG: inva

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Rob Flemming
You were right! (Of course, you knew that.) I typed a new pg_hba.conf from scratch without all the comments, i.e. only the connection strings, it worked. Thank you 'Community'! (Doh! My kids think I'm so smart because I work on computers, some day they'll discover the truth. Now to spend the a

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Adrian Klaver
On 10/09/2014 02:37 PM, Rob Flemming wrote: You were right! (Of course, you knew that.) I typed a new pg_hba.conf from scratch without all the comments, i.e. only the connection strings, it worked. Thank you 'Community'! (Doh! My kids think I'm so smart because I work on computers, some day

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Rob Flemming
Indeed! I'd also note that I was unable to fix the file with Notepad++ because I was saving it with "Encoding > Encode in UTF-8" rather than ">Encode in UTF-8 without BOM" The "BOM" was the bit causing the trouble at the start of the file. Thanks again, Rob On 9 October 2014 14:41, Adrian Klaver

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread John R Pierce
On 10/9/2014 2:50 PM, Rob Flemming wrote: I'd also note that I was unable to fix the file with Notepad++ because I was saving it with "Encoding > Encode in UTF-8" rather than ">Encode in UTF-8 without BOM" The "BOM" was the bit causing the trouble at the start of the file. sigh. postgres s

Re: [GENERAL] PostgreSQL server won't start, corrupt?

2014-10-09 Thread Adrian Klaver
On 10/09/2014 03:00 PM, John R Pierce wrote: On 10/9/2014 2:50 PM, Rob Flemming wrote: I'd also note that I was unable to fix the file with Notepad++ because I was saving it with "Encoding > Encode in UTF-8" rather than ">Encode in UTF-8 without BOM" The "BOM" was the bit causing the trouble at