pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14154: In pgpool while using delete query inside postgresql function , it is not deletingdata from all serve
2+ messages / 2 participants
[nested] [flat]

* BUG #14154: In pgpool while using delete query inside postgresql function , it is not deletingdata from all serve
@ 2016-05-23 13:29  priyeshkaratha@gmail.com
  0 siblings, 1 reply; 2+ messages in thread

From: priyeshkaratha@gmail.com @ 2016-05-23 13:29 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14154
Logged by:          Priyesh Karatha
Email address:      priyeshkaratha@gmail.com
PostgreSQL version: 9.4.0
Operating system:   Ubuntu14
Description:        


I have created following function in pgpool .

CREATE OR REPLACE Function fun1(Id int)
RETURNS boolean as $executionStatus$
DECLARE

BEGIN
    DELETE FROM table1 where table1_id =  Id ; 
    DELETE from table2 where table2_id =  Id ;
    DELETE from table3 where table3_id =  Id ;
    RETURN true;
END;
$executionStatus$ LANGUAGE plpgsql;
I run following command inside the postgres shell of pgpool

select fun1(1);
It is deleted the data only from master. I tried again then it is deleted
from different server.So replication fails in this case. But if i use delete
queries separately then it is working fine.It is deleting data from all
servers.

DELETE FROM table1 where table1_id =  1 ;DELETE from table2 where table2_id
=  1 ;DELETE from table3 where table3_id =  1 ;
Please let me know how to fix this issue .


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #14154: In pgpool while using delete query inside postgresql function , it is not deletingdata from all serve
@ 2016-05-23 15:31  David G. Johnston <david.g.johnston@gmail.com>
  parent: priyeshkaratha@gmail.com
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2016-05-23 15:31 UTC (permalink / raw)
  To: priyeshkaratha@gmail.com; +Cc: pgsql-bugs

On Mon, May 23, 2016 at 9:29 AM, <priyeshkaratha@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14154
> Logged by:          Priyesh Karatha
> Email address:      priyeshkaratha@gmail.com
> PostgreSQL version: 9.4.0
> Operating system:   Ubuntu14
> Description:
>
>
> I have created following function in pgpool .
>
> CREATE OR REPLACE Function fun1(Id int)
> RETURNS boolean as $executionStatus$
> DECLARE
>
> BEGIN
>     DELETE FROM table1 where table1_id =  Id ;
>     DELETE from table2 where table2_id =  Id ;
>     DELETE from table3 where table3_id =  Id ;
>     RETURN true;
> END;
> $executionStatus$ LANGUAGE plpgsql;
> I run following command inside the postgres shell of pgpool
>
> select fun1(1);
> It is deleted the data only from master. I tried again then it is deleted
> from different server.So replication fails in this case. But if i use
> delete
> queries separately then it is working fine.It is deleting data from all
> servers.
>
> DELETE FROM table1 where table1_id =  1 ;DELETE from table2 where table2_id
> =  1 ;DELETE from table3 where table3_id =  1 ;
> Please let me know how to fix this issue .


​This is not a PostgreSQL bug.  Its likely not even a bug.

Please direct you question to the appropriate forum.

The following seems likely to be of help in determining where that may be:

http://www.pgpool.net/mediawiki/index.php/Mailing_lists

​However, unless pgpool is doing something really unusual, the transaction
that you establish by using a function is likely disabling the very pooling
behavior you are attempting to use.

​David J.
​

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-05-23 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-05-23 13:29 BUG #14154: In pgpool while using delete query inside postgresql function , it is not deletingdata from all serve priyeshkaratha@gmail.com
2016-05-23 15:31 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox