Looks like Michael has already sent the updated patch from the discussions in this thread so far. Let me know if anything else needs to be done.
Thanks.
On Tue, Sep 24, 2024 at 6:43 AM Christophe Pettus <xof@thebuild.com> wrote:
> On Sep 23, 2024, at 18:09, vaibhave postgres <postgresvaibhave@gmail.com> wrote: > Yes I plan on continuing with working this.
Great!
One related but not identical thing that has come up with vacuumdb is that it terminates if it's not able to connect to any database that it finds in the initial query. This can happen if pg_hba.conf denies the user that is running vacuumdb access to a database that comes up during --all. Some hosting providers (in particular, Google) create restricted databases in the cluster that a customer role can't get access to. This pretty much defeats --analyze-in-stages. My suggested fix was to terminate with an error if the initial connection fails, but continue with a warning if further connections fail.
If it seems reasonable, I'm happy to do it in a separate patch.