pg_listener entries deleted under heavy NOTIFY load only on Windows - Mailing list pgsql-bugs

From Ilie, Radu
Subject pg_listener entries deleted under heavy NOTIFY load only on Windows
Date
Msg-id 1262016302.3302.37.camel@arc-dev2.wsicorp.com
Whole thread Raw
List pgsql-bugs
T24gYSBXaW5kb3dzIHNlcnZlciB1bmRlciBoZWF2eSBsb2FkIG9mIE5PVElG
WSBldmVudHMsIGVudHJpZXMgaW4NCnBnX2xpc3RlbmVyIHRhYmxlIGZvciBz
b21lIGV2ZW50cyBhcmUgZGVsZXRlZC4gSXQgaXMgbGlrZSBVTkxJU1RFTiB3
YXMNCmNhbGxlZC4NCg0KUG9zdGdyZVNRTCB2ZXJzaW9uOiA4LjMuOS4NCk9w
ZXJhdGluZyBTeXN0ZW06IFdpbmRvd3MgWFAuDQoNClBvc3RncmVTUUwgYmVs
aWV2ZXMgdGhhdCBpZiBpdCBmYWlscyB0byBub3RpZnkgYSBsaXN0ZW5lciAo
Ynkgc2lnbmFsaW5nDQp0aGUgcmVzcGVjdGl2ZSBiYWNrZW5kKSwgdGhlbiB0
aGUgYmFja2VuZCBkb2Vzbid0IGV4aXN0IGFueW1vcmUgYW5kIHNvDQppdCBz
aG91bGQgZ2V0IHJpZCBvZiB0aGUgcGdfbGlzdGVuZXIgZW50cnkuIFRoZSBy
ZWxldmFudCBjb2RlIGlzIGluDQpzcmMvYmFja2VuZC9jb21tYW5kcy9hc3lu
Yy5jLCBmdW5jdGlvbiBTZW5kX05vdGlmeToNCg0KCQkJaWYgKGtpbGwobGlz
dGVuZXJQSUQsIFNJR1VTUjIpIDwgMCkNCgkJCXsNCgkJCQkvKg0KCQkJCSAq
IEdldCByaWQgb2YgcGdfbGlzdGVuZXIgZW50cnkgaWYgaXQgcmVmZXJzIHRv
IGEgUElEIHRoYXQgbm8NCgkJCQkgKiBsb25nZXIgZXhpc3RzLiAgUHJlc3Vt
YWJseSwgdGhhdCBiYWNrZW5kIGNyYXNoZWQgd2l0aG91dA0KCQkJCSAqIGR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cyBtZWFucyBpdCBoZWxwcyBpbiB0aGUgY2FzZSB3aGVuIHdlIGhh
dmUgb25lIGNsaWVudCBhbHJlYWR5IHVzaW5nDQp0aGF0IGluc3RhbmNlIHRv
IHJlYWQvd3JpdGUgdG8gdGhlIHNlcnZlciBhbmQgdGhpcyBzZWNvbmQgY2xp
ZW50IHdpbGwNCndhaXQgdW50aWwgdGhlIGZpcnN0IG9uZSBmaW5pc2hlcy4g
SXQgZG9lcyBub3QgaGVscCBpZiB0aGVyZSBpcyBubw0KaW5zdGFuY2UgYXQg
YWxsLiBJbiB0aGF0IGNhc2UgdGhlIENhbGxOYW1lZFBpcGUgcmV0dXJucyBp
bW1lZGlhdGVseSB3aXRoDQpFUlJPUl9GSUxFX05PVF9GT1VORC4NCg0KVGhh
bmtzLA0KUmFkdQ0KDQoNCg==

pgsql-bugs by date:

Previous
From: Matteo Beccati
Date:
Subject: Re: BUG #5255: COUNT(*) returns wrong result with LEFT JOIN
Next
From: Heikki Linnakangas
Date:
Subject: Re: Postgresql 8.4.2, Windows XP - temporary file leak: File still referenced