Skip to content

Commit

Permalink
Improve perf on deletes when repl ident full
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrage committed Oct 20, 2018
1 parent 9e962ba commit 5d6f741
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 5d6f741

Please sign in to comment.