Обсуждение: BUG #14154: In pgpool while using delete query inside postgresql function , it is not deletingdata from all serve
BUG #14154: In pgpool while using delete query inside postgresql function , it is not deletingdata from all serve
От
priyeshkaratha@gmail.com
Дата:
VGhlIGZvbGxvd2luZyBidWcgaGFzIGJlZW4gbG9nZ2VkIG9uIHRoZSB3ZWJz aXRlOgoKQnVnIHJlZmVyZW5jZTogICAgICAxNDE1NApMb2dnZWQgYnk6ICAg ICAgICAgIFByaXllc2ggS2FyYXRoYQpFbWFpbCBhZGRyZXNzOiAgICAgIHBy aXllc2hrYXJhdGhhQGdtYWlsLmNvbQpQb3N0Z3JlU1FMIHZlcnNpb246IDku NC4wCk9wZXJhdGluZyBzeXN0ZW06ICAgVWJ1bnR1MTQKRGVzY3JpcHRpb246 ICAgICAgICAKCg0KSSBoYXZlIGNyZWF0ZWQgZm9sbG93aW5nIGZ1bmN0aW9u IGluIHBncG9vbCAuDQoNCkNSRUFURSBPUiBSRVBMQUNFIEZ1bmN0aW9uIGZ1 bjEoSWQgaW50KQ0KUkVUVVJOUyBib29sZWFuIGFzICRleGVjdXRpb25TdGF0 dXMkDQpERUNMQVJFDQoNCkJFR0lODQogICAgREVMRVRFIEZST00gdGFibGUx IHdoZXJlIHRhYmxlMV9pZCA9ICBJZCA7IA0KICAgIERFTEVURSBmcm9tIHRh YmxlMiB3aGVyZSB0YWJsZTJfaWQgPSAgSWQgOw0KICAgIERFTEVURSBmcm9t IHRhYmxlMyB3aGVyZSB0YWJsZTNfaWQgPSAgSWQgOw0KICAgIFJFVFVSTiB0 cnVlOw0KRU5EOw0KJGV4ZWN1dGlvblN0YXR1cyQgTEFOR1VBR0UgcGxwZ3Nx bDsNCkkgcnVuIGZvbGxvd2luZyBjb21tYW5kIGluc2lkZSB0aGUgcG9zdGdy ZXMgc2hlbGwgb2YgcGdwb29sDQoNCnNlbGVjdCBmdW4xKDEpOw0KSXQgaXMg ZGVsZXRlZCB0aGUgZGF0YSBvbmx5IGZyb20gbWFzdGVyLiBJIHRyaWVkIGFn YWluIHRoZW4gaXQgaXMgZGVsZXRlZApmcm9tIGRpZmZlcmVudCBzZXJ2ZXIu U28gcmVwbGljYXRpb24gZmFpbHMgaW4gdGhpcyBjYXNlLiBCdXQgaWYgaSB1 c2UgZGVsZXRlCnF1ZXJpZXMgc2VwYXJhdGVseSB0aGVuIGl0IGlzIHdvcmtp bmcgZmluZS5JdCBpcyBkZWxldGluZyBkYXRhIGZyb20gYWxsCnNlcnZlcnMu DQoNCkRFTEVURSBGUk9NIHRhYmxlMSB3aGVyZSB0YWJsZTFfaWQgPSAgMSA7 REVMRVRFIGZyb20gdGFibGUyIHdoZXJlIHRhYmxlMl9pZAo9ICAxIDtERUxF VEUgZnJvbSB0YWJsZTMgd2hlcmUgdGFibGUzX2lkID0gIDEgOw0KUGxlYXNl IGxldCBtZSBrbm93IGhvdyB0byBmaXggdGhpcyBpc3N1ZSAuCgo=
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 =3D Id ; > DELETE from table2 where table2_id =3D Id ; > DELETE from table3 where table3_id =3D 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 =3D 1 ;DELETE from table2 where table= 2_id > =3D 1 ;DELETE from table3 where table3_id =3D 1 ; > Please let me know how to fix this issue . =E2=80=8BThis 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 =E2=80=8BHowever, unless pgpool is doing something really unusual, the tran= saction that you establish by using a function is likely disabling the very pooling behavior you are attempting to use. =E2=80=8BDavid J. =E2=80=8B