Looking at the EXPLAIN output, this fixes pushing the condition into the
resolved_groups view, so should help with the recent performance degradation
caused by upgrading Postgres. If it does, I'll roll this out more widely across
all the queries where I can.
Signed-off-by: Graham <gpe@openrs2.org>
I hope this might help with people who have problems with downloads failing
right at the end - my theory is that the transaction takes longer than the
current timeout to commit, and while it's committing there's no I/O going on to
keep the connection active.
Signed-off-by: Graham <gpe@openrs2.org>
This allows us to, for example, go from a client to its loader, or from a
worldmap.dat file to its mapview applet.
Signed-off-by: Graham <gpe@openrs2.org>
Older worldmap.dat files don't have a size.dat file. Look for labels.dat
instead, which is in both older and newer worldmap.dat files.
Signed-off-by: Graham <gpe@openrs2.org>
Depending on the order of the blobs table, the previous query would
sometimes propagate a NULL version even if another resource used by the
same loader had a version number.
Signed-off-by: Graham <gpe@openrs2.org>
There are some versions of the game where sw3d is stored outside of the
cache, so we need to support it in the client archiving code.
Signed-off-by: Graham <gpe@openrs2.org>
This isn't quite true arena allocation, as we're forwarding all requests
to an underlying ByteBufAllocator, which is likely used for other
allocations too. Under the hood it still frees all the allocations
individually, however, to the programmer it allows them to be freed in
one go. This makes writing code that uses a large number of buffers in
the same scope cleaner - particularly in encoders for file formats that
use striped encoding, like the packclass and song formats.
Signed-off-by: Graham <gpe@openrs2.org>