Re: In pageinspect, perform clean-up after testing gin-related functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: In pageinspect, perform clean-up after testing gin-related functions
Date: 2018-07-11 17:34:49
Message-ID: 813.1531330489@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2018-07-11 12:56:49 +0530, Amit Kapila wrote:
>> Yeah, it is good practice to drop the objects at the end. It is
>> strange that original commit adfb81d9e1 has this at the end of the
>> test, but a later commit 367b99bbb1 by Tom has removed the Drop
>> statement. AFAICS, this is just a silly mistake, but I might be
>> missing something. Tom, do you remember any reason for doing so? If
>> not, then I think we can revert back that change (aka commit Kuntal's
>> patch).

> We actually sometimes intentionally want to persist objects past the end
> of the test. Allows to test pg_dump / pg_upgrade. Don't know whether
> that's the case here, but it's worthwhile to note.

I don't think our pg_dump testbed makes any use of contrib regression
tests, so that's not the reason here. I believe I took out the DROP
because it made it impossible to do additional manual tests after the end
of an installcheck run without laboriously re-creating the test table.

In other words, I disagree with Amit's opinion that it's good practice
to drop everything at the end of a test script. There are often good
reasons to leave the objects available for later use.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-07-11 17:49:06 Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Previous Message Alvaro Herrera 2018-07-11 17:33:37 Re: no partition pruning when partitioning using array type