From: Abbas B. <abb...@en...> - 2013-04-08 06:24:00
|
Thanks. I will commit it later today. On Mon, Apr 8, 2013 at 9:52 AM, Amit Khandekar < ami...@en...> wrote: > Hi Abbas, > > The patch looks good to go. > > -Amit > > > On 6 April 2013 01:02, Abbas Butt <abb...@en...> wrote: > >> Hi, >> >> Consider this test case when run on a single coordinator cluster. >> >> From one session acquire a lock >> >> edb@edb-virtual-machine:/usr/local/pgsql/bin$ ./psql postgres >> psql (PGXC 1.1devel, based on PG 9.2beta2) >> Type "help" for help. >> >> postgres=# select pg_try_advisory_lock(1234,5678); >> pg_try_advisory_lock >> ---------------------- >> t >> (1 row) >> >> >> and from another terminal try to acquire the same lock >> >> edb@edb-virtual-machine:/usr/local/pgsql/bin$ ./psql postgres >> psql (PGXC 1.1devel, based on PG 9.2beta2) >> Type "help" for help. >> >> postgres=# select pg_try_advisory_lock(1234,5678); >> pg_try_advisory_lock >> ---------------------- >> t >> (1 row) >> >> Note that the second request succeeds where as the lock is already held >> by the first session. >> >> The problem is that pgxc_advisory_lock neglects the return of LockAcquire >> function in case of single coordinator. >> The attached patch corrects the problem. >> >> Comments are welcome. >> >> >> -- >> Abbas >> Architect >> EnterpriseDB Corporation >> The Enterprise PostgreSQL Company >> >> Phone: 92-334-5100153 >> >> Website: www.enterprisedb.com >> EnterpriseDB Blog: http://blogs.enterprisedb.com/ >> Follow us on Twitter: http://www.twitter.com/enterprisedb >> >> This e-mail message (and any attachment) is intended for the use of >> the individual or entity to whom it is addressed. This message >> contains information from EnterpriseDB Corporation that may be >> privileged, confidential, or exempt from disclosure under applicable >> law. If you are not the intended recipient or authorized to receive >> this for the intended recipient, any use, dissemination, distribution, >> retention, archiving, or copying of this communication is strictly >> prohibited. If you have received this e-mail in error, please notify >> the sender immediately by reply e-mail and delete this message. >> >> ------------------------------------------------------------------------------ >> Minimize network downtime and maximize team effectiveness. >> Reduce network management and security costs.Learn how to hire >> the most talented Cisco Certified professionals. Visit the >> Employer Resources Portal >> http://www.cisco.com/web/learning/employer_resources/index.html >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > -- -- Abbas Architect EnterpriseDB Corporation The Enterprise PostgreSQL Company Phone: 92-334-5100153 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com/ Follow us on Twitter: http://www.twitter.com/enterprisedb This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message. |