-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pg_advisory_lock (1,2) too small to handle oid's bigger than 2GB #30
Comments
I see: the problem is that per http://www.postgresql.org/docs/current/static/datatype-oid.html, OIDs are "implemented as an unsigned four-byte integer", and the two-argument form of One option would be that we could use the single-argument form of Another option would be keeping the two-argument call to
which I think should work to squeeze those unsigned OID values into the same-sized signed int. |
Hi Josh, Thank you for taking the reins on this and providing a fix. I just tested Thanks, have a great weekend, Mark On Thu, Nov 13, 2014 at 8:55 PM, Josh Kupershmidt notifications@github.com
Mark Steben www.fb.com/DominionDealerSolutions |
Yeah, we tag releases of the "master" branch of pg_repack periodically, which are made available on PGXN as you've seen. Our master branch is pretty stable at this point; we should (hopefully) be tagging a 1.2.2 release fairly soon, though feel free to either use the fix in 4b33474 by itself or the master branch as-is until we get around to the 1.2.2 release. |
Hi Josh, We did install the master dev0 and created a new extension. We now get the pg_repack -t mailer_admin -U postgres -d mavmail -h Let me know if I need to repost this in the pg_repack issues site or if thank you, Mark On Sun, Nov 16, 2014 at 10:08 PM, Josh Kupershmidt <notifications@github.com
Mark Steben www.fb.com/DominionDealerSolutions |
problem was really about the OID being interpreted as an integer literal upon input, and overflowing its integer space before even making it into pg_try_advisory_lock(). (We do still need to add -2147483648 to make the result fit into an integer, as 4b3347 does.) Hopefully fixes issue #30, for real this time.
Josh sorry for late response. Yes this works great now. Thank you! On Thu, Nov 20, 2014 at 5:25 PM, Josh Kupershmidt notifications@github.com
Mark Steben www.fb.com/DominionDealerSolutions |
Hello,
I have a database who's table oid's exceed the two gigabyte boundary. I therefore receive this error when I attempt pg_repack on any of these tables:
pg_repack -U postgres mavmail -t mailer_admin -h prod-legacy-psql.server.int
INFO: repacking table "mailer_admin"
ERROR: query failed: ERROR: value "3048471620" is out of range for type integer
DETAIL: query was: SELECT pg_try_advisory_lock($1, $2)
Thank you
Mark Steben
Database Administrator
Dominion Dealer Solutions
tel (413-327-3045)
The text was updated successfully, but these errors were encountered: