[GENERAL] Re: changing port numbers so pgbouncer can read geoserver and postgres

2013-11-04 Thread si24
show the [databases] section in the pgbouncer.ini [databases] manifold = host=127.0.0.1 port=5432 dbname=manifold user=postgrest password=123ert I have tested now with both the ip address and using localhost in the host section I have also ended up swapping round the 2 port numbers so now

Re: [GENERAL] Explanantion on pgbouncer please

2013-11-04 Thread si24
everytime I change something it seems when i type in show servers in the admin console, it keeps showing 0 rows. I have gone back and forth several time trying to get this thing sorted out nut to no avail i keep getting the same message. -- View this message in context:

Re: [GENERAL] Why release index relation lock

2013-11-04 Thread sivananda reddy
Hi kurt023, 1. What's the rule of index relation locking? 2. Releasing lock is for higher concurrency, but for INSERT/UPDATE, i did not find any operation that could get benefit from releasing index relation lock? Or to say : what will happen if we treat index relation lock like heap

Re: [GENERAL] Curious question about physical files to store database

2013-11-04 Thread Albe Laurenz
Patrick Dung wrote: As I have seen, some database created or pre-allocate large physical files on the file system to as the backend of the database tablespace. For Postgresql, I have observed that it created several files in the base and global directory. It may be by design, what is

[GENERAL] Detect bin directory

2013-11-04 Thread Tiziano Valdemarin
Hi, i deploy one windows application which uses pg and since i have hundred of customers i wrote an updater (updates are mainly monthly). The updater manage pg upgrades too through uninstall and reinstall if there are major server updates to do. This process needs backup and restore and i

Re: [GENERAL] Detect bin directory

2013-11-04 Thread Tom Lane
Tiziano Valdemarin tizianovaldema...@gmail.com writes: I know the data directory path can be found in pg_settings, but what about bin? Is its path stored anywhere? It's intentionally not stored anywhere, but rather identified at runtime. I already googled the topic but found only negative

Re: [GENERAL] Postgresql 9.0.13 core dump

2013-11-04 Thread anjanu
We figured out the problem. It was not FreeBSD jail related but libxml2. We had it compiled with thread support. After we recompiled libxml with thread support disabled, the core dumps disappeared. Thanks everyone for your help. -- View this message in context:

Re: [GENERAL] Re: changing port numbers so pgbouncer can read geoserver and postgres

2013-11-04 Thread Adrian Klaver
On 11/04/2013 01:25 AM, si24 wrote: show the [databases] section in the pgbouncer.ini [databases] manifold = host=127.0.0.1 port=5432 dbname=manifold user=postgrest password=123ert I have tested now with both the ip address and using localhost in the host section I have also ended up

[GENERAL] Where can I find the 9.3 beta1 rpm now ?

2013-11-04 Thread Massimo Ortensi
Hi everybody. I downloaded and tested 9.3 beta 1 back in june and used for a while. Today I upgraded to 9.3.1 but just discovered that database cannot be directly used, so I need to switch back to the beta version in order to dump the data. Is there any site I can download the old beta rpm's ?

Re: [GENERAL] json datatype and table bloat?

2013-11-04 Thread Merlin Moncure
On Fri, Nov 1, 2013 at 1:50 PM, Tom Lane t...@sss.pgh.pa.us wrote: Gregory Haase haa...@onefreevoice.com writes: The json_data column is not accounted for in pg_stats: Ah! I hadn't twigged to the fact that your bloat measurement approach assumed you had pg_stats entries for all the columns.

[GENERAL] json datatype and table bloat?

2013-11-04 Thread Adam Jelinek
Along the lines of the equality operator; I have ran into issues trying to pivot a table/result set with a json type due what seemed to be no equality operator. On Nov 4, 2013 10:14 AM, Merlin Moncure mmonc...@gmail.comjavascript:_e({}, 'cvml', 'mmonc...@gmail.com'); wrote: On Fri, Nov 1,

[GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Jeff Amiel
PostgreSQL 9.2.4 on x86_64-pc-solaris2.10, compiled by gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath), 64-bit Have got an annoying scenario that has been creating issues for us for years…. Time to try to figure it out. Essentially, we have a user table where we maintain username, id number,

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Rob Sargent
On 11/04/2013 10:06 AM, Jeff Amiel wrote: PostgreSQL 9.2.4 on x86_64-pc-solaris2.10, compiled by gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath), 64-bit Have got an annoying scenario that has been creating issues for us for years…. Time to try to figure it out. Essentially, we have a user

Re: [GENERAL] json datatype and table bloat?

2013-11-04 Thread David Johnston
ajeli...@gmail.com wrote Along the lines of the equality operator; I have ran into issues trying to pivot a table/result set with a json type due what seemed to be no equality operator. For the curious, and also use-case considerations for development, would you be able to share what it is

[GENERAL] Suitable Index for my Table

2013-11-04 Thread Janek Sendrowski
Hi, I've got a table with many Values of the Type REAL. These are my metric distances or my pivots to my sentences. The table looks like this: ID INTEGER, distance1 REAL, distance2 REAL, distance3 REAL, distance4 REAL, ..., distance24 REAL The range of the Value is in between 0 and 1. So it

Re: [GENERAL] json datatype and table bloat?

2013-11-04 Thread Merlin Moncure
On Mon, Nov 4, 2013 at 12:14 PM, David Johnston pol...@yahoo.com wrote: ajeli...@gmail.com wrote Along the lines of the equality operator; I have ran into issues trying to pivot a table/result set with a json type due what seemed to be no equality operator. For the curious, and also

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Jeff Amiel
to: Rob Sargent The login references have nothing to do with postgres - is simply table/column names being used. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Kevin Grittner
Janek Sendrowski jane...@web.de wrote: I've got a table with many Values of the Type REAL. These are my metric distances or my pivots to my sentences. The table looks like this: ID INTEGER, distance1 REAL, distance2 REAL, distance3 REAL, distance4 REAL, ..., distance24 REAL It should

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Martijn van Oosterhout
On Mon, Nov 04, 2013 at 07:21:11PM +0100, Janek Sendrowski wrote: Hi, I've got a table with many Values of the Type REAL. These are my metric distances or my pivots to my sentences. The table looks like this: ID INTEGER, distance1 REAL, distance2 REAL, distance3 REAL, distance4 REAL,

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Rob Sargent
On 11/04/2013 11:38 AM, Jeff Amiel wrote: to: Rob Sargent The login references have nothing to do with postgres - is simply table/column names being used. I'm sorry, I thought user_profile.login_attempts was being set to zero during login (or perhaps after successfulloginin a two-step

[GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Jason Long
I would like for corresponding records in t_a to be deleted when I delete a record from t_b. This deletes from t_b when I delete from t_a, but not the other way around. I am unable to create a foreign key constraint on t_a because this table holds records from several other tables. I added a

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Adrian Klaver
On 11/04/2013 09:06 AM, Jeff Amiel wrote: PostgreSQL 9.2.4 on x86_64-pc-solaris2.10, compiled by gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath), 64-bit Have got an annoying scenario that has been creating issues for us for years…. Time to try to figure it out. Essentially, we have a user

Re: [GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Adrian Klaver
On 11/04/2013 11:44 AM, Jason Long wrote: I would like for corresponding records in t_a to be deleted when I delete a record from t_b. This deletes from t_b when I delete from t_a, but not the other way around. I am unable to create a foreign key constraint on t_a because this table holds

Re: [GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Adrian Klaver
On 11/04/2013 11:44 AM, Jason Long wrote: I would like for corresponding records in t_a to be deleted when I delete a record from t_b. This deletes from t_b when I delete from t_a, but not the other way around. I am unable to create a foreign key constraint on t_a because this table holds

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Jeff Amiel
On Monday, November 4, 2013 1:48 PM, Adrian Klaver adrian.kla...@gmail.com wrote: Any triggers on user_profile? Any FK relationship in either direction? I grepped the schema (just to be sure) - no foreign keys on columns or table at all. I do have an audit trigger on the table for

Re: [GENERAL] ON DELETE CASCADE Question

2013-11-04 Thread Elliot
On 2013-11-04 14:44, Jason Long wrote: CREATE TABLE t_a ( id bigint NOT NULL, CONSTRAINT pk_a PRIMARY KEY (id) ); CREATE TABLE t_b ( id bigint NOT NULL, CONSTRAINT pk_b PRIMARY KEY (id), CONSTRAINT fk_b_a FOREIGN KEY (id) REFERENCES t_a (id) ON DELETE CASCADE ); INSERT INTO t_a

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Adrian Klaver
On 11/04/2013 12:15 PM, Jeff Amiel wrote: On Monday, November 4, 2013 1:48 PM, Adrian Klaver adrian.kla...@gmail.com wrote: Any triggers on user_profile? Any FK relationship in either direction? I grepped the schema (just to be sure) - no foreign keys on columns or table at all. I

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Jeff Amiel
On Monday, November 4, 2013 2:25 PM, Adrian Klaver adrian.kla...@gmail.com wrote: I grepped the schema (just to be sure) - no foreign keys on columns or table at all. I do have an audit trigger on the table for updates - inserts into an audit table when changes are made and it DOES

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Adrian Klaver
On 11/04/2013 12:44 PM, Jeff Amiel wrote: On Monday, November 4, 2013 2:25 PM, Adrian Klaver adrian.kla...@gmail.com wrote: I grepped the schema (just to be sure) - no foreign keys on columns or table at all. I do have an audit trigger on the table for updates - inserts into an audit

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Rob Sargent
On 11/04/2013 01:56 PM, Adrian Klaver wrote: On 11/04/2013 12:44 PM, Jeff Amiel wrote: On Monday, November 4, 2013 2:25 PM, Adrian Klaver adrian.kla...@gmail.com wrote: I grepped the schema (just to be sure) - no foreign keys on columns or table at all. I do have an audit trigger on

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Adrian Klaver
On 11/04/2013 01:16 PM, Jeff Amiel wrote: On Monday, November 4, 2013 2:56 PM, Adrian Klaver adrian.kla...@gmail.com wrote: In the screenshot you posted what are the columns indicating, in particular the third one? Assuming the third column is pointing to the pid of the offending

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Janek Sendrowski
Thanks for your Answers!   @Martijn van Oosterhout   I am always searching for single colums. The  values are different every time, because these are distances from my new sentence to my pivots. Does the Index support a query with this WHERE statement: WHERE value BETWEEN (distance1 - radius)

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Jeff Amiel
On Monday, November 4, 2013 3:23 PM, Adrian Klaver adrian.kla...@gmail.com wrote: Probably poor choice of words:). So then, what we are looking at is other clients trying to update user_profile but not succeeding because pid 4899 is blocking. At this point all I can see is that the

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Kevin Grittner
Janek Sendrowski jane...@web.de wrote: Does the Index support a query with this WHERE statement: WHERE value BETWEEN (distance1 - radius) AND (distance1 + radius)? Note that the following are all equivalent: value BETWEEN (distance1 - radius) AND (distance1 + radius) value = (distance1 -

Re: [GENERAL] Suitable Index for my Table

2013-11-04 Thread Martijn van Oosterhout
On Mon, Nov 04, 2013 at 10:44:29PM +0100, Janek Sendrowski wrote: I am always searching for single colums. The  values are different every time, because these are distances from my new sentence to my pivots. Does the Index support a query with this WHERE statement: WHERE value BETWEEN

Re: [GENERAL] table lock when where clause uses unique constraing instead of primary key.

2013-11-04 Thread Adrian Klaver
On 11/04/2013 01:56 PM, Jeff Amiel wrote: On Monday, November 4, 2013 3:23 PM, Adrian Klaver adrian.kla...@gmail.com wrote: Probably poor choice of words:). So then, what we are looking at is other clients trying to update user_profile but not succeeding because pid 4899 is blocking. At

Re: [GENERAL] 9.1.9 - 9.1.10 causing corruption

2013-11-04 Thread Ben Chobot
Anybody? I've tried this again on another streaming replication server, and again had pg_toast errors until I re-basebackup'd it. Does it make sense to try disabling streaming replication for the backup and just use wal replay from the archive? My slave will be a bit behind, but I'll have

[GENERAL] WITH RECURSIVE doesn't work properly for me

2013-11-04 Thread Jing Fan
I use following command to get a shortest-path query: with recursive paths( src_id, dest_id, dist) as( select n1,n2,1 from nodes union select src_id, dest_id, min(dist) from ( select paths.src_id as src_id, nodes.n2 as dest_id, paths.dist+1 as dist

Re: [GENERAL] json datatype and table bloat?

2013-11-04 Thread ajeli...@gmail.com
Along the lines of the equality operator; I have ran into issues trying to pivot a table/result set with a json type due what seemed to be no equality operator. For the curious, and also use-case considerations for development, would you be able to share what it is you are doing (and

Re: [GENERAL] json datatype and table bloat?

2013-11-04 Thread Gregory Haase
While I agree that an equality operator doesn't really make sense for json operationally, there are certain maintenance reasons why it may come in handy. Removing duplicate records comes to mind. Other than adding basic stats to necessary columns, I would say that the equality operator is really

Re: [GENERAL] Explanantion on pgbouncer please

2013-11-04 Thread Jayadevan
Why don't you try adding layers one by one? 1) Ensure you can connect to PostgreSQL from psql client (on another machine) 2) Configure pgbouncer 3) See if you can connect from psql pgbouncer PostgreSQL Check the data in pgbpuncer and PostgreSQL (number of sessions, idle connections etc). You