Re: [GENERAL] strange permission error

2012-10-03 Thread Mr Dash Four
2. If somebody manages to hijack your connection, you have much worse problems than whether they can read your system catalogs. They can at least copy, and probably modify, your user data. If I have restricted those permissions (i.e. access to specific schemas only, allowing specific operation

[GENERAL] pros and cons of two security models

2012-10-03 Thread Chris Travers
Hi all; I wanted to get opinions of folks who do a lot of this as well. LedgerSMB uses database user accounts and role grants to restrict access of the front-end application. This means: 1) The database does not trust the application. The application has no access to the db in the absence of

Re: [GENERAL] stored procedure multiple call call question

2012-10-03 Thread Chris McDonald
Thanks very much for that David - really appreciate your response - it works like a dream c On Tuesday, 2 October 2012 19:42:59 UTC+1, Chris McDonald wrote: > Hi, > > > > > > If I had a single table targ to insert into I would do an > > > > INSERT INTO targ SELECT thiscol, thatcol, th

[GENERAL] Replication err

2012-10-03 Thread Khizer
Hi, I am doing streaming replication master-slave with postgresql-9.0.4 , i am getting following err how do i correct this streaming replication successfully connected to primary 2012-10-03 00:00:06 IST FATAL: could not receive data from WAL stream: FATAL: requested WAL segment

[GENERAL] Unable to uninstall completely Postgre SQL

2012-10-03 Thread Alex Putra
Dear Sir/Mdm, I have problem with uninstalling postgre sql from my windows and as well to reset the service account password. Would you mind assist me in this case? Thank You Regards, Alex Putra

[GENERAL] Indexing JSON type

2012-10-03 Thread Ankur Soni
Hi, I am using PostgreSQL 9.2. I was wondering if anyone has been successful in indexing JSON data? Is it possible to index all JSON data (keys and values)? Thanks! Regards, Ankur Soni

Re: [GENERAL] Indexing JSON type

2012-10-03 Thread Andreas Kretschmer
Ankur Soni wrote: > Hi, > > I am using PostgreSQL 9.2. I was wondering if anyone has been successful in > indexing JSON data? Is it possible to index all JSON data (keys and values)? http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html Andreas -- Re

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 numb

Re: [GENERAL] Replication err

2012-10-03 Thread Andreas Kretschmer
Khizer wrote: > Hi, > > I am doing streaming replication master-slave with > postgresql-9.0.4 , i am getting following err > how do i correct this > > > streaming replication successfully connected to primary > 2012-10-03 00:00:06 IST FATAL: could not receive data from WAL stream: > F

Re: [GENERAL] Replication err

2012-10-03 Thread Shaun Thomas
On 10/03/2012 12:35 AM, Khizer wrote: I am doing streaming replication master-slave with postgresql-9.0.4 , i am getting following err how do i correct this In order for replication to work, the WAL segments necessary for a slave to "catch up" must be available long enough for them to

Re: [GENERAL] Securing .pgpass File?

2012-10-03 Thread Shaun Thomas
On 10/02/2012 04:19 PM, Martijn van Oosterhout wrote: - Punt. Check in the password but set the access controls so it only work for very few IPs, then you only need to worry about people who can log into *those* machines. Which is controlled by public SSH keys which you can check-in sa

[GENERAL] Upgrading 8.3-rc1 to 8.3.20

2012-10-03 Thread Leonardo M . Ramé
I want to upgrade an 8.3-rc1 to 8.3.20 Win32 server (I cannot upgrade to 8.4 nor 9.1 because the client app doesn't support them). The question is, is there a tutorial, or a step-by-step guide to to this?. Can I just decompress the postgresql-8.3.20-1-binaries-no-installer.zip file and just overwr

[GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Robert Sosinski
We are running Postgres 9.1.3, and after stopping it by physically shutting off the machine, we rebooted and now get this error whenever we try to start it. 2012-10-02 13:54:30 PDT LOG: database system was interrupted; last known up at 2012-10-02 13:46:20 PDT 2012-10-02 13:54:30 PDT LOG: data

Re: [GENERAL] Upgrading 8.3-rc1 to 8.3.20

2012-10-03 Thread Raymond O'Donnell
On 03/10/2012 15:21, Leonardo M. Ramé wrote: > I want to upgrade an 8.3-rc1 to 8.3.20 Win32 server (I cannot upgrade to > 8.4 nor 9.1 because the client app doesn't support them). The question > is, is there a tutorial, or a step-by-step guide to to this?. The usual way is to pg_dump the old one f

Re: [GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Merlin Moncure
On Wed, Oct 3, 2012 at 9:33 AM, Robert Sosinski wrote: > We are running Postgres 9.1.3, and after stopping it by physically shutting > off the machine, we rebooted and now get this error whenever we try to start > it. > > 2012-10-02 13:54:30 PDT LOG: database system was interrupted; last known up

Re: [GENERAL] Upgrading 8.3-rc1 to 8.3.20

2012-10-03 Thread Andreas Kretschmer
Raymond O'Donnell wrote: > On 03/10/2012 15:21, Leonardo M. Ramé wrote: > > I want to upgrade an 8.3-rc1 to 8.3.20 Win32 server (I cannot upgrade to > > 8.4 nor 9.1 because the client app doesn't support them). The question > > is, is there a tutorial, or a step-by-step guide to to this?. > > Th

Re: [GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Robert Sosinski
Hey Merlin, Thanks. Starting postgres with -P was something that I did not try. Does postgres have any GIN or GIST system indexes though? I would love to try it out, but the database has already been restored. Will definitely keep this in mind for the future though. Thanks again for the hel

[GENERAL] PostgreSQL force create table / ignore constraints?

2012-10-03 Thread hartrc
Version Postgresql 9.1.6 OS: SLES 11 64 bit Background: Our developers create database schema in development environment using PGAdmin (often using the GUI to generate the DDL). We always deploy to production using a script, a single .sql file which we execute via psql command line. This allows u

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

2012-10-03 Thread Chris Travers
On Wed, Oct 3, 2012 at 6:17 AM, Stephen Frost wrote: > 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

[GENERAL] Determining that a schema has changed for purpose of monitoring

2012-10-03 Thread Thor Michael Støre
Hello. Is there a way in PostgreSQL for a client to determine that a database schema may have changed since it checked it earlier, for example to get the transaction ID or timestamp of the last successfully committed transaction that included DDL commands and compare them over time? For a while

Re: [GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Tom Lane
Robert Sosinski writes: > We are running Postgres 9.1.3, and after stopping it by physically shutting > off the machine, we rebooted and now get this error whenever we try to start > it. > 2012-10-02 13:54:30 PDT PANIC: GIN metapage disappeared This looks like an issue that was fixed in 9.1.4

Re: [GENERAL] Upgrading 8.3-rc1 to 8.3.20

2012-10-03 Thread Leonardo M . Ramé
On 2012-10-03 16:51:59 +0200, Andreas Kretschmer wrote: > Raymond O'Donnell wrote: > > > On 03/10/2012 15:21, Leonardo M. Ramé wrote: > > > I want to upgrade an 8.3-rc1 to 8.3.20 Win32 server (I cannot upgrade to > > > 8.4 nor 9.1 because the client app doesn't support them). The question > > > i

Re: [GENERAL] Unable to uninstall completely Postgre SQL

2012-10-03 Thread John R Pierce
On 10/02/12 10:19 PM, Alex Putra wrote: I have problem with uninstalling postgre sql from my windows and as well to reset the service account password. Would you mind assist me in this case? you'll need to be a little more specific with why you're having a problem uninstalling postgresql i

Re: [GENERAL] Again, problem with pgbouncer

2012-10-03 Thread Phoenix Kiula
On Tue, Oct 2, 2012 at 5:27 PM, Phoenix Kiula wrote: > On Tue, Oct 2, 2012 at 11:29 AM, Phoenix Kiula > wrote: >> On Tue, Oct 2, 2012 at 12:59 AM, Phoenix Kiula >> wrote: Could you please check permission of /var/run/pgbouncer/ directory. If pgbouncer directory does not have "postgre

[GENERAL] Sequence and Schema permissions information schema

2012-10-03 Thread hartrc
PostgreSQL v9.1.6 Are sequence and schema permissions documented anywhere in the information schema. I've looked through documentation and the information_schema itself but have had no luck. I noticed in the 9.2 documentation there is a reference to 'sequences' in information_schema.usage_privileg

Re: [GENERAL] Again, problem with pgbouncer

2012-10-03 Thread dinesh kumar
Hi, Do you have "MYSITE_MYSITE" user at your database. Please login to the database directly (I mean, without any pgbouncer and check once. select* from pg_user where usename ~~* 'MYSITE_MYSITE'; And also please check your's pgbouncer.ini admin users list also. Best Regards, Dinesh manojadinesh

[GENERAL] surprising behavior or nothing to see here?

2012-10-03 Thread Ben Chobot
Today we saw a couple behaviors in postgres we weren't expecting, and I'm not sure if there's something odd going on, or this is all business as usual and we never noticed before. In steady-state, we have a 32-core box with a fair amount of ram acting as a job queue. It's constantly busy insert

Re: [GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Igor Neyman
From: Robert Sosinski [mailto:rsosin...@ticketevolution.com] Sent: Wednesday, October 03, 2012 10:54 AM To: Merlin Moncure Cc: pgsql-general@postgresql.org; Spike Grobstein Subject: Re: Postgres will not start due to corrupt index Hey Merlin, Thanks.  Starting postgres with -P was something tha

Re: [GENERAL] Sequence and Schema permissions information schema

2012-10-03 Thread Tom Lane
hartrc writes: > PostgreSQL v9.1.6 > Are sequence and schema permissions documented anywhere in the information > schema. In 9.1, I don't believe so. According to the GRANT reference page, which I think is accurate, privileges on schemas are a PG extension not found in the SQL standard; so of c

Re: [GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Tom Lane
Igor Neyman writes: > I wonder if there is a column in pg catalog, that indicates the type of the > index. I couldn't find one. join relam to pg_am.oid > So, I ran the following sql trying to find system indexes of gin or gist type: There aren't any. regards, tom lane

Re: [GENERAL] surprising behavior or nothing to see here?

2012-10-03 Thread Tom Lane
Ben Chobot writes: > 4. What might cause autovacuum analyze to make an index perform worse > immediately, when a manual vacuum analyze does not have the same affect? And > I'm not talking about changing things so the planner doesn't use the index, > but rather, having the index actually take lo

Re: [GENERAL] surprising behavior or nothing to see here?

2012-10-03 Thread Ben Chobot
On Oct 3, 2012, at 11:50 AM, Tom Lane wrote: > Ben Chobot writes: >> 4. What might cause autovacuum analyze to make an index perform worse >> immediately, when a manual vacuum analyze does not have the same affect? And >> I'm not talking about changing things so the planner doesn't use the inde

Re: [GENERAL] What's faster? BEGIN ... EXCEPTION or CREATE TEMP TABLE IF NOT EXISTS?

2012-10-03 Thread Moshe Jacobson
On Tue, Oct 2, 2012 at 9:18 AM, Merlin Moncure wrote: > > Yes but that is irrelevant to the discussion. I am comparing the speed of > > repeated table existence checks with the speed of repeated exception > blocks > > that access said table. > > Both approaches have to do a catalog scan (even if

Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-03 Thread Wolf Schwurack
I use pgpool but some of the problem you listed are same as I had with pgpool I would not run pgbouner in /var/run/pbbouner. Every time you reboot the directory will get deleted. I set my parameter to another directory the would not get deleted after a reboot. /var/log/pgbouncer.log: what is t

Re: [GENERAL] syntax error collate

2012-10-03 Thread Raymond O'Donnell
On 03/10/2012 15:31, Niklas Langvig wrote: > Hello > If I do this from pgAdmin on windows to my localhost database 9.2 it > works fine > CREATE COLLATION Test ( > > LOCALE = 'en_US.UTF-8' > > ) > > > If I connect to a linux server and do the sameI get > > ERROR: syntax error at or near "C

Re: [GENERAL] Postgres will not start due to corrupt index

2012-10-03 Thread Igor Neyman
> -Original Message- > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Wednesday, October 03, 2012 2:47 PM > To: Igor Neyman > Cc: Robert Sosinski; Merlin Moncure; pgsql-general@postgresql.org; > Spike Grobstein > Subject: Re: [GENERAL] Postgres will not start due to corrupt index > > I

[GENERAL] [PL/PGSQL] column name substitution in PG8.4

2012-10-03 Thread Léon Melis
For some of my customers I wrote a PL/PGSQL function that stores the difference between an OLD en NEW record when updating a record. This system can be applied as a trigger on the table the customer likes to audit. Because the function can be applied as a trigger on different tables, the function n

[GENERAL] syntax error collate

2012-10-03 Thread Niklas Langvig
Hello If I do this from pgAdmin on windows to my localhost database 9.2 it works fine CREATE COLLATION Test ( LOCALE = 'en_US.UTF-8' ) If I connect to a linux server and do the sameI get ERROR: syntax error at or near "COLLATION" LINE 1: CREATE COLLATION Test ( On linux we have version strin

Re: [GENERAL] PostgreSQL force create table / ignore constraints?

2012-10-03 Thread Frank Lanitz
On Wed, 3 Oct 2012 08:12:25 -0700 (PDT) hartrc wrote: > Version Postgresql 9.1.6 > OS: SLES 11 64 bit > > Background: > Our developers create database schema in development environment using > PGAdmin (often using the GUI to generate the DDL). > We always deploy to production using a script, a

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 t

Re: [GENERAL] user defined XML aggregate not working as (i think) it should

2012-10-03 Thread Tom Lane
"Rhys A.D. Stewart" writes: > I have an xml aggregate function that always returns 'ERROR: invalid > XML content'. However an identical function that uses text produces > valid xml with the same inputs. I believe the reason this doesn't work is that the aggregate's initial value is faulty: it's

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

2012-10-03 Thread Chris Travers
On Wed, Oct 3, 2012 at 6:25 PM, Stephen Frost wrote: > 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 c

[GENERAL] COPY FROM with BYTEA fields - escaping doesn't work

2012-10-03 Thread Toby Corkindale
Hi, I'm trying to use the COPY .. FROM system with some data which includes binary values. They aren't large, but they include invalid UTF8 bytes, so I'm storing them into a BYTEA field. However I get errors when I try to do this.. CREATE TABLE foo (id SERIAL PRIMARY KEY, bar BYTEA); COPY fo

Re: [GENERAL] [PL/PGSQL] column name substitution in PG8.4

2012-10-03 Thread Merlin Moncure
On Wed, Oct 3, 2012 at 8:15 AM, Léon Melis wrote: > For some of my customers I wrote a PL/PGSQL function that stores the > difference between an OLD en NEW record when updating a record. This system > can be applied as a trigger on the table the customer likes to audit. > Because the function can

Re: [GENERAL] pg_typeof equivalent for numeric scale, numeric/timestamp precision?

2012-10-03 Thread Craig Ringer
On 10/03/2012 05:50 AM, Martijn van Oosterhout wrote: On Tue, Oct 02, 2012 at 10:19:18AM +0800, Craig Ringer wrote: Hi all While examining a reported issue with the JDBC driver I'm finding myself wanting SQL-level functions to get the scale and precision of a numeric result from an operation li

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

2012-10-03 Thread Craig Ringer
On 10/03/2012 07:06 PM, Chris Travers wrote: Hi all; I wanted to get opinions of folks who do a lot of this as well. LedgerSMB uses database user accounts and role grants to restrict access of the front-end application. Also posted to http://dba.stackexchange.com/questions/25357/choice-of-au

Re: [GENERAL] COPY FROM with BYTEA fields - escaping doesn't work

2012-10-03 Thread Toby Corkindale
Replying to my own question, but.. the solution seems to be in two stages. 1) Escape your binary data according to the BYTEA escape method. Eg. "Test\ff\0\9Again" becomes \x54657374ff0009416761696e 2) Escape that string as per COPY escape method. Eg. \x540065 becomes \\x540065 On 04/10/12 12:58

Re: [GENERAL] user defined XML aggregate not working as (i think) it should

2012-10-03 Thread Rhys A.D. Stewart
Thanks Tom, That was indeed the issue. Regards, Rhys On Wed, Oct 3, 2012 at 8:58 PM, Tom Lane wrote: > "Rhys A.D. Stewart" writes: >> I have an xml aggregate function that always returns 'ERROR: invalid >> XML content'. However an identical function that uses text produces >> valid xml with

Re: [GENERAL] Determining that a schema has changed for purpose of monitoring

2012-10-03 Thread Chris
On 04/10/12 01:48, Thor Michael Støre wrote: Hello. Is there a way in PostgreSQL for a client to determine that a database schema may have changed since it checked it earlier, for example to get the transaction ID or timestamp of the last successfully committed transaction that included DDL c