Re: [PATCH] Tiny optmization.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ranier Vilela <ranier_gyn(at)hotmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Tiny optmization.
Date: 2019-11-22 22:17:33
Message-ID: 16390.1574461053@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ranier Vilela <ranier_gyn(at)hotmail(dot)com> writes:
> Redudant because he it's been dereferenced here:
> line 3410:
> cstate = BeginCopy(pstate, true, rel, NULL, InvalidOid, attnamelist, options);

Not necessarily ... the rel!=NULL code path there doesn't touch pstate,
and that seems to be what contrib/file_fdw is relying on.

Arguably, the rel==NULL code path in BeginCopy should be prepared to
support pstate being null, too. But what you proposed here is certainly
not OK.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-11-22 22:18:55 Re: [PATCH] Tiny optmization.
Previous Message Tels 2019-11-22 22:15:29 Re: backup manifests