Re: BUG #14941: Vacuum crashes

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Lyes Ameddah <lyes(dot)amd(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14941: Vacuum crashes
Date: 2017-12-18 22:18:09
Message-ID: 32F4B778-292B-41AF-891A-497B8127CD59@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 12/18/17, 3:30 PM, "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com> wrote:
> According to the following old comment, there might be reason why we
> didn't pass the information to vacuum_rel(). But your patch fetches
> the relation
> name even if the "relation" is not provided. I wonder if it can be
> problem in some cases.

Thanks for taking another look.

I've thought through a few edge cases here, but I haven't noticed
anything that I think is a problem. If an unspecified relation is
renamed prior to get_rel_name(), we'll use the updated name, which
doesn't seem like an issue. If an unspecified relation is renamed
between get_rel_name() and the log statement, we'll use the old name,
which seems possible in the current logging logic for VACUUM/ANALYZE.
And if an unspecified relation is dropped just prior to
get_rel_name(), the result will be NULL, and the logging will be
skipped (as it already is for concurrently dropped relations that are
not specified in the command).

Nathan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2017-12-19 07:02:04 Re: BUG #14973: hung queries
Previous Message Masahiko Sawada 2017-12-18 21:29:38 Re: BUG #14941: Vacuum crashes

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-12-18 22:44:22 Re: [HACKERS] Parallel Hash take II
Previous Message Masahiko Sawada 2017-12-18 21:29:38 Re: BUG #14941: Vacuum crashes