On Sun, Dec 21, 2014 at 12:58 PM, Tatsuo Ishii <
ishii@postgresql.org> wrote:
>
> > On Sun, Dec 14, 2014 at 11:43 AM, Tatsuo Ishii <
ishii@postgresql.org> wrote:
> >>> If we care enough about that case to attempt the vacuum anyway then we
> >>> need to do something about the error message; either squelch it or
> >>> check for the existence of the tables before attempting to
> >>> vacuum. Since there's no way to squelch in the server logfile, I think
> >>> checking for the table is the right answer.
> >>
> >> Fair enough. I will come up with "checking for table before vacuum"
> >> approach.
> >
> > +1 for this approach.
>
> Here is the patch I promised.
>
Some comments:
- Error to apply to the current master:
$ git apply /home/fabrizio/Downloads/pgbench-f-noexit-v2.patch
/home/fabrizio/Downloads/pgbench-f-noexit-v2.patch:9: trailing whitespace.
static void executeStatement2(PGconn *con, const char *sql, const char *table);
/home/fabrizio/Downloads/pgbench-f-noexit-v2.patch:10: trailing whitespace.
static bool is_table_exists(PGconn *con, const char *table);
/home/fabrizio/Downloads/pgbench-f-noexit-v2.patch:18: trailing whitespace.
/* call executeStatement() if table exists */
/home/fabrizio/Downloads/pgbench-f-noexit-v2.patch:19: trailing whitespace.
static void
/home/fabrizio/Downloads/pgbench-f-noexit-v2.patch:20: trailing whitespace.
executeStatement2(PGconn *con, const char *sql, const char *table)
error: patch failed: contrib/pgbench/pgbench.c:88
error: contrib/pgbench/pgbench.c: patch does not apply
+static void executeStatement2(PGconn *con, const char *sql, const char *table);