Search Postgresql Archives

Re: database-level lockdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


Filipe Pina said:

> I really can't find any other solution for what I need (in short: make sure
> no transactions are left out due to serialization failures)

I think you may have been too quick to rule out advisory locks as a solution. 
Yes, you will need wrappers around all other calls, but extraordinary problems 
call for extraordinary solutions.

> I could place the locks from the adapter directly at the outer transaction 
> level but I have the feeling that performance would be worse...

Well, performance has really got to take a back seat, given your other 
requirements. ;) Locking certainly *could* work - and is arguably the best 
solution, as that's what locks are for. Just have your Very Important Transaction 
retry, and upon reaching that critical number, exclusively lock just the tables 
being used, then try again. If you don't know which tables are being used, 
I suggest storing that somewhere your class can find it, or moving away 
from such a generic class.

There are other solutions (e.g. forcing conflicting processes to quit 
and sleep a second), but the locking one seems the easiest.

- -- 
Greg Sabino Mullane greg@xxxxxxxxxxxx
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201507050943
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAlWZNeoACgkQvJuQZxSWSshVngCgpzGg7/OXRcyE2JgwDxDTFr9X
o7UAn3ENNgmIVqPpR4j1kyooiu+Ool7A
=6FSv
-----END PGP SIGNATURE-----




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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux