Re: [GENERAL] first_value/last_value

2016-05-19 Thread Alexey Bashtanov
extension to postgres core is not too easy and normally requires an extension to become popular and to be included in postgres distribution as a contrib module first. Regards, Alexey Bashtanov On 19/05/16 04:04, Tom Smith wrote: It would really save all the troubles for many people if postgresql has

Re: [GENERAL] Deadlock between VACUUM and ALTER TABLE commands

2016-04-15 Thread Alexey Bashtanov
On 14/04/16 18:34, Kevin Burke wrote: Unfortunately *I'm still seeing a very slow query which is affecting our tests. *It's happening with roughly the same frequency as the previous error. * * The query log is here: https://gist.github.com/kevinburkeshyp/f1a4f73f8933e027aebbc53283acced2** *

Re: [GENERAL] Deadlock between VACUUM and ALTER TABLE commands

2016-04-15 Thread Alexey Bashtanov
On 14/04/16 18:34, Kevin Burke wrote: Unfortunately *I'm still seeing a very slow query which is affecting our tests. *It's happening with roughly the same frequency as the previous error. * * The query log is here: https://gist.github.com/kevinburkeshyp/f1a4f73f8933e027aebbc53283acced2** *

Re: [GENERAL] Deadlock between VACUUM and ALTER TABLE commands

2016-04-07 Thread Alexey Bashtanov
me lock conflicting with AccessExclusiveLock you can use this table <http://www.postgresql.org/docs/9.4/static/explicit-locking.html#TABLE-LOCK-COMPATIBILITY> to determine what locks are conflicting one with another Regards, Alexey Bashtanov

[GENERAL] what database schema version management system to use?

2016-04-06 Thread Alexey Bashtanov
Hi all, I am searching for a proper database schema version management system. My criteria are the following: 0) Open-source, supports postgresql 1) Uses psql to execute changesets (to have no problems with COPY, transaction management or sophisticated DDL commands, and to benefit from scripti

Re: [GENERAL] How to diagnose max_locks_per_transaction is about to be exhausted?

2015-04-01 Thread Alexey Bashtanov
s two lines for the locks on the same object when the pids or the granted differ. Alexey Bashtanov -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] How to diagnose max_locks_per_transaction is about to be exhausted?

2015-03-31 Thread Alexey Bashtanov
the_threshold? select count(distinct relation) + count(distinct (classid, objid)) from pg_locks Best regads Alexey Bashtanov -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to hide stored procedure's bodies from specific user

2015-02-12 Thread Alexey Bashtanov
Hello, Saimon, I propose the following (ugly) solution. -- /*as some privileged user: */ begin; create table hidden_function_foo as select $code$ create function pg_temp.foo(p_input text) returns text as $$ select /*nodoby knows we are using md5*/md5('the_salt_nobody_can_see'