Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)
Дата
Msg-id 74f02417-d18a-71dd-a406-8af41cbeb6c4@enterprisedb.com
обсуждение исходный текст
Ответ на Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)  (Christoph Berg <myon@debian.org>)
Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers

On 3/9/23 19:00, Tomas Vondra wrote:
> 
> 
> On 3/9/23 01:30, Michael Paquier wrote:
>> On Thu, Mar 09, 2023 at 12:39:08AM +0100, Tomas Vondra wrote:
>>> IMO we should fix that. We have a bunch of buildfarm members running on
>>> Ubuntu 18.04 (or older) - it's true none of them seems to be running TAP
>>> tests. But considering how trivial the fix is ...
>>>
>>> Barring objections, I'll push a fix early next week.
>>
>> +1, better to change that, thanks.  Actually, would --rm be OK even on
>> Windows?  As far as I can see, the CI detects a LZ4 command for the
>> VS2019 environment but not the liblz4 libraries that would be needed
>> to trigger the set of tests.
> 
> Thanks for noticing that. I'll investigate next week.
> 

So, here's a fix that should (I think) replace the 'lz4 --rm' with a
simple 'rm'. I have two doubts about this, though:


1) I haven't found a simple way to inject additional command into the
test. The pg_dump runs have a predefined list of "steps" to run:

  -- compress_cmd
  -- glob_patterns
  -- command_like
  -- restore_cmd

and I don't think there's a good place to inject the 'rm' so I ended up
adding a 'cleanup_cmd' right after 'compress_cmd'. But it seems a bit
strange / hacky. Maybe there's a better way?


2) I wonder if Windows will know what 'rm' means. I haven't found any
TAP test doing 'rm' and don't see 'rm' in any $ENV either.


That being said, I have no idea how to make this work on our Windows CI.
As mentioned, the environment is missing the lz4 library - there's a

  setup_additional_packages_script: |
    REM choco install -y --no-progress ...

in the .yml file, but AFAICS the chocolatey does not have lz4 :-/


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Testing autovacuum wraparound (including failsafe)