Re: pg_repack issues - Mailing list pgsql-admin

From Josh Kupershmidt
Subject Re: pg_repack issues
Date
Msg-id CAK3UJRHG5tqXP8amjzJSDG+jcenmurd-5AvdNGaQPhLqFDUztg@mail.gmail.com
Whole thread Raw
In response to Re: pg_repack issues  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-admin
Just happened to see this thread -- the github issues page is the
proper place to send bug reports about pg_repack, and OP has opened
https://github.com/reorg/pg_repack/issues/30 already.

On Tue, Nov 11, 2014 at 9:26 PM, Greg Sabino Mullane <greg@turnstep.com> wrote:

> That was an unfortunate choice they made in having their second (int)
> argument be an OID. A quick fix would be to have it use the single (bigint)
> form of pg_try_advisory_lock. Something like this (untested):

[patch to use single-argument form of pg_try_advisory_lock]

Yeah, that would work. The reason we're using the two-argument form of
pg_try_advisory_lock() at all is an attempt to play nice with any
other applications which might also be using advisory locks; maybe
that's being excessively cautious. I don't have a strong preference,
but I believe this should also work:

SELECT pg_try_advisory_lock($1, -2147483648 + $2)

i.e. cram the unsigned 4-byte OID into a signed 4-byte integer.

Josh


pgsql-admin by date:

Previous
From: John Scalia
Date:
Subject: Performance degradation after loss of one standby
Next
From:
Date:
Subject: Error: for dblink view