From 6fd955e0fdae210db2d07dc3f15ddc4b974ed1c8 Mon Sep 17 00:00:00 2001 From: Amogh Bharadwaj Date: Fri, 24 May 2024 00:21:27 +0530 Subject: [PATCH] Add error log for fetch table schema (#1753) For a large number of tables in the mirror, when schema fetching for one of the tables fails, the top level caller of `getTableSchema` logs the error which can be too big to log, yielding a temporal message: ``` Complete result exceeds size limit ``` This PR adds a log so that we know which table schema fetch failed --- flow/connectors/postgres/postgres.go | 1 + 1 file changed, 1 insertion(+) diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index d8dea391de..6bd8401064 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -740,6 +740,7 @@ func (c *PostgresConnector) GetTableSchema( } tableSchema, err := c.getTableSchemaForTable(ctx, tableName, req.System) if err != nil { + c.logger.Info("error fetching schema for table "+tableName, slog.Any("error", err)) return nil, err } res[tableName] = tableSchema