Re: [GENERAL] Finding values of bind variables

2015-04-08 Thread Rob Sargent
> On Apr 8, 2015, at 3:43 PM, Vasudevan, Ramya > wrote: > > Thank You John. > > > the state_change to idle-in-transaction took place about 0.0001 seconds > > later (so the insert took all of a millisecond). > Yes, the DML “finished” but stayed uncommitted. > > > What date/time was it when y

Re: [GENERAL] Finding values of bind variables

2015-04-08 Thread Vasudevan, Ramya
Thank You John. > the state_change to idle-in-transaction took place about 0.0001 seconds later > (so the insert took all of a millisecond). Yes, the DML “finished” but stayed uncommitted. > What date/time was it when you did that select from pg_stat_activity ? > thats how long this transact

Re: [GENERAL] Benchmarking partitioning triggers and rules

2015-04-08 Thread Tim Uckun
So is there a third and even faster way of doing this? On Wed, Apr 8, 2015 at 4:08 PM, Adrian Klaver wrote: > On 04/07/2015 07:49 PM, Tim Uckun wrote: > >> I understand that there is overhead involved in parsing the strings and >> such. The amount of overhead was surprising to me but that's ano

[GENERAL] Background worker assistance & review

2015-04-08 Thread Keith Fiske
I'm working on a background worker (BGW) for my pg_partman extension. I've gotten the basics of it working for my first round, but there's two features I'm missing that I'd like to add before release: 1) Only allow one instance of this BGW to run 2) Create a bgw_terminate_partman() function to sto

Re: [GENERAL] Finding values of bind variables

2015-04-08 Thread John R Pierce
On 4/8/2015 10:55 AM, Vasudevan, Ramya wrote: state | idle in transaction query | INSERT into distributed_events (type, action, id, properties) VALUES ($1, $2, $3, $4) RETURNING "distributed_event_id" idle means its NOT executing any query... thats just the LAST query it executed.id

Re: [GENERAL] Error Creating DBlink Extension in 9.4.1

2015-04-08 Thread Tom Lane
"Nykolyn, Andy (AS)" writes: > I get the following error in my 9.4.1 database when I issue the command: > Create extension dblink; > ERROR: could not load library "/usr/local/pgsql941/lib/dblink.so": > /usr/local/pgsql941/lib/dblink.so: undefined symbol: PQsetSingleRowMode > Is this a bug or d

[GENERAL] Error Creating DBlink Extension in 9.4.1

2015-04-08 Thread Nykolyn, Andy (AS)
I get the following error in my 9.4.1 database when I issue the command: Create extension dblink; ERROR: could not load library "/usr/local/pgsql941/lib/dblink.so": /usr/local/pgsql941/lib/dblink.so: undefined symbol: PQsetSingleRowMode Is this a bug or did I do something wrong? Any help woul

[GENERAL] Finding values of bind variables

2015-04-08 Thread Vasudevan, Ramya
I noticed 100s of waiting sessions in my production DB yesterday. Upon troubleshooting, I found an insert statement (idle in transaction) that was blocking. This is what I saw in pg_stat_activity: site=# select * from pg_stat_activity where pid=62334; -[ RECORD 1 ]+-

Re: [GENERAL] ecpg rejects input parameters

2015-04-08 Thread Adrian Klaver
On 04/08/2015 01:38 PM, Andrew Pennebaker wrote: Could you be more specific? I can't find a relevant section to address my specific problem: ecpg complaining when I try to check the syntax of my .sql files that use input parameters. I think this has more to do with pgsanity: https://github.co

Re: [GENERAL] ecpg rejects input parameters

2015-04-08 Thread Tom Lane
Andrew Pennebaker writes: > I can't find a relevant section to address my specific problem: ecpg > complaining when I try to check the syntax of my .sql files that use input > parameters. I'm not sure why you think that should work. psql and ecpg have quite distinct input languages. Both are ex

Re: [GENERAL] ecpg rejects input parameters

2015-04-08 Thread Andrew Pennebaker
Could you be more specific? I can't find a relevant section to address my specific problem: ecpg complaining when I try to check the syntax of my .sql files that use input parameters. On Wed, Apr 8, 2015 at 9:34 AM, Adrian Klaver wrote: > On 04/08/2015 07:22 AM, Andrew Pennebaker wrote: > >> Po

Re: [GENERAL] bdr.bdr_part_by_node_names does not remove node from bdr.bdr_nodes table

2015-04-08 Thread Dennis
I need to make a correct to the status of the removed node. The removed node’s status is ‘k’ not ‘r’ in the bdr.bdr_nodes table. > On Apr 8, 2015, at 10:05 AM, Dennis wrote: > > I have removed a node from a three node bdr cluster using > bdr.bdr_part_by_node_names() however I am still seeing

[GENERAL] bdr.bdr_part_by_node_names does not remove node from bdr.bdr_nodes table

2015-04-08 Thread Dennis
I have removed a node from a three node bdr cluster using bdr.bdr_part_by_node_names() however I am still seeing the removed node in the bdr.bdr_nodes table (it’s status is ‘r’.) Will the removed node entry in the bdr.bdr_nodes table be automatically removed eventually or should I delete the

Re: [GENERAL] ecpg rejects input parameters

2015-04-08 Thread Adrian Klaver
On 04/08/2015 07:22 AM, Andrew Pennebaker wrote: PostgreSQL uses a :colon syntax for parameterizing SQL commands with command line variables. create-database.sql: CREATE DATABASE :db; Usage: $ psql -f create-database.sql -v db=test However, pgsanity/ecpg rejects these. $ pgsanity create-dat

[GENERAL] ecpg rejects input parameters

2015-04-08 Thread Andrew Pennebaker
PostgreSQL uses a :colon syntax for parameterizing SQL commands with command line variables. create-database.sql: CREATE DATABASE :db; Usage: $ psql -f create-database.sql -v db=test However, pgsanity/ecpg rejects these. $ pgsanity create-database.sql line 1: ERROR: syntax error at or near ":

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
On 2015-04-08 13:10, Glyn Astill wrote: >> From: Chris Mair > > > > I think this is down to behaviour changes in glibc, there was a thread a > while ago where somebody replicating via streaming rep between with different > versions of glibc ended up in a bit of a pickle. > > http://www.postg

Re: [GENERAL] Stalled post to pgsql-general

2015-04-08 Thread Ramesh T
Yes. Its working fine. What i mean i created function to delete parts from table.Then i need to place it on pgagent. i placed function in pagent like this.. do $$ declare job_id int; begin /* add a job and get its id: */ insert into pgagent.pga_job (jobjclid, jobname) val

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Glyn Astill
> From: Chris Mair > To: Björn Lundin ; pgsql-general@postgresql.org > Cc: > Sent: Wednesday, 8 April 2015, 10:36 > Subject: Re: [GENERAL] unexpected (to me) sorting order > > >> select * from T_SORT order by NAME ; >> >> rollback; >> id |name >> + >>1

Re: [GENERAL] Serializable transaction restart/re-execute

2015-04-08 Thread Filipe Pina
Exactly, my point was not to repeat point 4 but the whole step. Upon serialization failure exception it would re-read data from database, perform the same something with data and save it. And point 2 is the part that fails in my "restart wrapper" function in the code I posted in stackoverflow, it

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Alberto Cabello Sánchez
On Wed, 08 Apr 2015 11:36:01 +0200 Chris Mair wrote: > PostreSQL relies on the OS's C lib. So this kind > of ordering problems depend on the OS' idea about > collations. > > I don't know what's the rationale behin this, > but it looks like Linux ignores the . when doing the sort. Not only '.'.

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
On 2015-04-08 11:36, Chris Mair wrote: > > I don't know what's the rationale behin this, > but it looks like Linux ignores the . when doing the sort. > Yes, I see that now, and it makes sense Thanks. -- Björn -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
On 2015-04-08 11:33, Glyn Astill wrote: > The collation of your "bnl" database is utf8, so the "." punctuation > character is seen as a "variable element" and given a lower weighting in > the sort to the rest of the characters. That's just how the collate algorithm works in UTF8. > Try with LC_C

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Chris Mair
> select * from T_SORT order by NAME ; > > rollback; > id |name > + > 1 | FINISH_110_150_1 > 2 | FINISH_110_200_1 > 3 | FINISH_1.10_20.0_3 > 4 | FINISH_1.10_20.0_4 > 5 | FINISH_1.10_30.0_3 > 6 | FINISH_1.10_30.0_4 > 7 | FINISH_120_150_1 > 8 | FINIS

Re: [GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Glyn Astill
> From: Björn Lundin >To: pgsql-general@postgresql.org >Sent: Wednesday, 8 April 2015, 10:09 >Subject: [GENERAL] unexpected (to me) sorting order > > > >Hi! >below are some commands to >replicate a strange sorting order. > >I do not see why id:s 3-6 are in the middle of the result set. > >What

[GENERAL] unexpected (to me) sorting order

2015-04-08 Thread Björn Lundin
Hi! below are some commands to replicate a strange sorting order. I do not see why id:s 3-6 are in the middle of the result set. What am I missing? begin; create table T_SORT ( ID bigint default 1 not null , -- Primary Key NAME varchar(100) default ' ' not null ); alter table T_SORT add cons