Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Craig Ringer
On 22/06/11 10:00, Greg Smith wrote: > On 06/21/2011 10:00 AM, Vick Khera wrote: >> Postgres has nothing quite like the MySQL cluster mode with NDB. You >> will have to re-think your solution if you want to use postgres to >> distribute your queries and data across multiple servers. >> > > The

Re: [GENERAL] LISTEN filtering

2011-06-21 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Tom wrote: > This seems like a pretty bad idea from a security policy standpoint, > in that it would encourage use of superuser state to run ordinary > applications. Yeah, I think the "only from same user" is much better in retrospect. > Anyo

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Rob Sargent
Tom Lane wrote: Rob Sargent writes: The tail of config.log follows. As I confessed, libreadline had to be simlinked into /usr/lib64, then I hit libz (as this log shows) and started to doubt myself (even more). configure:8316: checking for library containing readline configure:8

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Greg Smith
On 06/21/2011 10:00 AM, Vick Khera wrote: Postgres has nothing quite like the MySQL cluster mode with NDB. You will have to re-think your solution if you want to use postgres to distribute your queries and data across multiple servers. The closest thing to a NDB cluster in PostgreSQL is usi

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Tom Lane
Rob Sargent writes: > The tail of config.log follows. As I confessed, libreadline had to be > simlinked into /usr/lib64, then I hit libz (as this log shows) and > started to doubt myself (even more). > configure:8316: checking for library containing readline > configure:8358: gcc -o conftest -O2

Re: [GENERAL] pipe text to copy statement stdin input

2011-06-21 Thread Scott Frankel
John, Michael, Thanks for the thorough tips. Worked perfectly! The .pgpass file is quite useful. Could've saved myself a lot of typing the past few years! Note that since I already prepared a CSV formated file for the COPY statement, once I created the .pgpass file, I opted for Michael'

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Craig Ringer
On 06/21/2011 01:25 PM, David Fetter wrote: Dynamically generated tables are generally a problem at the design level. Neither PostgreSQL nor any other engine will solve that. It depends a bit on what the OP means by dynamically generated tables. I'm not entirely sure what you mean by a "clu

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Rob Sargent
On 06/21/2011 06:49 PM, Tom Lane wrote: > Rob Sargent writes: >> Seems to me a lot of the needed standard libraries are in '/lib64' and >> the linker isn't looking for them there? So far I've hit libreadline >> and libz. Do I just keep making the sim-links into /usr/lib64? > > Most of the req

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Tom Lane
Rob Sargent writes: > Seems to me a lot of the needed standard libraries are in '/lib64' and > the linker isn't looking for them there? So far I've hit libreadline > and libz. Do I just keep making the sim-links into /usr/lib64? Most of the required libraries are in /lib64 on my Fedora box, too

[GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Rob Sargent
Seems to me a lot of the needed standard libraries are in '/lib64' and the linker isn't looking for them there? So far I've hit libreadline and libz. Do I just keep making the sim-links into /usr/lib64? postgres 9.0.3 on 11.2 worked like a champ. Unforturnately I've upgraded my os, thought I wo

Re: [GENERAL] abusing session_replication_mode

2011-06-21 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > To emulate this logic in a PostgreSQL trigger, I think I can define > a security definer trigger function created by the database > superuser with session_replication_mode set for the function to > 'replica'. It's a lie, but it seems like it

[GENERAL] abusing session_replication_mode

2011-06-21 Thread Kevin Grittner
We're in the process of converting our triggers from a custom framework where they ran in Java just above the database into native PostgreSQL triggers. We've run into an issue in testing, and I think I see a workable solution. It seems like a bit of a hack, but it looks like it will work, and I c

Re: [GENERAL] Streaming replication and temp table operations

2011-06-21 Thread Scott Marlowe
On Tue, Jun 21, 2011 at 2:15 PM, Joel Stevenson wrote: > Hi all, > > Does anyone know if temp tables and the operations on them (like inserting or > copying to) are replicated from master to standby servers via the new PG WAL > shipping replication?  Given that temp tables are only accessible pe

[GENERAL] Streaming replication and temp table operations

2011-06-21 Thread Joel Stevenson
Hi all, Does anyone know if temp tables and the operations on them (like inserting or copying to) are replicated from master to standby servers via the new PG WAL shipping replication? Given that temp tables are only accessible per-session it would seem unnecessary but if the shipping is happe

Re: [GENERAL] Tuning for a tiny database

2011-06-21 Thread Greg Smith
On 06/21/2011 01:49 AM, CSS wrote: Some raw numbers: We're only looking at a total of about six tables in one db. In total there are going to be well under 10,000 records in ALL tables. That might increase to at most 100,000 in the next few years. Our raw DNS queries/second tops out around 50 q

Re: [GENERAL] pipe text to copy statement stdin input

2011-06-21 Thread Michael Glaesemann
On Jun 21, 2011, at 15:43, Scott Frankel wrote: > Is there a way to pipe text into a COPY statement's stdin input using > cmd-line psql? cat myfile | psql -c "COPY mytable (name, description, text) FROM stdin" > - The db is password protected, so invoking `psql` as a non-interactive > command

Re: [GENERAL] pipe text to copy statement stdin input

2011-06-21 Thread John R Pierce
On 06/21/11 12:43 PM, Scott Frankel wrote: Hi all, Is there a way to pipe text into a COPY statement's stdin input using cmd-line psql? I'm using the following syntax to enter large strings of text into a table. The text itself has a json-like syntax that has the potential for carrying nu

Re: [GENERAL] Tuning for a tiny database

2011-06-21 Thread Vincent Veyron
Le mardi 21 juin 2011 à 01:49 -0400, CSS a écrit : > I couldn't find much information in the archives on this -- perhaps this > is a bit of a specialized need, but I was hoping for some input from > some experienced postgres admins. > Hi, I am not an experienced postgres admin, but I am an exper

[GENERAL] pipe text to copy statement stdin input

2011-06-21 Thread Scott Frankel
Hi all, Is there a way to pipe text into a COPY statement's stdin input using cmd-line psql? I'm using the following syntax to enter large strings of text into a table. The text itself has a json-like syntax that has the potential for carrying numerous special characters. COPY

Re: [GENERAL] Partitioning and constraint exclusion

2011-06-21 Thread Sylvain Rabot
On Tue, 2011-06-21 at 12:25 -0400, Tom Lane wrote: > Sylvain Rabot writes: > > On Postgres 9.1beta2 when i run this code the first select will use > > contraint exclusion but the second will not. > > This apparently has something to do with the size of the array > > returned by the fake immutable

Re: [GENERAL] LISTEN filtering

2011-06-21 Thread Merlin Moncure
On Tue, Jun 21, 2011 at 10:58 AM, Greg Sabino Mullane wrote: > Quick idea to toss out there: allowing an option to LISTEN to > only 'hear' from superusers (or self). I've got an app that uses a lot > of listen/notify to talk to other subprocesses. However, it > would be nice if non-superusers coul

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-21 Thread Cédric Villemain
2011/6/21 Lincoln Yeoh : > At 04:13 AM 6/20/2011, Alexander Farber wrote: >> >> why add a begin/commit if I only >> have SELECT statements >> there (in the default mode) and >> the data isn't critical to me >> (just some player statistics and >> notes by other players - i.e. >> a statistic or note

Re: [GENERAL] Partitioning and constraint exclusion

2011-06-21 Thread Tom Lane
Sylvain Rabot writes: > On Postgres 9.1beta2 when i run this code the first select will use > contraint exclusion but the second will not. > This apparently has something to do with the size of the array > returned by the fake immutable function. See predtest.c: /* * Proof attempts involving la

Re: [GENERAL] LISTEN filtering

2011-06-21 Thread Tom Lane
"Greg Sabino Mullane" writes: > Quick idea to toss out there: allowing an option to LISTEN to > only 'hear' from superusers (or self). This seems like a pretty bad idea from a security policy standpoint, in that it would encourage use of superuser state to run ordinary applications. > I've got

[GENERAL] Partitioning and constraint exclusion

2011-06-21 Thread Sylvain Rabot
Hi list, I'm trying to do some partitioning on a table but I have a problem with constraint exclusion. Here the following code : https://gist.github.com/1038133 (this code is just an example to explain the problem) As you can see I declare a fake immutable function in order to make constraint e

[GENERAL] LISTEN filtering

2011-06-21 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Quick idea to toss out there: allowing an option to LISTEN to only 'hear' from superusers (or self). I've got an app that uses a lot of listen/notify to talk to other subprocesses. However, it would be nice if non-superusers could not affect

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-21 Thread Lincoln Yeoh
At 04:13 AM 6/20/2011, Alexander Farber wrote: why add a begin/commit if I only have SELECT statements there (in the default mode) and the data isn't critical to me (just some player statistics and notes by other players - i.e. a statistic or note is ok to be lost occasionally)? If you're not i

Re: [GENERAL] PostgreSQL 9.1 / Collations / case insensitive german sort order

2011-06-21 Thread Tom Lane
BGoebel writes: > I'm looking for a solution for managing case insensitive german charsets. > I know this is an really "evergreen": Müller=MUELLER, like "Straße%", ... > After studying the archive, i have not found a really simple solution. > Using functions / functional indices is not what i'm

Re: [GENERAL] Call procedure from a Job, Test a Job in pgAdmin?

2011-06-21 Thread Leon Match
The job has to pick up a record with the status 'Waiting', and insert it in another table (test table by now). Later, I will need to send data to another database, using db link. requests_curr_req() code is as follows: CREATE OR REPLACE FUNCTION requests_curr_req() RETURNS void AS $BODY$

Re: [GENERAL] Call procedure from a Job, Test a Job in pgAdmin?

2011-06-21 Thread David Johnston
What's a Job? SELECT function() is the simpliest way to way to call a function. What does "requests_curr_req()" do? EXECUTE function() will "work" depending upon what function does. So, what do you mean "nothing worked"? Errors, zero results (but no failure), what? You may want

Re: [GENERAL] 2 questions re RAID

2011-06-21 Thread Scott Ribe
On Jun 21, 2011, at 7:49 AM, Vick Khera wrote: > Ok...there is *one* advantage: > you can lose any two drives at the same time and still survive, with > RAID-10 if you lose the wrong two drives you're hosed. Exactly. The performance advantage of RAID-10 over RAID-6 in this sever is, I think, not

Re: [GENERAL] Help needed with PostgreSQL clustering/switching from MySQL

2011-06-21 Thread Vick Khera
On Tue, Jun 21, 2011 at 1:07 AM, Vikram Vaswani wrote: > So my first question is, I'd like to know if PostgreSQL has similar issues > when running in a clustered scenario. > Postgres has nothing quite like the MySQL cluster mode with NDB. You will have to re-think your solution if you want to us

[GENERAL] Call procedure from a Job, Test a Job in pgAdmin?

2011-06-21 Thread Leon Match
Hello, Could you please advise on how to call a Procedure (Function) from a Job? I have created a Job with one step, and a scheduler. The Job is suppose to run every minute, and call a procedure (function). I tried different scenarios in a Step Definition: requests_curr_req(); SEL

Re: [GENERAL] 2 questions re RAID

2011-06-21 Thread Vick Khera
On Fri, Jun 17, 2011 at 1:35 PM, Scott Ribe wrote: > RAID-1 & RAID-10 are not ruled out, I'm just exploring options. And I'm not > actually wanting to use RAID 5; it's RAID 6 that I'm considering... You have 4 disk bays and you want RAID-6? How will that improve anything over RAID-10? You will

Re: [GENERAL] 2 questions re RAID

2011-06-21 Thread Vick Khera
On Fri, Jun 17, 2011 at 1:20 PM, Scott Marlowe wrote: > Pluses for the Arecas I've used: > Out Of Band monitoring.  Heck, I've updated the firmware on them from > 1000 miles away. > fast in RAID-10.  Lots of HW controllers (I'm looking at you, LSI) > perform poorly with layered RAID. > They all us

Re: [GENERAL] getting postgres server on freebsd startup?

2011-06-21 Thread Vick Khera
On Thu, Jun 16, 2011 at 1:29 PM, Jeff Hamann wrote: > Please don't respond with "Why don't you just use the ports collection?" > There's reasons - like: 1) need to build from source, 3) it's for a > tutorial, and 3) postgresql90-server isn't building. 1) ports do build from source. packages are p

Re: [GENERAL] insert a SYSTIMESTAMP value in postgres

2011-06-21 Thread Leon Match
Thanks a lot for your help! The correct sentence to my solution is this: insert into request_queue (request_id, received_time ) values (new.request_id, LOCALTIMESTAMP ); Regards, Leon -Original Message- From: Osvaldo Ku

[GENERAL] Limited number of simultaneous connections on Windows

2011-06-21 Thread Pawel Kukawski
Hello, I have recently read about limited number of simultaneous connections on Windows when postgres is running as a service. Link is available here: http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows#I_cannot_run_with_more_than_about_125_connections_at_once.2C_de

[GENERAL] PostgreSQL 9.1 / Collations / case insensitive german sort order

2011-06-21 Thread BGoebel
Hi, I'm looking for a solution for managing case insensitive german charsets. I know this is an really "evergreen": Müller=MUELLER, like "Straße%", ... After studying the archive, i have not found a really simple solution. Using functions / functional indices is not what i'm looking for, I have t