Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Mel Llaguno
Tom, Thanks for the response. I've been doing a lot of performance tuning for our customers and I've found that wiki link a life saver ;-) I'm trying to come up with a precise way to calculate the shmget() value which postgresql uses in the pgctl.log message when the kernel.shmmax is set too lo

Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Tom Lane
Mel Llaguno writes: > Thanks for your reply. I agree with your statement that you should set the > configuration parameters first, but I would like to be able to calculate the > SHMMAX value based on those parameters. This is particularly useful when > suggesting postgresql.conf optimizations t

Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Mel Llaguno
Pavan, Thanks. I'll have a look at the source code. M. From: Pavan Deolasee [pavan.deola...@gmail.com] Sent: Wednesday, February 06, 2013 10:41 PM To: Mel Llaguno Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] PostgreSQL's share_buffer calculation usi

Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Pavan Deolasee
On Thu, Feb 7, 2013 at 11:01 AM, Mel Llaguno wrote: > Having to guess this value is far from ideal; what I'd like is the formula > used by postgresql that generates the shmget() value displayed in the > pgctl.log. > There is no easy way or at least none that I'm aware of, to get the exact value

Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Mel Llaguno
Pavan, Thanks for your reply. I agree with your statement that you should set the configuration parameters first, but I would like to be able to calculate the SHMMAX value based on those parameters. This is particularly useful when suggesting postgresql.conf optimizations to our customers whose

Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Pavan Deolasee
On Thu, Feb 7, 2013 at 6:28 AM, Mel Llaguno wrote: > All, > > I'm wondering about how postgresql calculates the value for shared buffers > as I see some discrepancies with what the following script provides versus > what is recommended in the pgctl.log when the database fails to start. > > #!/bin/

[ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-06 Thread Mel Llaguno
All, I'm wondering about how postgresql calculates the value for shared buffers as I see some discrepancies with what the following script provides versus what is recommended in the pgctl.log when the database fails to start. #!/bin/bash # simple shmsetup script page_size=`getconf PAGE_SIZE` ph

Re: [ADMIN] Facing authentication error on postgres 9.2 -> dblink functions

2013-02-06 Thread Dev Kumkar
Checked further netstat and could see following lines: TCP0.0.0.0:5432 0.0.0.0:0 LISTENING Then checked from remote machine 'telnet' to target database machine and could see connection failing, looking further port was blocked and unblocking port resolved this. Queries

Re: [ADMIN] Facing authentication error on postgres 9.2 -> dblink functions

2013-02-06 Thread Dev Kumkar
Hey went ahead and tried to query across machines and facing following error: SELECT * FROM dblink_connect('host=x.x.x.x port=5432 dbname=postgres user=postgres password=test') could not connect to server: Connection timed out (0x274C/10060) Is the server running on host "x.y.z.com" (x.x.

Re: [ADMIN] Facing authentication error on postgres 9.2 -> dblink functions

2013-02-06 Thread Dev Kumkar
Great.. thanks a lot Laurenz Albe! Works perfect !! Regards - Dev On Wed, Feb 6, 2013 at 7:00 PM, Albe Laurenz wrote: > Dev Kumkar wrote: > > I am using postgres 9.2 and when executing function dblink facing a > fatal error while trying to > > execute dblink_connect as follows: > > > > SELE

[ADMIN] Re: [HACKERS] Facing authentication error on postgres 9.2 -> dblink functions

2013-02-06 Thread Andrew Dunstan
On 02/06/2013 08:09 AM, Dev Kumkar wrote: Hello Everyone, I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows: /SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')/ *ERROR*: co

Re: [ADMIN] Facing authentication error on postgres 9.2 -> dblink functions

2013-02-06 Thread Albe Laurenz
Dev Kumkar wrote: > I am using postgres 9.2 and when executing function dblink facing a fatal > error while trying to > execute dblink_connect as follows: > > SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres > password=test') > > ERROR: could not establish connecti

[ADMIN] Facing authentication error on postgres 9.2 -> dblink functions

2013-02-06 Thread Dev Kumkar
Hello Everyone, I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows: * SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')* *ERROR*: could not establish connection DETAIL: FATA

Re: [ADMIN] diskspace

2013-02-06 Thread Geoff Winkless
On 6 February 2013 11:12, Geoff Winkless wrote: > On 6 February 2013 11:04, Albe Laurenz wrote: > >> Have you tried using pg_filedump >> (http://pgfoundry.org/frs/?group_id=1000541) >> to dump a page or two of your table and figure >> out what is where and where the space went? >> > > I haven't;

Re: [ADMIN] diskspace

2013-02-06 Thread Geoff Winkless
On 6 February 2013 11:04, Albe Laurenz wrote: > I doubt that PostgreSQL has substantially more disk overhead > than other DBMS with comparable capabilities (comparison with > flat files or MyISAM would be unfair). > You're right, of course; the same data on InnoDB works out if anything slightly

Re: [ADMIN] diskspace

2013-02-06 Thread Albe Laurenz
Geoff Winkless wrote: [trying to account for the disk space used] > Of course I got that slightly wrong: ItemIdData is for each row, not for each > column; an extra 4 bytes > for each row makes the per-row space 290MB, leaving 167MB unexplained. > I'm assuming the remaining 167MB is related to th

Re: [ADMIN] diskspace

2013-02-06 Thread Geoff Winkless
On 5 February 2013 20:33, Geoff Winkless wrote: > http://www.postgresql.org/docs/9.2/static/storage-page-layout.html gives > detail... > > Let's say around 249MB (23 bytes per row, according to that page) for the > columns you mention, so that leaves 234MB unexplained. > > I can see 44 bytes per