Re: [GENERAL] Question about load balance

2012-06-11 Thread Clemens Eisserer
Hi, > I think I'm trying to learn information what is the technique for managing > large databases > not to philosophize what was my server. In this case it starts to get very specific about what you are trying to accomplish. Transactional databases offer a lot guarantees, which makes it hard to

Re: [GENERAL] Question about load balance

2012-06-11 Thread Tatsuo Ishii
> My question was how stable is pgpool, what problems I can > expect, and pure curiosity what is the technique for managing large > databases. > CPU and memory to the second coming or are there other techniques for > scattering > applications on other servers. > > > --- cut --- > > I think I'm

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 22:47, John R Pierce wrote: On 06/11/12 12:17 PM, Condor wrote: May be because some times when some one start a new business does not have 20k $ for a new server and resource of the server is enough for the moment and as I planed is enough for this year. and when you start a ne

Re: [GENERAL] Segmentation Fault

2012-06-11 Thread Benson Jin
Hi All, A silly question how do I get install external symbols for postgresql, if compiled it myself previously? Do I recompile it with --enable-debug option? Cheers, Benson - Original Message - From: "Craig Ringer" To: "Benson Jin" Cc: pgsql-general@postgresql.org Sen

Re: [GENERAL] Run external SQL file via Perl dbh

2012-06-11 Thread Chris Travers
On Mon, Jun 11, 2012 at 7:37 PM, Greg Williamson wrote: > Toby -- > > A small point: > > <...> > As a brief note, the semicolon splitting issue was why we went with invoking psql via system(). We found that was vastly simpler than trying to handle all corner cases ourselves. Best Wishes, Chris T

Re: [GENERAL] Run external SQL file via Perl dbh

2012-06-11 Thread Greg Williamson
Toby -- A small point: <...> >How about something like > >use File::Slurp; >use Try::Tiny; > >try { >  $dbh->being_work; $dbh-begin_work; <...> Clarification for any who might be unfamiliar with the perl tools. Greg Williamson -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] Run external SQL file via Perl dbh

2012-06-11 Thread Toby Corkindale
On 10/06/12 08:29, David Williams wrote: Hi There, I'd like to be able to run the contents of an external SQL file from Perl. Something akin to: $dbh->do( '\i /home/david/run_me.sql' ); However this fails, and I assume that is because the \i is a client command. Is there a way to run

Re: [GENERAL] ctid ranges

2012-06-11 Thread Jeff Davis
On Fri, 2012-06-08 at 22:27 +0100, Thomas Munro wrote: > This is slow, handled with a seq scan (as are various rephrasing with > <, <=, etc): > > SELECT ... FROM ... WHERE ctid BETWEEN ... AND ...; > > Is there a way to retrieve the rows in a physical range quickly? Interesting idea. However, as

Re: [GENERAL] Extension table data

2012-06-11 Thread Keith Fiske
Along with Chris, the need for having tables defined in the extension is about keeping control of the table structure so the extension functions are guaranteed to work as intended and to make upgrading versions easier. As an example, the fact that I can specifically name constraints makes it easier

Re: [GENERAL] Counting # of consecutive rows with specified value(s)?

2012-06-11 Thread Ken Tanzer
Thank you both for the suggestions. I started playing with the window functions, but found and copied an "islands and gaps" example that didn't need them, and was simpler than I thought. This query seems to do the trick: SELECT client_id, count(*) FROM (SELECT client_id, attendance

Re: [GENERAL] Question about load balance

2012-06-11 Thread Chris Angelico
On Tue, Jun 12, 2012 at 5:17 AM, Condor wrote: > On 2012-06-11 21:03, John R Pierce wrote: >> >> On 06/11/12 2:11 AM, Condor wrote: >>> >>> Yes, I now but these parameters can't be increase forever. It's can but >>> isn't cheep. >>> For that reason I looking some other ways. >> >> why don't you wo

Re: [GENERAL] Question about load balance

2012-06-11 Thread John R Pierce
On 06/11/12 12:17 PM, Condor wrote: May be because some times when some one start a new business does not have 20k $ for a new server and resource of the server is enough for the moment and as I planed is enough for this year. and when you start a new business, you don't lease a campus large

[GENERAL] parsing the SQLERRM string

2012-06-11 Thread david.sahagian
(version == 9.1) In my PL/pgSQL stored functions, I want to be able to distinguish which FK constraint caused the [foreign_key_violation] exception. . . . BEGIN delete from MY_COOL_TABLE where id = 123 ; EXCEPTION WHEN foreign_key_violation THEN CASE WHEN (SQLERRM tell

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 21:03, John R Pierce wrote: On 06/11/12 2:11 AM, Condor wrote: Yes, I now but these parameters can't be increase forever. It's can but isn't cheep. For that reason I looking some other ways. why don't you worry about that when you get there, rather than before you even start?

Re: [GENERAL] Question about load balance

2012-06-11 Thread John R Pierce
On 06/11/12 2:11 AM, Condor wrote: Yes, I now but these parameters can't be increase forever. It's can but isn't cheep. For that reason I looking some other ways. why don't you worry about that when you get there, rather than before you even start? I've got a 2U dual xeon X5660 server w/ 4

Re: [GENERAL] Segmentation Fault

2012-06-11 Thread Benson Jin
I will try produce one and submit to here. - Original Message - From: "Craig Ringer" To: "Benson Jin" Cc: pgsql-general@postgresql.org Sent: Monday, June 11, 2012 3:49:41 AM Subject: Re: [GENERAL] Segmentation Fault On 06/11/2012 11:34 AM, Benson Jin wrote: Hi All, We are

Re: [GENERAL] Segmentation Fault

2012-06-11 Thread Dickson S. Guedes
2012/6/11 Benson Jin : > Hi All, > > We are having a problem with our streaming replication read only node. It > has crashed a few times with a couple of different reasons, mostly > "segmentation fault". The latest log are listed below: > > 2012-05-30 23:56:37.385 UTC::: LOG:  server process (PID 1

Re: [GENERAL] import *.backup-file (PostGIS - not mine)

2012-06-11 Thread Stefan Tzeggai
Am 11.06.2012 14:43, schrieb Alban Hertroys: > On 11 June 2012 10:42, gipsy-king1 wrote: >> I have to import and watch/edit data stored in an .backup-file. This is a >> backup-file, stored by an other firm. >> Can you tell me what I have to do? > Is that a Postgres dump? If so, is it a plain text

Re: [GENERAL] Postgres Installation Password

2012-06-11 Thread Thomas Kellerer
Magruder, Ryan S. wrote on 11.06.2012 16:55: When attempting to download and install Postgres on my computer for work, it prompted me to create a password. Upon trying many different combinations I could not get one to work. An error message stated that the password I entered did not meet the con

Re: [GENERAL] dblink.sql not found

2012-06-11 Thread Clodoaldo Neto
2012/6/11 Vibhor Kumar > > On Jun 11, 2012, at 11:17 AM, Clodoaldo Neto wrote: > > > I have postgresql91-contrib installed in Centos 6: > > > > # yum list installed postgresql91-contrib > > ... > > Installed Packages > > postgresql91-contrib.x86_64 9.1.4-1PGDG.rhel6 @pgdg91 > > > > But when I try

Re: [GENERAL] dblink.sql not found

2012-06-11 Thread Vibhor Kumar
On Jun 11, 2012, at 11:17 AM, Clodoaldo Neto wrote: > I have postgresql91-contrib installed in Centos 6: > > # yum list installed postgresql91-contrib > ... > Installed Packages > postgresql91-contrib.x86_64 9.1.4-1PGDG.rhel6 @pgdg91 > > But when I try to use it I get the error: > > ERROR: fu

[GENERAL] dblink.sql not found

2012-06-11 Thread Clodoaldo Neto
I have postgresql91-contrib installed in Centos 6: # yum list installed postgresql91-contrib ... Installed Packages postgresql91-contrib.x86_64 9.1.4-1PGDG.rhel6 @pgdg91 But when I try to use it I get the error: ERROR: function dblink(text, text) does not exist LINE 2: from dblink(

[GENERAL] Postgres Installation Password

2012-06-11 Thread Magruder, Ryan S.
When attempting to download and install Postgres on my computer for work, it prompted me to create a password. Upon trying many different combinations I could not get one to work. An error message stated that the password I entered did not meet the constraints. Is there a guide to creating a pa

Re: [GENERAL] import *.backup-file (PostGIS - not mine)

2012-06-11 Thread Alban Hertroys
On 11 June 2012 10:42, gipsy-king1 wrote: > I have to import and watch/edit data stored in an .backup-file. This is a > backup-file, stored by an other firm. > Can you tell me what I have to do? Is that a Postgres dump? If so, is it a plain text dump, a compressed dump or a custom format dump?

Re: [GENERAL] Postgres 9.2 beta2 one-click installer on windows

2012-06-11 Thread Marc Watson
De : Craig Ringer [mailto:ring...@ringerc.id.au] Envoyé : June-09-12 3:50 AM (CCing Dave Page & Sachin Srivastava who work on the installer): Short version is that the Pg installer appears to need to: - Include the latest release of the redist because there's a security fix in it - use /passi

[GENERAL] import *.backup-file (PostGIS - not mine)

2012-06-11 Thread gipsy-king1
Dear all I have to import and watch/edit data stored in an .backup-file. This is a backup-file, stored by an other firm. My problem is, I am new at Postgres and it is the first time I have to work with PostGIS-data. I installed pgAdminIII and tryed to import it with this program. But it will not

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 10:23, John R Pierce wrote: On 06/11/12 12:11 AM, Condor wrote: I seek advice if the server load is too much what I could do to it landed. I recommend a faster server for this. more CPU cores, more memory, faster storage. that will take you a LONG ways, much simpler than compl

Re: [GENERAL] Segmentation Fault

2012-06-11 Thread Craig Ringer
On 06/11/2012 11:34 AM, Benson Jin wrote: Hi All, We are having a problem with our streaming replication read only node. It has crashed a few times with a couple of different reasons, mostly "segmentation fault". Any chance of examining a core dump and getting a stack trace? http://wiki.pos

Re: [GENERAL] Question about load balance

2012-06-11 Thread John R Pierce
On 06/11/12 12:11 AM, Condor wrote: I seek advice if the server load is too much what I could do to it landed. I recommend a faster server for this. more CPU cores, more memory, faster storage. that will take you a LONG ways, much simpler than complex and fragile database cluster schemes

Re: [GENERAL] Question about load balance

2012-06-11 Thread Condor
On 2012-06-11 09:35, John R Pierce wrote: On 06/10/12 11:26 PM, Condor wrote: Im not sure, just looking how to make load balance. I have a small database around 20 gb, but I expect to join another database on different scheme and Im looking for solution about load balance or some cache mechanis