Re: Statistics Import and Export - Mailing list pgsql-hackers

From jian he
Subject Re: Statistics Import and Export
Date
Msg-id CACJufxFVQ-qWU4aU0KJDJeN1_5XEh3nhey5Vw2V5zazts7PL=A@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
hi.
now stats_lock_check_privileges comments need to change?

 * Lock relation in ShareUpdateExclusive mode, check privileges, and close the
 * relation (but retain the lock).

since the above comments will not be true for RELKIND_INDEX.
Yes, there are comments within the function explaining the exception.


maybe we can incorporate the following
    /*
     * For indexes, we follow what do_analyze_rel() does so as to avoid any
     * deadlocks with analyze/vacuum, which is to take out a
     * ShareUpdateExclusive on table/matview first and only after that take
     * a AccessShareLock on the index itself.
     */
comments into stats_lock_check_privileges comments section.

other than that, the patch fix looks good to me.



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: Pre-allocating WAL files
Next
From: Tom Lane
Date:
Subject: Re: allow trigger to get updated columns