Re: libpq compression (part 3) - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: libpq compression (part 3)
Date
Msg-id CAOYmi+=7J8+WuX5JnuhOHA9vYehbndUYaBW44u+a_x=nJgDw9Q@mail.gmail.com
Whole thread Raw
In response to Re: libpq compression (part 3)  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Responses Re: libpq compression (part 3)
List pgsql-hackers
On Fri, May 17, 2024 at 4:03 PM Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
>
> On Fri, 17 May 2024 at 23:10, Jacob Champion
> <jacob.champion@enterprisedb.com> wrote:
> > We're talking about a transport-level option, though -- I thought the
> > proposal enabled compression before authentication completed? Or has
> > that changed?
>
> I think it would make sense to only compress messages after
> authentication has completed. The gain of compressing authentication
> related packets seems pretty limited.

Okay. But if we're relying on that for its security properties, it
needs to be enforced by the server.

> > (I'm suspicious of arguments that begin "well you can already do bad
> > things"
>
> Once logged in it's really easy to max out a core of the backend
> you're connected as. There's many trivial queries you can use to do
> that. An example would be:
> SELECT sum(i) from generate_series(1, 1000000000) i;

This is just restating the "you can already do bad things" argument. I
understand that if your query gets executed, it's going to consume
resources on the thing that's executing it (for the record, though,
there are people working on constraining that). But introducing
disproportionate resource consumption into all traffic-inspecting
software, like pools and bouncers, seems like a different thing to me.
Many use cases are going to be fine with it, of course, but I don't
think it should be hand-waved.

--Jacob



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Convert node test compile-time settings into run-time parameters
Next
From: Robert Haas
Date:
Subject: Re: commitfest.postgresql.org is no longer fit for purpose