Re: [GENERAL] Postgres process is crashing continously in 9.1.1

2012-05-21 Thread Jayashankar K B
Yes the board has the embedded 68k architecture based Freescale Coldfire processor. The board has a custom built Linux based on the kernel 2.6.38 The database is stored on an SD card of 4GB capacity. This is the table we have. CREATE TABLE financialtransaction ( FINANCIALTRANSACTIONID BIGINT

Re: [GENERAL] Postgres process is crashing continously in 9.1.1

2012-05-21 Thread John R Pierce
On 05/21/12 11:05 PM, Jayashankar K B wrote: board with Coldfire controller. what is this board? Coldfire is the embedded 68k-like Freescale processor? what operating system is this under? what sort of storage does this embedded system use for the database? telling us FINANCIALWHATEVERI

Re: [GENERAL] Bitrock XML Source

2012-05-21 Thread John R Pierce
On 05/21/12 11:03 PM, Greg Simpson wrote: I am trying to get the source XML file for the PostgreSQL installer. This is the BitRock InstallBuilder XML file. Can anyone direct me to the proper place to obtain this installer file? the Windows installer? thats produced by EnterpriseDB, and I don'

Re: [GENERAL] Postgres process is crashing continously in 9.1.1

2012-05-21 Thread Jayashankar K B
We can understand the difference in shared buffer size as the Windows PC has 2GB of RAM and the board has 256MB of RAM. So please let us know if this shared buffer parameter has any relation to the problem we are facing. Thanks and Regards Jayashankar From: pgsql-general-ow...@postgresql.org [

[GENERAL] Bitrock XML Source

2012-05-21 Thread Greg Simpson
Greetings,   I am trying to get the source XML file for the PostgreSQL installer. This is the BitRock InstallBuilder XML file. Can anyone direct me to the proper place to obtain this installer file?   Thank you, Greg

[GENERAL] Postgres process is crashing continously in 9.1.1

2012-05-21 Thread Jayashankar K B
Hi, We are using Postgres 9.1.1 on a board with Coldfire controller. The postgres processes are crashing and restarting upon executing a particular instruction and it keeps repeating. Even when we tried with Postgres 9.1.3, same problem happens. It works fine until the FINANCIALTRANSACTIONID rea

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Craig Ringer
On 05/21/2012 06:59 PM, Andrew Sullivan wrote: On Mon, May 21, 2012 at 02:44:45AM -0700, John R Pierce wrote: support the bastardized UTF-16 'unicode' implemented by Windows NT To be fair to Microsoft, while the BOM might be an irritant, they do use a perfectly legitimate encoding of Unicode.

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-21 Thread Tom Lane
deepak writes: > We could reproduce the start-up problem on Windows 2003. After a reboot, > postmaster, in its start-up sequence cleans up old temporary files, and > this step used to take several minutes (a little over 4 minutes), delaying > the writing of line 6 onwards into the PID file. This d

Re: [GENERAL] varchar for loops possible?

2012-05-21 Thread Raymond O'Donnell
On 18/05/2012 21:30, J.V. wrote: > update table set varcharid = ''' || tmp_var || ''' Others have answered your question, but there's a problem here too; you don't need the quotes. This statement should be just: update table set varcharid = tmp_var; ...assuming that the types match, of course.

Re: [GENERAL] how to for loop with distinct values?

2012-05-21 Thread Merlin Moncure
On Mon, May 21, 2012 at 3:39 PM, J.V. wrote: > > I am banging my head over this. I want to select distinct values from a > varchar column and iterate through the values. > > I want to select the distinct values from this column and loop through them > (using as a variable) in a raise notice state

Re: [GENERAL] Confusion about composite indexes

2012-05-21 Thread Bill Mitchell
Thanks to everybody's input -- as a first-time poster to this listserv, I wasn't sure how long it would take to get a response. ;) I was frankly astonished to see that the composite index on (a,b) was used when I searched for (a), but Chris' response makes total sense. In this case, I don't want

Re: [GENERAL] Confusion about composite indexes

2012-05-21 Thread Merlin Moncure
On Mon, May 21, 2012 at 3:36 PM, Dmitriy Igrishin wrote: >> So you can get fully index lookups on all of a, b, ab, and ba.  the >> primary key can't optimize ba because indexes only fully match if >> candidate fields are supplied from left to right order.  They can >> still help somewhat, but to a

[GENERAL] significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-21 Thread Lonni J Friedman
Greetings, I have a 4 server postgresql-9.1.3 cluster (one master doing streaming replication to 3 hot standby servers). All of them are running Fedora-16-x86_64. Last Friday I upgraded the entire cluster from Fedora-15 with postgresql-9.0.6 to Fedora-16 with postgresql-9.1.3. I made no changes

[GENERAL] how to for loop with distinct values?

2012-05-21 Thread J.V.
* I am banging my head over this. I want to select distinct values from a varchar column and iterate through the values. * *I want to select the distinct values from this column and loop through them (using as a variable) in a raise notice statement and also in an update statement. I have n

Re: [GENERAL] Confusion about composite indexes

2012-05-21 Thread Dmitriy Igrishin
2012/5/22 Merlin Moncure > On Mon, May 21, 2012 at 2:34 PM, Bill Mitchell > wrote: > > I am searching for some logic behind the selection of an index in > postgres > > -- it seems that if I have a composite index based on both columns in a > join > > table, it's only referenced if I query on the

Re: [GENERAL] Confusion about composite indexes

2012-05-21 Thread Merlin Moncure
On Mon, May 21, 2012 at 2:34 PM, Bill Mitchell wrote: > I am searching for some logic behind the selection of an index in postgres > -- it seems that if I have a composite index based on both columns in a join > table, it's only referenced if I query on the first term in the composite > index.  I'

Re: [GENERAL] Confusion about composite indexes

2012-05-21 Thread Chris Curvey
On Mon, May 21, 2012 at 3:34 PM, Bill Mitchell wrote: > I am searching for some logic behind the selection of an index in > postgres -- it seems that if I have a composite index based on both columns > in a join table, it's only referenced if I query on the first term in the > composite index.

Re: [GENERAL] backup script

2012-05-21 Thread Vo, Catherine CTR DTIC Z
Hi, So exactly what do I need to do here? I don't understand how the backup script work and what exactly user do I need to create? Can you please tell me more in detail? Thanks, Bach-Nga Catherine Vo 703-767-7009 mailto: bvo@dtic.mil -Original Message- From: pgsql-general-ow...@

[GENERAL] Confusion about composite indexes

2012-05-21 Thread Bill Mitchell
I am searching for some logic behind the selection of an index in postgres -- it seems that if I have a composite index based on both columns in a join table, it's only referenced if I query on the first term in the composite index. I've read http://www.postgresql.org/docs/9.1/static/indexes-multi

Re: [GENERAL] Libpq question

2012-05-21 Thread Merlin Moncure
On Mon, May 21, 2012 at 9:54 AM, John Townsend wrote: > On 5/21/2012 7:56 AM, Merlin Moncure wrote: > > On Sun, May 20, 2012 at 2:52 PM, John Townsend > wrote: > > By by-passing the "dll" (or "so" on Linux) library I mean you write function > or procedure calls to the server that is running as a

Re: [GENERAL] odd intermittent query hanging issue

2012-05-21 Thread Steve Crawford
On 05/20/2012 07:45 AM, Aaron Burnett wrote: Hey Steve, Just wanted to send a note of thanks for pointing me in a few new directions on this. Turns out that the query would swap but not all the time. When it swapped, it wouldn't finish, if it didn't swap it would finish in the expected time. No

Re: [GENERAL] Global Named Prepared Statements

2012-05-21 Thread Cédric Villemain
Le lundi 21 mai 2012 16:08:27, Merlin Moncure a écrit : > On Mon, May 21, 2012 at 8:55 AM, Samba wrote: > > If Stored Procedures are equivalent to prepared statements [ as far as > > preparing the query plan is concerned], then what i'm looking for is > > perhaps a Global Prepared Statements at th

Re: [GENERAL] help understanding the bitmap heap scan costs

2012-05-21 Thread Cédric Villemain
Le lundi 21 mai 2012 15:35:55, Luca Ferrari a écrit : > Hi all, > I don't fully understand how is the cost of a bitmap heap scan > computed. For instance when the explain output node is similar to the > following: > > Bitmap Heap Scan on test (cost=17376.49..48595.93 rows=566707 width=6) >Re

Re: [GENERAL] Libpq question

2012-05-21 Thread John Townsend
On 5/21/2012 7:56 AM, Merlin Moncure wrote: On Sun, May 20, 2012 at 2:52 PM, John Townsend wrote: By by-passing the "dll" (or "so" on Linux) library I mean you write function or procedure calls to the server that is running as a service on Windows. You don't use the library with its 160 export

[GENERAL] help understanding the bitmap heap scan costs

2012-05-21 Thread Luca Ferrari
Hi all, I don't fully understand how is the cost of a bitmap heap scan computed. For instance when the explain output node is similar to the following: Bitmap Heap Scan on test (cost=17376.49..48595.93 rows=566707 width=6) Recheck Cond: ((text1 = 'A'::text) OR (text1 = 'C'::text)) Filter:

Re: [GENERAL] Libpq question

2012-05-21 Thread Tom Lane
Jasen Betts writes: > On 2012-05-16, John Townsend wrote: >> *** So...the question: Is there a good reason why you might want to NOT >> use libpq.dll, and just directly access the server through direct >> function calls? *** > libpq binds you to using NUL terminated C strings, and, no doubt, o

Re: [GENERAL] Global Named Prepared Statements

2012-05-21 Thread Merlin Moncure
On Mon, May 21, 2012 at 8:55 AM, Samba wrote: > If Stored Procedures are equivalent to prepared statements [ as far as > preparing the query plan is concerned], then what i'm looking for is perhaps > a Global Prepared Statements at the client/driver side. > > Specifically, It wold be good if the J

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Tom Lane
Vincas Dargis writes: > Database created using: > initdb -D ../data -E utf-8 -U postgres That looks fairly dangerous, as it will absorb the database's locale settings (particularly LC_CTYPE, which is what you care about for these operations) from your shell environment. If the environment locale

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Vincas Dargis
I've forgot to mention I'm working on Windows XP SP3 Yes, we are using UTF8 encoding and regexp works wrong. It looks like you replicated that. 2012/5/21 Albe Laurenz : > > I tried it with 9.1.3 on Linux: > > upper() and lower() works fine, no matter what the > database encoding is: > > test=> SE

Re: [GENERAL] Global Named Prepared Statements

2012-05-21 Thread Samba
If Stored Procedures are equivalent to prepared statements [ as far as preparing the query plan is concerned], then what i'm looking for is perhaps a Global Prepared Statements at the client/driver side. Specifically, It wold be good if the JDBC driver prepares all the queries for invoking stored

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Albe Laurenz
Vincas Dargis wrote: > We have problems (currently using 8.4, but also in latest 9.1.3) in > our application with Unicode word symbols in Lithuanian ('ąčęėįšųūž'), > Russian and of course potentially other languages. > > For example, regex_replace('acząčž', E'\\W', '', 'g') removes ąčž. > > lower

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Vincas Dargis
Sorry I have to write "manual" replay since I've messed up mailing list settings (got "Partial Digest"...). John R Pierce wrote: > your database encoding is UTF8 ? the language or environment you're using to > generate those strings such as 'acząčž' is also UTF8 ? Database created using: initdb

[GENERAL]

2012-05-21 Thread Vincas Dargis
Sorry I have to write "manual" replay since I've messed up mailing list settings (got "Partial Digest"...). John R Pierce wrote: > your database encoding is UTF8 ? the language or environment you're using to > generate those strings such as 'acząčž' is also UTF8 ? Database created using: initdb

Re: [GENERAL] Libpq question

2012-05-21 Thread Merlin Moncure
On Sun, May 20, 2012 at 2:52 PM, John Townsend wrote: > By by-passing the "dll" (or "so" on Linux) library I mean you write function > or procedure calls to the server that is running as a service on Windows. > You don't use the library with its 160 exported functions. You connect > directly to th

Re: [GENERAL] Libpq question

2012-05-21 Thread Chris Angelico
On Mon, May 21, 2012 at 9:05 PM, John Townsend wrote: > I downloaded PIKE. The "PostgreSQL direct network module for Pike", > pgsql.pike (and the other modules), shows how it was done. > > Many thanks for the tip. I rarely step out of Delphi, so I was unaware of > the power and versatility of Pike

Re: [GENERAL] Libpq question

2012-05-21 Thread John Townsend
In that case, yes, there are such implementations around. Martijn mentioned a few, and I mentioned the Pike one, all of which do indeed bypass libpq and talk directly to the server. It is, as I understand it, an open and stable protocol, so it's no different from writing a program that connects to

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Andrew Sullivan
On Mon, May 21, 2012 at 02:44:45AM -0700, John R Pierce wrote: > support the bastardized UTF-16 'unicode' implemented by Windows NT To be fair to Microsoft, while the BOM might be an irritant, they do use a perfectly legitimate encoding of Unicode. There is no Unicode requirement that code points

Re: [GENERAL] Libpq question

2012-05-21 Thread Jasen Betts
On 2012-05-16, John Townsend wrote: > *** So...the question: Is there a good reason why you might want to NOT > use libpq.dll, and just directly access the server through direct > function calls? *** libpq binds you to using NUL terminated C strings, and, no doubt, other C idioms. if you do it

Re: [GENERAL] varchar for loops possible?

2012-05-21 Thread Jasen Betts
On 2012-05-18, J.V. wrote: > I have a table with a varchar column. > > I want to select the distinct values from this column and loop through > them (using as a variable) in a raise notice statement and also in an > update statement. > > I have not been able to do this trying over 100 things in

Re: [GENERAL] odd intermittent query hanging issue

2012-05-21 Thread Albe Laurenz
Aaron Burnett wrote: >>> I run a handful of queries overnight when traffic is at it's lowest on our >>> system. One particular query will run perfectly fine (around 5 seconds0) >>> for several weeks, then suddenly decide to hang indefinitely and never >>> finish. It needs to be killed manually afte

Re: [GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread John R Pierce
On 05/21/12 2:09 AM, Vincas Dargis wrote: We have problems (currently using 8.4, but also in latest 9.1.3) in our application with Unicode word symbols in Lithuanian ('ąčęėįšųūž'), Russian and of course potentially other languages. For example, regex_replace('acząčž', E'\\W', '', 'g') removes ąč

[GENERAL] Concerning about Unicode-aware string handling

2012-05-21 Thread Vincas Dargis
Hello, We have problems (currently using 8.4, but also in latest 9.1.3) in our application with Unicode word symbols in Lithuanian ('ąčęėįšųūž'), Russian and of course potentially other languages. For example, regex_replace('acząčž', E'\\W', '', 'g') removes ąčž. lower() and ~* comparison works

Re: [GENERAL] Postgresql segmentation fault at slot_deform_tuple

2012-05-21 Thread Craig Ringer
On 05/14/2012 12:12 PM, Pham Ngoc Hai wrote: I'm running PostgreSQL 9.1.3 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3), 64-bit on CentOS release 6.2 (Final) Recently we encountered postmaster segfault, what the core dump gives me is: Did you ever see any