Re: [GENERAL] How to check if Postgresql files are OK

2013-05-27 Thread Stephen Frost
Nikhil, * Nikhil G Daddikar (n...@celoxis.com) wrote: We use PostgreSQL 9 on our production server and I was wondering if there there is a way to know when pages get corrupted. It's not great, but there are a few options. First is to use pg_dump across the entire database and monitor the PG

Re: [GENERAL] [HACKERS] Trust intermediate CA for client certificates

2013-03-19 Thread Stephen Frost
Craig, * Craig Ringer (cr...@2ndquadrant.com) wrote: Yep, in most applications I've seen you usually store a list of authorized SubjectDNs or you just use your own self-signed root and issue certs from it. Even with a self-signed root issuing certs, you need to map the individual cert to a PG

Re: [GENERAL] [HACKERS] Trust intermediate CA for client certificates

2013-03-19 Thread Stephen Frost
* Craig Ringer (cr...@2ndquadrant.com) wrote: As far as I'm concerned that's the immediate problem fixed. It may be worth adding a warning on startup if we find non-self-signed certs in root.crt too, something like 'WARNING: Intermediate certificate found in root.crt. This does not do what you

Re: [GENERAL] [HACKERS] Trust intermediate CA for client certificates

2013-03-18 Thread Stephen Frost
Craig, all, * Craig Ringer (cr...@2ndquadrant.com) wrote: PROBLEM VERIFIED Let me just say ugh. I've long wondered why we have things set up in such a way that the whole chain has to be in one file, but it didn't occur to me that it'd actually end up causing this issue. In some ways, I really

Re: [GENERAL] [HACKERS] Trust intermediate CA for client certificates

2013-03-18 Thread Stephen Frost
Craig, * Craig Ringer (cr...@2ndquadrant.com) wrote: They are intermediary, but we're dealing with the case where trust and authorization are not the same thing. Trust stems from the trusted root in the SSL CA model, but that's a chain of trust for *identity* (authentication), not

Re: [GENERAL] PostgreSQL binaries under /usr/lib, why?

2013-02-22 Thread Stephen Frost
* Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: i.e. pgbench, pg_archivecleanup, pg_upgrade, initdb and several others are not available via /usr/bin and they should not be defined as low level. initdb is wrapped through pg_createcluster and friends. pg_archivecleanup probably isn't

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-14 Thread Stephen Frost
* Jeffrey Jones (jjo...@toppan-f.co.jp) wrote: I downloaded http://yum.postgresql.org/9.2/redhat/rhel-6Server-x86_64/repodata/primary.sqlite.bz2 using wget on the afected computer and ran md5sum over it with the following result: 9258bd5672cf7abb55a0d95ee2467afc primary.sqlite.bz2 That's

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-12 Thread Stephen Frost
Jeff, The system which hosts yum.postgresql.org has been undergoing a bit of maintenance today. I can't swear that's what the issue is, but would you mind giving it another shot..? Things should be calming down at this point. Thanks! Stephen * Jeffrey Jones

Re: [GENERAL] 9.2 RHEL6 yum Repository broken?

2013-02-12 Thread Stephen Frost
Jeff, * Jeffrey Jones (jjo...@toppan-f.co.jp) wrote: I first ran into the issue yesterday my time (about 24 hours ago), I am not sure if you were doing maintenance work then as well. Just a bit more information in case it is not related to maintenance. Ah, that's useful to know. No, that

Re: [GENERAL] .pgpass and root: a problem

2013-02-05 Thread Stephen Frost
Shaun, * Shaun Thomas (stho...@optionshouse.com) wrote: We're wanting to implement a more secure password policy, and so have considered switching to LDAP/Active Directory for passwords. Don't use the LDAP side of AD, use the Kerberos side. Using LDAP for auth against AD is terrible and is

Re: [GENERAL] .pgpass and root: a problem

2013-02-05 Thread Stephen Frost
* Shaun Thomas (stho...@optionshouse.com) wrote: psql: GSSAPI continuation error: Unspecified GSS failure. Minor code may provide more information GSSAPI continuation error: Server not found in Kerberos database Not extremely useful. You need to register the server w/ AD by creating a

Re: [GENERAL] .pgpass and root: a problem

2013-02-05 Thread Stephen Frost
* Shaun Thomas (stho...@optionshouse.com) wrote: On 02/05/2013 03:40 PM, Stephen Frost wrote: You need to register the server w/ AD by creating a principal for it and then exporting the princ (shared secret between the KDC and the server) and then loading it on the server. That looks like

Re: [GENERAL] Authenticate with hash instead of plaintext password?

2012-12-16 Thread Stephen Frost
* Murray Cumming (murr...@murrayc.com) wrote: I do have the option of creating a different set of user/password logins for the web UI and then either - Using one username/password for all web users' databases, with no PostgreSQL-level separation. But this would have to be in a config file

Re: [GENERAL] Authenticate with hash instead of plaintext password?

2012-12-16 Thread Stephen Frost
* Peter Bex (peter@xs4all.nl) wrote: Hm, that's a good point, I hadn't considered that. I don't know how Postgres stores its passwords internally or how its authentication works exactly. Maybe one of the developers can shine a light on this. PG stores a hash which is salted with the

Re: [GENERAL] Authenticate with hash instead of plaintext password?

2012-12-16 Thread Stephen Frost
* Peter Bex (peter@xs4all.nl) wrote: I could try my hand at providing a patch to switch to, say, bcrypt, but I'm pretty unfamiliar with the PostgreSQL source code. If nobody else is interested in working on it I can give it a try during the holidays. The code, in general, is very clean.

Re: [GENERAL] PostgreSQL and a clustered file system

2012-11-12 Thread Stephen Frost
Ivan, * Ivan Voras (ivo...@freebsd.org) wrote: Is anyone running PostgreSQL on a clustered file system on Linux? By clustered I actually mean shared, such that the same storage is mounted by different servers at the same time (of course, only one instance of PostgreSQL on only one server can

Re: [GENERAL] pros and cons of two security models

2012-10-03 Thread Stephen Frost
Chris, * Chris Travers (chris.trav...@gmail.com) wrote: This has a few significant drawbacks. As far as the web application is concerned, the types of supported authentication are limited to those which are re-usable, which basically means BASIC and KRB5. This maps to a much larger number

Re: Fwd: [GENERAL] pros and cons of two security models

2012-10-03 Thread Stephen Frost
Chris, * Chris Travers (chris.trav...@gmail.com) wrote: Well, that's the tradeoff I see. It can be handled using a bunch of different means. One that I have suggested is two-factor auth, where you require a client-side SSL cert with a specific issuing authority and a cn of the username that

Re: [GENERAL] PostgreSQL, OLAP, and Large Clusters

2012-09-26 Thread Stephen Frost
All, * Scott Marlowe (scott.marl...@gmail.com) wrote: If you want fastish OLAP on postgres you need to do several things. [...] All good suggestions. I'd recommend looking at ROLAP approaches and doing aggregations and materialized views first.. Will depend on exactly what you need/are

Re: [GENERAL] Can postgres be configure for GSS/Kerberos authentication without a keyfile?

2012-04-04 Thread Stephen Frost
Eric, * Eric.Kamradt (eric.kamr...@accessdevelopment.com) wrote: Can postgres be configure for GSS/Kerberos authentication without a keyfile? I'd say 'probably not'. You have to have a princ for postgres and that princ needs to exist in a keytab file on the PostgreSQL server. By default, the

Re: [GENERAL] Backing up through a database connection (not pg_dump)

2012-03-26 Thread Stephen Frost
* Tim Uckun (timuc...@gmail.com) wrote: On Tue, Mar 27, 2012 at 1:00 PM, David Boreham david_l...@boreham.org wrote: fwiw we run db_dump locally, compress the resulting file and scp or rsync it to the remote server. I wanted to see if I can do that without running pg_dump on the remote

Re: [GENERAL] Shared memory usage in PostgreSQL 9.1

2011-12-04 Thread Stephen Frost
* Christoph Zwerschke (c...@online.de) wrote: (Btw, what negative consequences - if any - does it have if I set kernel.shmmax higher as necessary, like all available memory? Does this limit serve only as a protection against greedy applications?) Didn't see this get answered... The

Re: [GENERAL] PG 9.1 on Debian Squeeze

2011-10-08 Thread Stephen Frost
* Karsten Hilbert (karsten.hilb...@gmx.net) wrote: apt-get install dpkg-dev should fix what you are seeing. The question remains whether postgresql-client(-common) should Depends: from dpkg-dev -- this should be reportbug postgresql-cliented. I believe Martin has just put together

Re: [GENERAL] Column Privileges: NULL instead of permission denied

2011-09-19 Thread Stephen Frost
* Matthew Hawn (matth...@donaanacounty.org) wrote: I have a table with privileged data that is restricted using column level permissions. I would like to have single query that returns data from the table. If the user has permission, it should return the data but return NULL if the user

Re: [GENERAL] Book

2011-07-20 Thread Stephen Frost
* Gavin Flower (gavinflo...@archidevsys.co.nz) wrote: On 21/07/11 10:45, Andrej wrote: Thanks all - book ordered :} +1 I wonder how much Greg has spent in bribes??? :-) He's bought me a beer. :D Or maybe I him.. ;) More seriously: I intend going through my copy in depth to get a better

Re: [GENERAL] An amusing MySQL weakness--not!

2011-06-26 Thread Stephen Frost
* Vincent Veyron (vv.li...@wanadoo.fr) wrote: Would you mind giving an example of where a boolean field would be a win over an integer one? Where you only ever want 2 (or perhaps 2+NULL) values allowed for the column. It's about domain, consistency, etc, primairly. That said, don't we

Re: [GENERAL] Oracle / PostgreSQL comparison...

2011-06-23 Thread Stephen Frost
* Rodrigo E. De León Plicet (rdele...@gmail.com) wrote: Any comments? Sure, they've never bothered to actually look at the data. Consider that for quite a while Oracle essentially refused to admit that their could *possibly* be bugs in their system (see: Unbreakable Linux, or whatever that

Re: [GENERAL] Count for pagination

2011-04-08 Thread Stephen Frost
* Jason Long (ja...@octgsoftware.com) wrote: The main search screen of my application has pagination. http://www.depesz.com/index.php/2007/08/29/better-results-paging-in-postgresql-82/ Thanks, Stephen signature.asc Description: Digital signature

Re: [GENERAL] Default permissions for CREATE SCHEMA/TABLE?

2011-03-24 Thread Stephen Frost
* Yang Zhang (yanghates...@gmail.com) wrote: Any way I can have all newly created schemas/tables be owned by, or have all permissions granted to, a certain group, without having to remember to GRANT ALL ON [SCHEMA|TABLE] TO that group? Thanks in advance. ALTER DEFAULT PRIVILEGES FOR ROLE

Re: [GENERAL] Move From Oracle DB to PostgreSQL DB

2011-03-14 Thread Stephen Frost
Gene, * gene.po...@macys.com (gene.po...@macys.com) wrote: Is there a recent tutorial, white paper, how to on move/migrate from Oracle to PostgreSQL? It's typically not hard, but it depends on what you're doing w/ Oracle. Specifically, things like stored procedures (PL/SQL) may require

Re: [GENERAL] PG9.0 planner difference to 8.3 - majorly bad performance

2011-01-29 Thread Stephen Frost
* Uwe Schroeder (u...@oss4u.com) wrote: Now I turn off the 8.3 instance and start the 9.0 instance. Remember, everything is identical. Here the same query again: Everything isn't identical if you just started PG 9.0 though- presumably the 8.3 instance had everything cache'd already. What

Re: [GENERAL] PG9.0 planner difference to 8.3 - majorly bad performance

2011-01-29 Thread Stephen Frost
* Uwe Schroeder (u...@oss4u.com) wrote: Yes, the database is vacuumed and analyzed. The bad plan from 9.0 improves by 2 seconds when I go for a really high statistics target of 5000. What if you go back to 10..? Stephen signature.asc Description: Digital signature

Re: [GENERAL] Linux: PAE or x64

2010-12-15 Thread Stephen Frost
* Peter Geoghegan (peter.geoghega...@gmail.com) wrote: And yet, that has been used by authoritative people as a partial justification for pg lacking a 64-bit version on Windows in the past on more than one occasion. You're misreading poor Magnus. He didn't offer any 'justification' regarding

Re: [GENERAL] How Big is Too Big for Tables?

2010-07-28 Thread Stephen Frost
* P Kishor (punk.k...@gmail.com) wrote: Three. At least, in my case, the overhead is too much. My data are single bytes, but the smallest data type in Pg is smallint (2 bytes). That, plus the per row overhead adds to a fair amount of overhead. My first reaction to this would be- have you

Re: [GENERAL] GSS Authentication

2010-07-08 Thread Stephen Frost
Bryan, * Bryan Montgomery (mo...@english.net) wrote: After that I spent a bit of time on my windows client fiddling trying to get it to work. I had set PGSRVKRBNAME, tried setting PGGSSAPI however, I wasn't using the FQDN of my database server. When I went from dbhost to dbhost.lab2k.net, I

Re: [GENERAL] GSS Authentication

2010-06-16 Thread Stephen Frost
Greig, * greigw...@comcast.net (greigw...@comcast.net) wrote: I finally got it working. Problem was that on the windows side on the service account within the account options, we needed to check Use DES encryption types for this account. I had that changed on the AD side and that fixed the

Re: [GENERAL] GSS Authentication

2010-06-16 Thread Stephen Frost
* greigw...@comcast.net (greigw...@comcast.net) wrote: So for the -crypto option, what would be your recommendation for what I should use and would this require changes on the DB server side? What OS are you running on your AD..? 2003? 2008? Stephen signature.asc Description:

Re: [GENERAL] GSS Authentication

2010-06-16 Thread Stephen Frost
* greigw...@comcast.net (greigw...@comcast.net) wrote: 2008 I'd expect AES256-SHA1 to work then. Thanks, Stephen signature.asc Description: Digital signature

Re: [GENERAL] use window as field name in 8.4

2010-06-15 Thread Stephen Frost
* Peter Lee (pe...@flairpackaging.com) wrote: I am trying to upgrade our postgresql from 8.3 to 8.4. I found the window as field name makes many errors during pg_restore. - like item.window. Is there any way I can restore the dump file from 8.3 without errors. The best solution would

Re: [GENERAL] GSS Authentication

2010-06-15 Thread Stephen Frost
* greigw...@comcast.net (greigw...@comcast.net) wrote: kinit -S POSTGRES/host.domain.com user (where user is my account name in AD). That then asked for my password and when I entered it, it seemed to work. And now klist shows that I have a ticket. Doing it this way though, the keytab

Re: [GENERAL] table partition or index

2010-06-13 Thread Stephen Frost
* AI Rumman (rumman...@gmail.com) wrote: For how many records I should go for a table partition instead of using just index? Any idea please. General rule of thumb is that you don't need partitioning until you're into the 100's of millions of records. Stephen signature.asc

Re: [GENERAL] GSS Authentication

2010-06-12 Thread Stephen Frost
Bryan, * Bryan Montgomery (mo...@english.net) wrote: On Sat, Jun 12, 2010 at 12:58 AM, Stephen Frost sfr...@snowman.net wrote: Can you elaborate on the DNS requirements? How would I check the reverse DNS? I assume just pinging both server by hostname? Kerberos depends on reverse DNS. Reverse

Re: [GENERAL] GSS Authentication

2010-06-12 Thread Stephen Frost
* Bryan Montgomery (mo...@english.net) wrote: I've been trying this as well off and on. In my case I'm not convinced the AD configuration is correct (And someone else manages that). Yeah, that can be a challenge.. but it's *definitely* possible to get it set up and working correctly. Can you

Re: [GENERAL] Cognitive dissonance

2010-06-12 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Peter Eisentraut pete...@gmx.net writes: I've committed a build target for that now. Use 'make postgres.html' in doc/src/sgml/. Huh, is that actually worth anything? How many browsers will open it without crashing, or will navigate the page with

Re: [GENERAL] GSS Authentication

2010-06-11 Thread Stephen Frost
* greigw...@comcast.net (greigw...@comcast.net) wrote: 2) Setup a new account in AD and used ktpass to create a keytab file for the SPN. Did you make sure to use the right service name when creating the keytab? Can you do a klist -k on the keytab file and send the output? Does hostname

Re: [GENERAL] database response slows while pg_dump is running (8.4.2)

2010-06-10 Thread Stephen Frost
* Aleksey Tsalolikhin (atsaloli.t...@gmail.com) wrote: I am moving the pg_dump process to a Slony slave. Good idea. Good point. I tried that, actually, but was still disk-bound. (Mostly read activity.) You could maybe try ionice'ing the PG process that is the pg_dump connection...

Re: [GENERAL] Enforcing password standards

2010-06-10 Thread Stephen Frost
* DM (dm.a...@gmail.com) wrote: How to force postgres users to follow password standards and renewal policies? It's not trivial, sadly. Regarding renewal, you can use the 'valid until' role parameter to implement a only good until mechanism, and then update that using a security definer

Re: [GENERAL] Cognitive dissonance

2010-06-08 Thread Stephen Frost
* John Gage (jsmg...@numericable.fr) wrote: But either I am a visitor from the Crab Nebula, or there is someone else out there who would like to have a text file of the entire documentation. Soo.. there are quite a few man pages, and in-psql's help is also pretty nice (\h command and \?).

Re: [GENERAL] Restore roles with same oid

2010-06-08 Thread Stephen Frost
* Jeff Amiel (jam...@istreamimaging.com) wrote: On 6/8/10 10:30 AM, Thom Brown thombr...@gmail.com wrote: Can't you switch to using role names? I don't think oids are intended to be used by anything other than PostgreSQL. :( If only I couldmassive audit tables contain these IDs with

Re: [GENERAL] Restore roles with same oid

2010-06-08 Thread Stephen Frost
* Jeff Amiel (jam...@istreamimaging.com) wrote: On 6/8/10 10:39 AM, Stephen Frost sfr...@snowman.net wrote: I'm afriad you're not going to have a choice.. I would recommend creating a mapping from the old IDs to the new ones as part of this upgrade, to keep the historical information

Re: [GENERAL] Disable executing external commands from psql?

2010-06-02 Thread Stephen Frost
* Ken Tanzer (ken.tan...@gmail.com) wrote: My experience has been that for some reason these folks just don't want to download and configure a Linux environment just to be able to kick the tires on this thing. So I was thinking self-serve-created demo accounts would be a good way to go.

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Stephen Frost
* Tom Wilcox (hungry...@googlemail.com) wrote: My plan now is to try increasing the shared_buffers, work_mem, maintenance_work_mem and apparently checkpoint_segments and see if that fixes it. er. work_mem and maintenance_work_mem aren't *limits*, they're more like *targets*. The out

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Stephen Frost
* m. hvostinski (makhv...@gmail.com) wrote: I have a simple query like: SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) The problem is that I need to retrieve the rows in the same order as the set of ids provided in the select statement. Can it be done? Not very easily. My first

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread Stephen Frost
* raghavendra t (raagavendra@gmail.com) wrote: How do i get the client time and server time. I am connecting remotely. If i give SELECT CURRENT_TIME;,it shows the server time. How do we get the client time ? uh, \! date ? Stephen signature.asc Description: Digital signature

Re: [GENERAL] postgres authentication against Windows Domain

2010-06-02 Thread Stephen Frost
* Joshua Tolley (eggyk...@gmail.com) wrote: On Tue, Jun 01, 2010 at 11:56:19AM -0600, u235sentinel wrote: Is there is a way to connect postgres to authenticate against a windows domain without recompiling and using gssapi. Ldap perhaps? I'm still trying to figure out why you wouldn't

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Stephen Frost
* Tim Landscheidt (t...@tim-landscheidt.de) wrote: Just thinking about it now; do SQL's semantics say it'll always do the right thing? PG does in a couple of quick tests (i.e. one where customer is a small table and PG prefers a seqscan and where it's larger and prefers an index scan) but

Re: [GENERAL] sum multiple tables gives wrong answer?

2010-06-02 Thread Stephen Frost
* Michael Diener (m.die...@gomogi.com) wrote: I have an SQL problem that I thought was easy to do but gives me always the wrong answer. I think it's the right answer- the problem is that you're asking SQL a different question than what you want the answer to. 2 Tables with a column called

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-02 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: J. Bagg j.b...@kent.ac.uk writes: I've just had the common problem with not finding the readline library while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing seemed to work: --with-libraries=/lib and pointing CFLAGs there all

Re: [GENERAL] postgres authentication against Windows Domain

2010-06-02 Thread Stephen Frost
* u235sentinel (u235senti...@gmail.com) wrote: We would have to rebuild the binaries and we're already heavily using the database. I could rebuild it again but it's like the fourth time I've been asked to add a feature. I did read that GSSAPI was the way to go but I'm being told to try

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
Ken, * Ken Tanzer (ken.tan...@gmail.com) wrote: Hi. I'm wondering if it is possible to disable use of \! to execute commands in psql? I see this has come up on the list before (http://archives.postgresql.org/pgsql-admin/2007-07/msg00242.php), but I don't see anyone saying whether it

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
Ken, * Ken Tanzer (ken.tan...@gmail.com) wrote: I could be way off base, but it seems like the exposure is limited. Sure, each user can access their database, providing they can authenticate successfully. (Of course, I don't care what they do with their database.) This essentially

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
* Ken Tanzer (ken.tan...@gmail.com) wrote: OK one more question on this thread. It occurs to me that for the web app, DB username and password is read from a configuration file. (I understand this to be a common method for web applications.) But since apache needs to read the file,

Re: [GENERAL] Disable executing external commands from psql?

2010-06-01 Thread Stephen Frost
* Ken Tanzer (ken.tan...@gmail.com) wrote: You realize that some information (like roles/users) is shared cluster-wide and isn't limited to a specific database, right? That's usually where web-hosting folks trip up first.. I think it's fair to say I realize it, but am perhaps not drawing

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-05-28 Thread Stephen Frost
* Tom Wilcox (hungry...@googlemail.com) wrote: UPDATE tbl SET f1 = COALESCE(f2,'') || ' ' || COALESCE(f3); Can anyone suggest reasons why I might be running out of memory on such a simple query? Do you have any triggers on that table? Or FK's? Stephen signature.asc Description:

Re: [GENERAL] Config Changes Broke Postgres Service (Windows)

2010-05-28 Thread Stephen Frost
* Tom Wilcox (hungry...@googlemail.com) wrote: Can anyone tell me what might be going on and how I can fix it so that postgres uses as much memory and processing power as poss... in a stable manner? I realize this probably isn't the answer you're looking for, and hopefully someone can come up

Re: [GENERAL] Moving from Mysql

2010-05-22 Thread Stephen Frost
* Luis Daniel Lucio Quiroz (luis.daniel.lu...@gmail.com) wrote: 1. whar are equivalent for these commands: in mysql: mysqldump mydata_base_name pg_dump (pg_restore to restore from the dump, if you use a non-SQL format for it, which can give you the ability to do a parallel-restore) mysql

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Stephen Frost
* keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: No luck. I set it in the postgresql.conf file and did a reload, ran analyze on the tables and the query plan isn't any better. Are you sure the database schemas are identical, including indexes, etc? There's an index being used on the

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Stephen Frost
* keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: Yes, I triple checked and the schemas, indexes, FKs, triggers all match. Have you checked over for any enable_* settings that are off? Identical work_mem and maintenance_work_mem settings? Thanks,

Re: [GENERAL] Poor query performance on one of two like databases in production.

2010-05-14 Thread Stephen Frost
* keaton_ad...@mcafee.com (keaton_ad...@mcafee.com) wrote: It looks like it is just a difference in data volume. We are re-working the query to see what that will do. Just my 2c, but I'd recommend using JOIN syntax instead of comma-joins. eg: select * from a JOIN b USING (col1,col2); or:

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Stephen Frost
S G, * S G (sgennar...@gmail.com) wrote: Can anyone lend a guess as to what I'm running into here, or do I need to provide more specifics to recreate the issue? It's repeatable, but it's a fair bit of data for me to just post in here as-is. I've already discovered a few creative workarounds

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Stephen Frost
S G, * S G (sgennar...@gmail.com) wrote: I guess to really get down to the issue, I'm curious if what I'm doing is considered 'standard procedure' to others-- i.e. using funny workarounds like building the query in a text var and executing it with plpgsql's RETURN QUERY EXECUTE command.

Re: [GENERAL] [PERFORM] PostgreSQL - case studies

2010-02-10 Thread Stephen Frost
* Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: Could some of you please share some info on such scenarios- where you are supporting/designing/developing databases that run into at least a few hundred GBs of data (I know, that is small by todays' standards)? Just saw this, so

Re: [GENERAL] Column privileges and Hibernate (SOLVED)

2010-01-05 Thread Stephen Frost
* Craig Ringer (cr...@postnewspapers.com.au) wrote: The issue with column privs is that Hibernate lists all columns, even ones it hasn't set or altered, in the INSERT and UPDATE statements it issues. Column privileges are checked based on the INSERT or UPDATE column list, not the actual values

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Stephen Frost
* Craig Ringer (cr...@postnewspapers.com.au) wrote: ... so it's defaulting to SQL_ASCII, but actually supports utf-8 if your systems are all in a utf-8 locale. Assuming there's some way for the filed to find out the encoding of the director's database, it probably wouldn't be too tricky

Re: [GENERAL] Fwd: psql+krb5

2009-12-01 Thread Stephen Frost
* Craig Ringer (cr...@postnewspapers.com.au) wrote: I've dropped all your cross-posts; this is just going to PgSQL-general. Thanks for that. On 30/11/2009 3:29 PM, rahimeh khodadadi wrote: psql: *krb5_sendauth: Bad application version was sent (via sendauth)* Also: a search for your error

Re: [GENERAL] limiting resources to users

2009-12-01 Thread Stephen Frost
* Greg Smith (g...@2ndquadrant.com) wrote: Craig Ringer wrote: On 1/12/2009 11:33 AM, Greg Smith wrote: 1) If you spawn the psql process with bash using , you can then find its pid with $!, then chain through the process tree with ps and pg_stat_activity as needed to figure out the backend

Re: [GENERAL] ora2pg and DBD::Pg

2009-11-20 Thread Stephen Frost
* Alexandra Roy (alexandra@bull.net) wrote: Does someone can explain me that is under 'on the fly' please ? Concerning the documentation of ora2pg, is it the good link ? It worked well for me, using it mainly to copy table structures and data. I was doing a one-time move to PG though, not

Re: [GENERAL] Too easy to log in as the postgres user?

2009-10-15 Thread Stephen Frost
* Thom Brown (thombr...@gmail.com) wrote: 2009/10/15 A. Kretschmer andreas.kretsch...@schollglas.com: The pg_hba.conf is probably relevant here, so this is the setup: # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD # local is for Unix domain socket connections only

Re: [GENERAL] Too easy to log in as the postgres user?

2009-10-15 Thread Stephen Frost
* Thom Brown (thombr...@gmail.com) wrote: Okay, I've just ended up commenting out the host lines and it's effective enough as far as logging in is concerned. However, the websites which use the database are no longer able to connect. I should point out that they are connecting to pgbouncer

Re: [GENERAL] Too easy to log in as the postgres user?

2009-10-15 Thread Stephen Frost
* Andrew Bailey (hazloreali...@gmail.com) wrote: You appear to be trusting all connections what I think you want is the following: local all all ident sameuser # IPv4 local connections: host all all 127.0.0.1/32 ident sameuser # IPv6 local connections: host all all ::1/128 ident sameuser

Re: [GENERAL] `must be superuser to COPY to or from a file' - using perl DBI - approaches to work around this

2009-10-12 Thread Stephen Frost
* Dan Kortschak (dan.kortsc...@adelaide.edu.au) wrote: $dbh-do(COPY chromosome_data FROM '.chromosomes(\%options).' CSV); Does anyone have any suggestions (the least bad of the options above seems to be to use psql, but I think that is ugly)? perldoc DBD::Pg Read the 'COPY support' section.

Re: [GENERAL] `must be superuser to COPY to or from a file' - using perl DBI - approaches to work around this

2009-10-12 Thread Stephen Frost
* Dan Kortschak (dan.kortsc...@adelaide.edu.au) wrote: On Mon, 2009-10-12 at 20:21 -0400, Stephen Frost wrote: Does anyone have any suggestions (the least bad of the options above seems to be to use psql, but I think that is ugly)? perldoc DBD::Pg Read the 'COPY support' section

Re: [GENERAL] Wishlist of PL/Perl Enhancements for PostgreSQL 8.5

2009-10-06 Thread Stephen Frost
* David Fetter (da...@fetter.org) wrote: On Tue, Oct 06, 2009 at 09:57:39AM +0100, Tim Bunce wrote: http://blog.timbunce.org/2009/10/05/wishlist-of-plperl-enhancements-for-postgresql-8-5/ Is someone working on adding the pl/perl hooks to be called as an anonymous PG function?

Re: [GENERAL] column level, uid based authorization to update columns

2009-09-03 Thread Stephen Frost
* Gauthier, Dave (dave.gauth...@intel.com) wrote: In linux, given the linux based uid of the user, how might someone implement column level update restrictions on a uid basis? For example... The first issue is getting the linux uid to equate to a PG role. That can be done using 'ident'

Re: [GENERAL] general question on two-partition table

2009-07-28 Thread Stephen Frost
* Janet Jacobsen (jsjacob...@lbl.gov) wrote: I looked at the documentation for partitions - it is the case, right, that I have to create the master table and the two partition tables (depending on the value of rbscore) and then copy the records from the existing table into the two partitions?

Re: [GENERAL] general question on two-partition table

2009-07-27 Thread Stephen Frost
* Janet Jacobsen (jsjacob...@lbl.gov) wrote: If they are going to spend 95% of their time querying the records that meet the 'good' criteria, what are the good strategies for ensuring good performance for those queries? (1) Should I partition the table into two partitions based on the value

Re: [GENERAL] Build in spatial support vs. PostGIS

2009-06-21 Thread Stephen Frost
* Assaf Lavie (assafla...@gmail.com) wrote: Can anyone please shed light on the difference between the two: http://stackoverflow.com/questions/1023229/spatial-data-in-postgresql (login _not_ required) Without really good justification to use something else, I'd strongly recommend using

Re: [GENERAL] Assistance in importing a csv file into Postgresql

2009-05-25 Thread Stephen Frost
Greetings, * Intengu Technologies (sindile.bi...@gmail.com) wrote: What I would like to do is If field1=1 make table1 and insert the rest of field1=1 into this table If field1=2 make table2 and insert the rest of field1=2 into this table Hence in this example one will have table1, table2,

Re: [GENERAL] Assistance in importing a csv file into Postgresql

2009-05-25 Thread Stephen Frost
* Grzegorz Jaśkiewicz (gryz...@gmail.com) wrote: On Mon, May 25, 2009 at 4:12 PM, Stephen Frost sfr...@snowman.net wrote: This currently can't be done with the COPY command directly.  There are I would put it in postgresql as is, and than do CREATE TABLE foo AS SELECT CASE ... END

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-04-21 Thread Stephen Frost
* Scott Marlowe (scott.marl...@gmail.com) wrote: On Tue, Apr 21, 2009 at 1:15 PM, Peter Childs peterachi...@gmail.com wrote: Hmm Interestingly OSM have just switched from MySQL to PostgreSQL. On the news blog page it mentioned switching to MonetDB. I saw nothing about pgsql there. Do they

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-04-21 Thread Stephen Frost
* Scott Marlowe (scott.marl...@gmail.com) wrote: On Tue, Apr 21, 2009 at 1:15 PM, Peter Childs peterachi...@gmail.com wrote: Hmm Interestingly OSM have just switched from MySQL to PostgreSQL. On the news blog page it mentioned switching to MonetDB. I saw nothing about pgsql there. Do they

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-03-17 Thread Stephen Frost
Juan, * Juan Pereira (juankarlos.open...@gmail.com) wrote: - The schema for this kind of data consists of several arguments -latitude, longitude, time, speed. etc-, none of them is a text field. I would think you might want *some* text fields, for vehicle identification, as a seperate table

Re: [GENERAL] Uploading data to postgresql database

2009-03-17 Thread Stephen Frost
* Subha Ramakrishnan (su...@gslab.com) wrote: So far, I have been using shp2pgsql to upload data from shape files. I don't want to convert it to shape and then upload it. Have you looked at ogr2ogr? It looks to support KML as a format, and has PostGIS support, though I'm not sure if it can

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-03-17 Thread Stephen Frost
Juan, * Juan Pereira (juankarlos.open...@gmail.com) wrote: The main reason why we thought using a table per truck was because concurrent load: if there are 100 trucks trying to write in the same table, maybe the performance is worse than having 100 tables, due to the fact that the table is

Re: [GENERAL] Out of memory on SELECT in 8.3.5

2009-02-09 Thread Stephen Frost
* Matt Magoffin (postgresql@msqr.us) wrote: There is no /prod/pid/limits file, but here are erp, that stinks. Must be on an older kernel? I've got it under (a Debian-built) 2.6.26. I can't recall if there's another way to get limit info for an active process.. Could use Tom's suggestion

Re: [GENERAL] Out of memory on SELECT in 8.3.5

2009-02-09 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: OTOH ... wait a minute. Have you maybe got the system configured to start denying memory requests before it gets into significant swapping? We typically suggest setting vm.overcommit_memory=2 on Linux, but I'm not sure whether that results in the kernel

Re: [GENERAL] Out of memory on SELECT in 8.3.5

2009-02-09 Thread Stephen Frost
* Matt Magoffin (postgresql@msqr.us) wrote: [r...@170226-db7 ~]# cat /proc/meminfo CommitLimit: 10312588 kB Committed_AS: 9760756 kB I suspect this may be it... Apparently, while you're only using about 2G, you've got 10G or so of outstanding commitments, and Linux is refusing to

Re: [GENERAL] Out of memory on SELECT in 8.3.5

2009-02-09 Thread Stephen Frost
* Matt Magoffin (postgresql@msqr.us) wrote: Thanks for the advice. Should we have more than 2GB of swap available? I thought the goal for a Postgres system was to avoid swap use at all cost? Would it be better for us to add more swap, or adjust this overcommit_ratio as you discuss? You do

Re: [GENERAL] Out of memory on SELECT in 8.3.5

2009-02-09 Thread Stephen Frost
* Scott Marlowe (scott.marl...@gmail.com) wrote: I'd do both. But only after I'd reduced work_mem. Given that reducing work_mem removed the problem, it looks to me like pgsql is requesting several large blocks of ram, then only using a small port of them. But overcommit set to 2 means that

Re: [GENERAL] Out of memory on SELECT in 8.3.5

2009-02-09 Thread Stephen Frost
* Scott Marlowe (scott.marl...@gmail.com) wrote: I think that you're fixing a symptom, but ignoring the cause. Twiddling VM parameters may help out, but this problem of too much memory allocated is the real issue, so yeah, you're just putting off the inevitable. I don't think changing

<    1   2   3   4   5   >