Re: PATCH: Unlogged tables re-initialization tests

2018-03-14 Thread Peter Eisentraut
On 3/13/18 12:46, Alvaro Herrera wrote: > Dagfinn Ilmari Mannsåker wrote: > >> $SIG{__DIE__} gets called even for exceptions that would be caught by a >> surrunding eval block, so this should at the very least be: >> >> $SIG{__DIE__} = sub { BAIL_OUT(@_) unless $^S }; >> >> However, that is

Re: PATCH: Unlogged tables re-initialization tests

2018-03-14 Thread David Steele
On 3/14/18 9:07 AM, Peter Eisentraut wrote: > On 3/13/18 10:12, David Steele wrote: >> A new patch is attached. > > Committed. Thanks, Peter! -- -David da...@pgmasters.net

Re: PATCH: Unlogged tables re-initialization tests

2018-03-14 Thread Peter Eisentraut
On 3/13/18 10:12, David Steele wrote: > A new patch is attached. Committed. I removed the cleanup code at the end of the test file, since that is done automatically. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training &

Re: PATCH: Unlogged tables re-initialization tests

2018-03-13 Thread Alvaro Herrera
Dagfinn Ilmari Mannsåker wrote: > $SIG{__DIE__} gets called even for exceptions that would be caught by a > surrunding eval block, so this should at the very least be: > > $SIG{__DIE__} = sub { BAIL_OUT(@_) unless $^S }; > > However, that is still wrong, because die() and BAIL_OUT() mean >

Re: PATCH: Unlogged tables re-initialization tests

2018-03-13 Thread David Steele
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. >> +

Re: PATCH: Unlogged tables re-initialization tests

2018-03-13 Thread Michael Paquier
On Mon, Mar 12, 2018 at 02:33:18PM -0400, David Steele wrote: > On 3/12/18 11:59 AM, Dagfinn Ilmari Mannsåker wrote: >> However, that is still wrong, because die() and BAIL_OUT() mean >> different things: die() aborts the current test script, while BAIL_OUT() >> aborts the entire 'prove' run, i.e.

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread Dagfinn Ilmari Mannsåker
David Steele writes: > On 3/12/18 11:27 AM, Peter Eisentraut wrote: >> On 3/11/18 05:11, Michael Paquier wrote: >>> On Fri, Mar 09, 2018 at 05:23:48PM -0500, Peter Eisentraut wrote: This seems like a useful test. On 3/5/18 12:35, David Steele wrote: >

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread David Steele
On 3/12/18 11:27 AM, Peter Eisentraut wrote: > On 3/11/18 05:11, Michael Paquier wrote: >> On Fri, Mar 09, 2018 at 05:23:48PM -0500, 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

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread Peter Eisentraut
On 3/11/18 05:11, Michael Paquier wrote: > On Fri, Mar 09, 2018 at 05:23:48PM -0500, 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

Re: PATCH: Unlogged tables re-initialization tests

2018-03-11 Thread Michael Paquier
On Fri, Mar 09, 2018 at 05:23:48PM -0500, 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. Would it be better to make this

Re: PATCH: Unlogged tables re-initialization tests

2018-03-09 Thread Peter Eisentraut
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. > + $ts1UnloggedPath = $node->safe_psql('postgres', > + q{select

Re: PATCH: Unlogged tables re-initialization tests

2018-03-05 Thread David Steele
Hi, On 3/1/18 11:59 PM, Michael Paquier wrote: > On Thu, Mar 01, 2018 at 01:12:19PM -0500, David Steele wrote: >> But your point is well-taken. No symlinks are used in this test so it >> *should* work. >> >> Michael, what do you think? > > Perl's symlink() does not work on Windows. It does not

Re: PATCH: Unlogged tables re-initialization tests

2018-03-01 Thread Michael Paquier
On Thu, Mar 01, 2018 at 01:12:19PM -0500, David Steele wrote: > But your point is well-taken. No symlinks are used in this test so it > *should* work. > > Michael, what do you think? Perl's symlink() does not work on Windows. It does not fly higher than that, and that's the reason why a good

Re: PATCH: Unlogged tables re-initialization tests

2018-03-01 Thread David Steele
Hi Thomas, [Also pulling in Michael for Windows knowledge] On 3/1/18 12:27 AM, Thomas Munro wrote: > On Thu, Mar 1, 2018 at 9:24 AM, David Steele wrote: >> These tests were originally included in the exclude unlogged tables >> patch [1] to provide coverage for the

Re: PATCH: Unlogged tables re-initialization tests

2018-02-28 Thread Thomas Munro
On Thu, Mar 1, 2018 at 9:24 AM, David Steele wrote: > These tests were originally included in the exclude unlogged tables > patch [1] to provide coverage for the refactoring of reinit.c. Hi David, +# The following tests test symlinks. Windows doesn't have symlinks, so +#