public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 8/8] default to --with-lz4
8+ messages / 5 participants
[nested] [flat]
* [PATCH 8/8] default to --with-lz4
@ 2021-03-10 09:14 Dilip Kumar <[email protected]>
0 siblings, 0 replies; 8+ messages in thread
From: Dilip Kumar @ 2021-03-10 09:14 UTC (permalink / raw)
this is meant to excercize the new feature in the CIs, and not meant to be merged
---
configure | 6 ++++--
configure.ac | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 387c553d5a..66b9edcc7b 100755
--- a/configure
+++ b/configure
@@ -1575,7 +1575,7 @@ Optional Packages:
--with-system-tzdata=DIR
use system time zone data in DIR
--without-zlib do not use Zlib
- --with-lz4 build with LZ4 support
+ --without-lz4 build without LZ4 support
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-ssl=LIB use LIB for SSL/TLS support (openssl)
--with-openssl obsolete spelling of --with-ssl=openssl
@@ -8598,7 +8598,9 @@ $as_echo "#define USE_LZ4 1" >>confdefs.h
esac
else
- with_lz4=no
+ with_lz4=yes
+
+$as_echo "#define USE_LZ4 1" >>confdefs.h
fi
diff --git a/configure.ac b/configure.ac
index 4cd683afb3..7907aded9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -990,8 +990,8 @@ AC_SUBST(with_zlib)
# LZ4
#
AC_MSG_CHECKING([whether to build with LZ4 support])
-PGAC_ARG_BOOL(with, lz4, no, [build with LZ4 support],
- [AC_DEFINE([USE_LZ4], 1, [Define to 1 to build with LZ4 support. (--with-lz4)])])
+PGAC_ARG_BOOL(with, lz4, yes, [build without LZ4 support],
+ [AC_DEFINE([USE_LZ4], 1, [Define to 1 to build without LZ4 support. (--without-lz4)])])
AC_MSG_RESULT([$with_lz4])
AC_SUBST(with_lz4)
--
2.17.0
--cvVnyQ+4j833TQvp--
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 18:58 Andres Freund <[email protected]>
0 siblings, 2 replies; 8+ messages in thread
From: Andres Freund @ 2023-01-11 18:58 UTC (permalink / raw)
To: Peter Geoghegan <[email protected]>; +Cc: pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
Hi,
On 2023-01-11 10:35:19 -0800, Peter Geoghegan wrote:
> On Wed, Jan 11, 2023 at 10:27 AM Andres Freund <[email protected]> wrote:
> > Therefore I'd like to add an option to the VACUUM command to use to disable
> > the use of the ringbuffer. Not sure about the name yet.
>
> Sounds like a good idea.
Any idea about the name? The obvious thing is to reference ring buffers in the
option name, but that's more of an implementation detail...
Some ideas:
USE_RING_BUFFERS on|off
SCAN_PROTECTION on|off
REUSE_BUFFERS on|off
LIMIT_BUFFER_USAGE on|off
Regards,
Andres
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 19:06 Peter Geoghegan <[email protected]>
parent: Andres Freund <[email protected]>
1 sibling, 1 reply; 8+ messages in thread
From: Peter Geoghegan @ 2023-01-11 19:06 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
On Wed, Jan 11, 2023 at 10:58 AM Andres Freund <[email protected]> wrote:
> Any idea about the name? The obvious thing is to reference ring buffers in the
> option name, but that's more of an implementation detail...
What are the chances that anybody using this feature via a manual
VACUUM command will also use INDEX_CLEANUP off? It's not really
supposed to be used routinely, at all. Right? It's just for
emergencies.
Perhaps it can be tied to INDEX_CLEANUP=off? That makes it hard to get
just the behavior you want when testing VACUUM, but maybe that doesn't
matter.
Realistically, most of the value here comes from changing the failsafe
behavior, which doesn't require the user to know anything about
VACUUM. I know that AWS has reduced the vacuum_failsafe_age default on
RDS to 1.2 billion (a decision made before I joined Amazon), so it is
already something AWS lean on quite a bit where available.
--
Peter Geoghegan
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 19:18 Andres Freund <[email protected]>
parent: Peter Geoghegan <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Andres Freund @ 2023-01-11 19:18 UTC (permalink / raw)
To: Peter Geoghegan <[email protected]>; +Cc: pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
Hi,
On 2023-01-11 11:06:26 -0800, Peter Geoghegan wrote:
> On Wed, Jan 11, 2023 at 10:58 AM Andres Freund <[email protected]> wrote:
> > Any idea about the name? The obvious thing is to reference ring buffers in the
> > option name, but that's more of an implementation detail...
>
> What are the chances that anybody using this feature via a manual
> VACUUM command will also use INDEX_CLEANUP off? It's not really
> supposed to be used routinely, at all. Right? It's just for
> emergencies.
I think it's also quite useful for e.g. vacuuming after initial data loads or
if you need to do a first vacuum after a lot of bloat accumulated due to a
stuck transaction.
> Perhaps it can be tied to INDEX_CLEANUP=off? That makes it hard to get
> just the behavior you want when testing VACUUM, but maybe that doesn't
> matter.
I don't like that - it's also quite useful to disable use of ringbuffers when
you actually need to clean up indexes. Especially when we have a lot of dead
tuples we'll rescan indexes over and over...
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 19:20 Peter Geoghegan <[email protected]>
parent: Andres Freund <[email protected]>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Geoghegan @ 2023-01-11 19:20 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
On Wed, Jan 11, 2023 at 11:18 AM Andres Freund <[email protected]> wrote:
> I don't like that - it's also quite useful to disable use of ringbuffers when
> you actually need to clean up indexes. Especially when we have a lot of dead
> tuples we'll rescan indexes over and over...
That's a fair point.
My vote goes to "REUSE_BUFFERS", then.
--
Peter Geoghegan
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 20:38 Justin Pryzby <[email protected]>
parent: Andres Freund <[email protected]>
1 sibling, 1 reply; 8+ messages in thread
From: Justin Pryzby @ 2023-01-11 20:38 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: Peter Geoghegan <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
On Wed, Jan 11, 2023 at 10:58:54AM -0800, Andres Freund wrote:
> Hi,
>
> On 2023-01-11 10:35:19 -0800, Peter Geoghegan wrote:
> > On Wed, Jan 11, 2023 at 10:27 AM Andres Freund <[email protected]> wrote:
> > > Therefore I'd like to add an option to the VACUUM command to use to disable
> > > the use of the ringbuffer. Not sure about the name yet.
> >
> > Sounds like a good idea.
>
> Any idea about the name? The obvious thing is to reference ring buffers in the
> option name, but that's more of an implementation detail...
>
> Some ideas:
>
> USE_RING_BUFFERS on|off
> REUSE_BUFFERS on|off
+1 for either of these.
I don't think it's an issue to expose implementation details here.
Anyone who wants to change this will know about the implementation
details that they're changing, and it's better to refer to it by the
same/similar name and not by some other name that's hard to find.
BTW I can't see that the ring buffer is currently exposed in any
user-facing docs for COPY/ALTER/VACUUM/CREATE ?
--
Justin
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 21:09 Andres Freund <[email protected]>
parent: Justin Pryzby <[email protected]>
0 siblings, 0 replies; 8+ messages in thread
From: Andres Freund @ 2023-01-11 21:09 UTC (permalink / raw)
To: Justin Pryzby <[email protected]>; +Cc: Peter Geoghegan <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
Hi,
On 2023-01-11 14:38:34 -0600, Justin Pryzby wrote:
> On Wed, Jan 11, 2023 at 10:58:54AM -0800, Andres Freund wrote:
> > Some ideas:
> >
> > USE_RING_BUFFERS on|off
> > REUSE_BUFFERS on|off
>
> +1 for either of these.
Then I'd go for REUSE_BUFFERS. What made you prefer it over
LIMIT_BUFFER_USAGE?
USE_BUFFER_ACCESS_STRATEGY would be a name tied to the implementation that's
not awful, I think..
> I don't think it's an issue to expose implementation details here.
> Anyone who wants to change this will know about the implementation
> details that they're changing, and it's better to refer to it by the
> same/similar name and not by some other name that's hard to find.
A ringbuffer could refer to a lot of things other than something limiting
buffer usage, that's why I don't like it.
> BTW I can't see that the ring buffer is currently exposed in any
> user-facing docs for COPY/ALTER/VACUUM/CREATE ?
Yea, there's surprisingly little in the docs about it, given how much it
influences behaviour. It's mentioned in tablesample-method.sgml, but without
explanation - and it's a page documenting C API...
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
@ 2023-01-11 21:18 Tom Lane <[email protected]>
parent: Peter Geoghegan <[email protected]>
0 siblings, 0 replies; 8+ messages in thread
From: Tom Lane @ 2023-01-11 21:18 UTC (permalink / raw)
To: Peter Geoghegan <[email protected]>; +Cc: Andres Freund <[email protected]>; pgsql-hackers; Robert Haas <[email protected]>; Melanie Plageman <[email protected]>; David Rowley <[email protected]>
Peter Geoghegan <[email protected]> writes:
> On Wed, Jan 11, 2023 at 11:18 AM Andres Freund <[email protected]> wrote:
>> I don't like that - it's also quite useful to disable use of ringbuffers when
>> you actually need to clean up indexes. Especially when we have a lot of dead
>> tuples we'll rescan indexes over and over...
> That's a fair point.
> My vote goes to "REUSE_BUFFERS", then.
I wonder whether it could make sense to allow a larger ringbuffer size,
rather than just the limit cases of "on" and "off".
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2023-01-11 21:18 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 09:14 [PATCH 8/8] default to --with-lz4 Dilip Kumar <[email protected]>
2023-01-11 18:58 Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Andres Freund <[email protected]>
2023-01-11 19:06 ` Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Peter Geoghegan <[email protected]>
2023-01-11 19:18 ` Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Andres Freund <[email protected]>
2023-01-11 19:20 ` Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Peter Geoghegan <[email protected]>
2023-01-11 21:18 ` Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Tom Lane <[email protected]>
2023-01-11 20:38 ` Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Justin Pryzby <[email protected]>
2023-01-11 21:09 ` Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Andres Freund <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox