Re: [GENERAL] Shared Buffer Size

2011-05-28 Thread Carl von Clausewitz
Hi Preetika, a few months ago, when I installed my first PostgreSQL, I have had the same problem. I've try to get any information about optimal memory config, and working, but there wasn't any "optimal memory setting calculator" on the internet, just some guide in the posgre documentation ( http:/

Re: [GENERAL] Postgres questions

2011-05-28 Thread Trenta sis
Dbi link was configured with instruction form dbi-link. Where I can find this scripts: Can you connect to Cache from a stand-alone Perl script using Perl DBI? If so, can you connect to Cache from a PL/Perlu script using Perl DBI? Is MS-SQL performance OK when connecting from a stand-alone Perl sc

Re: [GENERAL] Postgres questions

2011-05-28 Thread Craig Ringer
On 05/28/2011 06:08 PM, Trenta sis wrote: Dbi link was configured with instruction form dbi-link. Where I can find this scripts: Write them. Queries in mssql are sql select from talbe on mssql with about 400.000 rows. Well, no wonder it's slow. As far as I know DBI-Link can't push predica

[GENERAL] Regular disk activity of an idle DBMS

2011-05-28 Thread Andrej Podzimek
Hello, after configuring a new home server with PostgreSQL 9.0.4, I observe some regular disk activity, even though the server is completely idle (disconnected from the network, no users but one logged in). There are very short write bursts once in about 3 seconds. This does not affect perform

[GENERAL] How to check a table content efficiently? With LIMIT and OFFSET?

2011-05-28 Thread Stefan Keller
Hi, I’d like to monitor a table in a read-only Postgres database by writing a PL/pgSQL function. The database gets periodically overwritten by a mirroring loading process. The success criteria is, that the table contains at least some records (actually at least more than 10). The first idea w

Re: [GENERAL] Shared Buffer Size

2011-05-28 Thread preetika tyagi
Hi Carl, Thank you for your response, however, I am trying to understand the role of shared_buffer. I notice you have increased this value in your settings. I am just trying to understand the meaning of this statement- "PostgreSQL depends on the OS for caching. ( http://www.varlena.com/GeneralBit

Re: [GENERAL] How to check a table content efficiently? With LIMIT and OFFSET?

2011-05-28 Thread Stefan Keller
Hi, That's my solution candidate: CREATE OR REPLACE FUNCTION isnotempty() RETURNS boolean AS ' SELECT (count(*) = 1) FROM (SELECT osm_id FROM planet_osm_point LIMIT 1 OFFSET 10) tmp ' LANGUAGE SQL; Yours, Stefan 2011/5/28 Stefan Keller : > Hi, > > I’d like to monitor a table in a read-o

Re: [GENERAL] Shared Buffer Size

2011-05-28 Thread Greg Smith
On 05/28/2011 04:42 AM, Carl von Clausewitz wrote: I've try to get any information about optimal memory config, and working, but there wasn't any "optimal memory setting calculator" on the internet, just some guide in the posgre documentation There's a simple one at https://github.com/gregs11

Re: [GENERAL] Shared Buffer Size

2011-05-28 Thread Greg Smith
On 05/27/2011 05:33 PM, preetika tyagi wrote: Hows does the shared buffer in Postgres rely on the Operating System cache? Suppose my RAM is 8 GB and shared_buffer is 24 MB in postgres. And there are some dirty pages in shared_buffer and I need to write a dirty page back to the disk to bring in

Re: [GENERAL] How to check a table content efficiently? With LIMIT and OFFSET?

2011-05-28 Thread Craig Ringer
On 05/29/2011 05:45 AM, Stefan Keller wrote: Hi, That's my solution candidate: CREATE OR REPLACE FUNCTION isnotempty() RETURNS boolean AS ' SELECT (count(*) = 1) FROM (SELECT osm_id FROM planet_osm_point LIMIT 1 OFFSET 10) tmp ' LANGUAGE SQL; LIMIT and OFFSET are often no more effic

Re: [GENERAL] max_connections proposal

2011-05-28 Thread Greg Smith
On 05/25/2011 10:58 PM, Craig Ringer wrote: max_connections = 100 # (change requires restart) # WARNING: If you're about to increase max_connections above 100, you # should probably be using a connection pool instead. See: # http://wiki.postgresql.org/max_connections # # Not

Re: [GENERAL] max_connections proposal

2011-05-28 Thread Edison So
Can anyone tell me that if the max_connections is above 100, the server will use pooling instead? For all participants in this particular dsicuss, what is the reasonable value for max_connections without causing any harm to the Postgres 9.0 server. I am a nonvice Postgres user so any advice is al

Re: [GENERAL] Inspecting a DB - psql or system tables ?

2011-05-28 Thread Greg Smith
On 05/27/2011 01:24 PM, Andre Majorel wrote: While parsing the output of psql is cumbersome, accessing the system tables seems more likely to break whenever a new version of PostgreSQL comes out. I think you have this backwards. If there's a change in this area big enough to justify chang

Re: [GENERAL] SELECT COUNT(*) execution time on large tables (v9.0.4-1)

2011-05-28 Thread Greg Smith
On 05/27/2011 12:41 PM, Carlos Sotto Maior (SIM) wrote: I have browsed catalog tables, digging for a real time Row.count but so far did not find any. See http://wiki.postgresql.org/wiki/Slow_Counting which shows you where the one system count estimate is at, as well as suggesting links to

Re: [GENERAL] Regular disk activity of an idle DBMS

2011-05-28 Thread Greg Smith
On 05/28/2011 11:02 AM, Andrej Podzimek wrote: after configuring a new home server with PostgreSQL 9.0.4, I observe some regular disk activity, even though the server is completely idle (disconnected from the network, no users but one logged in). There are very short write bursts once in about

[GENERAL] timeouts on transactions etc?

2011-05-28 Thread Darren Duncan
Does Postgres have any mechanisms where one can set an activity timeout, say either dynamically thru SQL to affect a current session, or alternately in a configuration file so to take effect globally? I mean for example so we can tell Postgres to automatically abort/rollback a current statemen

Re: [GENERAL] timeouts on transactions etc?

2011-05-28 Thread Steve Atkins
On May 28, 2011, at 7:55 PM, Darren Duncan wrote: > Does Postgres have any mechanisms where one can set an activity timeout, say > either dynamically thru SQL to affect a current session, or alternately in a > configuration file so to take effect globally? > > I mean for example so we can tell

Re: [GENERAL] timeouts on transactions etc?

2011-05-28 Thread Darren Duncan
Thank you, Steve, That answers the part about statement times. But what about timeouts for transactions as a whole, ensuring that any transaction, once started, is ended one way or another within X time? -- Darren Duncan Steve Atkins wrote: On May 28, 2011, at 7:55 PM, Darren Duncan wrote:

Re: [GENERAL] Bidirectional replication

2011-05-28 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 >>> Yeah. One nasty property that async multi master solutions share is >>> that they change the definition of what 'COMMIT' means -- the database >>> can't guarantee the transaction is valid because not all the >>> supporting facts are necessa