HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

PostgreSQL network compression for result set?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlresultcompressionfornetworkset

Problem

I was reading about network compression with PostgreSQL to see if there was anything that offered that which would permit big result sets to transfer over the wire to remote web servers. It seems there is nothing of this sort. Is there a solution out there to do that, that isn't SSL?

SSL

It seems at one point there was a solution involving SSL. Having read the threads pertaining to that, it seems that the solution is no longer advisable as it leaves the system vulnerable to a CRIME worldwide bug.

  • SSL Compression doesn't work



  • sslcompression / PGSSLCOMPRESSION not behaving as documented?



Though not advisable, it seems that you can re-enable SSL Compression at least currently with OPENSSL_DEFAULT_ZLIB but that it will be removed in the future and that it's currently disabled at compiled time in openssl.

no-zlib         [default]
no-zlib-dynamic [default]

Solution

This part of the documentation describes how you can do it by first setting up an SSH tunnel (outside of Postgres) and then connecting to that. If you add the -C flag to the ssh command, it should enable compression.

https://www.postgresql.org/docs/current/static/ssh-tunnels.html

Context

StackExchange Database Administrators Q#174000, answer score: 2

Revisions (0)

No revisions yet.