Re: pg_repack issues

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_repack issues
Date: 2014-11-12 20:33:23
Message-ID: CAK3UJRHG5tqXP8amjzJSDG+jcenmurd-5AvdNGaQPhLqFDUztg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)turnstep(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message shyamkant.dhamke 2014-11-17 10:59:55 Error: for dblink view
Previous Message John Scalia 2014-11-12 15:48:22 Performance degradation after loss of one standby