Skip to content

Commit

Permalink
Merge pull request yugabyte#82 from rkrage/repl-ident-full-perf
Browse files Browse the repository at this point in the history
Improve perf on deletes when repl ident full
  • Loading branch information
Euler Taveira de Oliveira authored Oct 30, 2018
2 parents 9e962ba + 5d6f741 commit aa4077a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions wal2json.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,13 @@ tuple_to_stringinfo(LogicalDecodingContext *ctx, TupleDesc tupdesc, HeapTuple tu
continue;
}

/* Get Datum from tuple */
origval = heap_getattr(tuple, natt + 1, tupdesc, &isnull);

/* Skip nulls iif printing key/identity */
if (isnull && replident)
continue;

typid = attr->atttypid;

/* Figure out type name */
Expand All @@ -563,13 +570,6 @@ tuple_to_stringinfo(LogicalDecodingContext *ctx, TupleDesc tupdesc, HeapTuple tu
/* Get information needed for printing values of a type */
getTypeOutputInfo(typid, &typoutput, &typisvarlena);

/* Get Datum from tuple */
origval = heap_getattr(tuple, natt + 1, tupdesc, &isnull);

/* Skip nulls iif printing key/identity */
if (isnull && replident)
continue;

/* XXX Unchanged TOAST Datum does not need to be output */
if (!isnull && typisvarlena && VARATT_IS_EXTERNAL_ONDISK(origval))
{
Expand Down

0 comments on commit aa4077a

Please sign in to comment.