Re: PATCH: Unlogged tables re-initialization tests

Поиск
Список
Период
Сортировка
Искать
От
David Steele
Тема
Re: PATCH: Unlogged tables re-initialization tests
Дата
Msg-id
6bc5d931-5b00-279f-f65a-26e32de400a6@pgmasters.net
Ответ на
Список
Дерево обсуждения
PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Re: PATCH: Unlogged tables re-initialization tests Thomas Munro <thomas.munro@enterprisedb.com>
Re: PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Re: PATCH: Unlogged tables re-initialization tests Michael Paquier <michael@paquier.xyz>
Re: PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Re: PATCH: Unlogged tables re-initialization tests Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: PATCH: Unlogged tables re-initialization tests Michael Paquier <michael@paquier.xyz>
Re: PATCH: Unlogged tables re-initialization tests Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Re: PATCH: Unlogged tables re-initialization tests ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Re: PATCH: Unlogged tables re-initialization tests Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: PATCH: Unlogged tables re-initialization tests Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Re: PATCH: Unlogged tables re-initialization tests Michael Paquier <michael@paquier.xyz>
Re: PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Re: PATCH: Unlogged tables re-initialization tests Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: PATCH: Unlogged tables re-initialization tests David Steele <david@pgmasters.net>
Thanks for reviewing, Peter.

On 3/9/18 5:23 PM, Peter Eisentraut wrote:
> This seems like a useful test.
> 
> On 3/5/18 12:35, David Steele wrote:
>> +mkdir($tablespaceDir)
>> +	or die "unable to mkdir \"$tablespaceDir\"";
> 
> Use BAIL_OUT instead of die in tests.

Done.

>> +	$ts1UnloggedPath = $node->safe_psql('postgres',
>> +	q{select pg_relation_filepath('ts1_unlogged')});
> 
> strange indentation

Sure is.  Fixed.

>> +# Write forks to test that they are removed during recovery
>> +$node->command_ok(['touch', "$pgdata/${baseUnloggedPath}_vm"],
>> +	'touch vm fork in base');
>> +$node->command_ok(['touch', "$pgdata/${baseUnloggedPath}_fsm"],
>> +	'touch fsm fork in base');
> 
> These are not tests, just some prep work.  So they should not use
> command_ok.

Removed command_ok().

> It would probably also be better to avoid the Unix-specific touch
> command and instead use Perl code to open and write to the files.

Updated to use append_to_file().

>> +# Check unlogged table in base
>> +ok(-f "$pgdata/${baseUnloggedPath}_init", 'init fork in base');
>> +ok(-f "$pgdata/$baseUnloggedPath", 'main fork in base');
>> +ok(!-f "$pgdata/${baseUnloggedPath}_vm", 'vm fork not in base');
>> +ok(!-f "$pgdata/${baseUnloggedPath}_fsm", 'fsm fork not in base');
> 
> These test names could be a bit more verbose and distinct, for example,
> 'main fork was recreated after restart'.

Done.

A new patch is attached.

Thanks,
-- 
-David
david@pgmasters.net
В списке pgsql-hackers по дате отправления
От: Aleksander Alekseev
Дата:
От: Jeevan Chalke
Дата:
FAQ