[PATCH] Fix ouside scope t_ctid (ItemPointerData)

2020-05-14 Thread Ranier Vilela
be good to seize the opportunity. regards, Ranier Vilela 001_fix_outside_scope_t_ctid.patch Description: Binary data

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-05-14 Thread Ranier Vilela
are any more comments/objections. > > > > The "quiet period" is over as soon as the tags appear in git. > > > > Pushed. > Thank you for the commit. regards, Ranier Vilela

Re: SLRU statistics

2020-05-13 Thread Ranier Vilela
> > Why is that necessary? A static variable is defined by C to start off > > as zeroes. > > Because SLRUStats is not a static variable. No? > IMHO, BgWriterStats have the same problem, shouldn't the same be done? /* Initialize BgWriterStats to zero */ MemSet(, 0, sizeof(BgWriterStats)); /* Initialize SLRU statistics to zero */ memset(, 0, sizeof(SLRUStats)); regards, Ranier Vilela

Re: [PATCH] Fix division by zero (explain.c)

2020-05-09 Thread Ranier Vilela
Em sáb., 9 de mai. de 2020 às 17:48, Tomas Vondra < tomas.von...@2ndquadrant.com> escreveu: > On Sat, May 09, 2020 at 02:51:50PM -0300, Ranier Vilela wrote: > >Em sáb., 9 de mai. de 2020 às 14:44, Tomas Vondra < > >tomas.von...@2ndquadrant.com> escreveu: > > &

Re: [PATCH] Fix division by zero (explain.c)

2020-05-09 Thread Ranier Vilela
Em sáb., 9 de mai. de 2020 às 14:44, Tomas Vondra < tomas.von...@2ndquadrant.com> escreveu: > On Sat, May 09, 2020 at 06:48:59AM -0300, Ranier Vilela wrote: > >Em sáb., 9 de mai. de 2020 às 01:45, Tom Lane > escreveu: > > > >> James Coleman writes: > &g

Re: [PATCH] Fix division by zero (explain.c)

2020-05-09 Thread Ranier Vilela
if (fullsortGroupInfo->groupCount == 0) > + { > + Assert(prefixsortGroupInfo->groupCount == > 0); > continue; > + } > I agree, asserts always help. regards, Ranier Vilela fix_division_by_zero_explain_v2.patch Description: Binary data

Re: [PATCH] Fix division by zero (explain.c)

2020-05-08 Thread Ranier Vilela
Em sex., 8 de mai. de 2020 às 19:02, Tomas Vondra < tomas.von...@2ndquadrant.com> escreveu: > On Thu, Apr 23, 2020 at 04:12:34PM -0400, James Coleman wrote: > >On Thu, Apr 23, 2020 at 8:38 AM Ranier Vilela > wrote: > >> > >> Hi, > >> > >> P

Re: pg_restore error message

2020-05-07 Thread Ranier Vilela
gt; > Which file? File name should be printed too like in the error check for > cfopen_read a few lines above. > Can suggest improvements? 1. free (398 line) must be pg_free(buf)'; 2. %m, is a format to parameter, right? But what parameter? Both fatal call, do not pass this parameter

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-07 Thread Ranier Vilela
Em qui., 7 de mai. de 2020 às 02:04, Victor Wagner escreveu: > В Thu, 7 May 2020 09:14:33 +0900 > Michael Paquier пишет: > > > On Wed, May 06, 2020 at 03:58:15PM -0300, Ranier Vilela wrote: > > > Hacking pgbison.pl, to print PATH, shows that the path inside > > &

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
Em qua., 6 de mai. de 2020 às 21:14, Michael Paquier escreveu: > On Wed, May 06, 2020 at 03:58:15PM -0300, Ranier Vilela wrote: > > Hacking pgbison.pl, to print PATH, shows that the path inside pgbison.pl > , > > returned to being the original, without the addition of &g

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
blem for me, I already got around the difficulty. regards, Ranier Vilela

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
Em qua., 6 de mai. de 2020 às 15:19, Ranier Vilela escreveu: > Em qua., 6 de mai. de 2020 às 14:14, Victor Wagner > escreveu: > >> В Wed, 6 May 2020 10:21:41 -0300 >> Ranier Vilela пишет: >> >> > Em qua., 6 de mai. de 2020 às 09:53, Michael Paquier >&g

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
Em qua., 6 de mai. de 2020 às 14:14, Victor Wagner escreveu: > В Wed, 6 May 2020 10:21:41 -0300 > Ranier Vilela пишет: > > > Em qua., 6 de mai. de 2020 às 09:53, Michael Paquier > > escreveu: > > > > > On Tue, May 05, 2020 at 10:16:23AM +0300, Victor Wagner

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
Em qua., 6 de mai. de 2020 às 10:25, Ranier Vilela escreveu: > Em qua., 6 de mai. de 2020 às 10:21, Ranier Vilela > escreveu: > >> Em qua., 6 de mai. de 2020 às 09:53, Michael Paquier >> escreveu: >> >>> On Tue, May 05, 2020 at 10:16:23AM +0300, Victor Wagne

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
Em qua., 6 de mai. de 2020 às 10:21, Ranier Vilela escreveu: > Em qua., 6 de mai. de 2020 às 09:53, Michael Paquier > escreveu: > >> On Tue, May 05, 2020 at 10:16:23AM +0300, Victor Wagner wrote: >> > I agree, it is better. >> >> Thanks, applied and back-patc

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-06 Thread Ranier Vilela
vestigating. regards, Ranier Vilela

Re: Unify drop-by-OID functions

2020-05-05 Thread Ranier Vilela
, indexId, indexOK, snapshot, nkeys, key); htup = systable_getnext(scan); if (HeapTupleIsValid(htup)) tid = >t_self; else tid = NULL; systable_endscan(scan); return tid; } regards, Ranier Vilela

Re: Unify drop-by-OID functions

2020-05-05 Thread Ranier Vilela
Em ter., 5 de mai. de 2020 às 18:11, Alvaro Herrera < alvhe...@2ndquadrant.com> escreveu: > On 2020-May-05, Ranier Vilela wrote: > > > And in that specific case, leaving resources blocked, which perhaps, in > my > > humble opinion, could be released quickly. > &g

Re: Unify drop-by-OID functions

2020-05-05 Thread Ranier Vilela
Em ter., 5 de mai. de 2020 às 14:57, Robert Haas escreveu: > On Tue, May 5, 2020 at 1:43 PM Ranier Vilela wrote: > > I see, the famous "cliché". > > By using the word cliché, and by putting it in quotes, you seem to > suggest that you consider my argument dubious. Ho

Re: Unify drop-by-OID functions

2020-05-05 Thread Ranier Vilela
Em ter., 5 de mai. de 2020 às 14:29, Robert Haas escreveu: > On Tue, May 5, 2020 at 1:22 PM Ranier Vilela wrote: > > Ok, so the question. If (3) is not safe, obvious we shouldn't use, and > must call table_close, after systable_endscan. > > Now (1) and (2), I would have no h

Re: Unify drop-by-OID functions

2020-05-05 Thread Ranier Vilela
Em ter., 5 de mai. de 2020 às 13:06, Robert Haas escreveu: > On Fri, May 1, 2020 at 5:32 PM Ranier Vilela wrote: > > I can suggest improvements? > > > > 1. In case Object is cached, delay open_table until the last moment, for > the row to be blocked as little as poss

Re: [REPORT] Static analys warnings

2020-05-04 Thread Ranier Vilela
, // INT bool split_only_page); static Buffer _bt_split(Relation rel, BTScanInsert itup_key, Buffer buf, Buffer cbuf, OffsetNumber newitemoff, Size newitemsz, IndexTuple newitem, IndexTuple orignewitem, IndexTuple nposting, uint16 postingoff); // UINT16 regards, Ranier Vilela

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-04 Thread Ranier Vilela
Em seg., 4 de mai. de 2020 às 02:58, Michael Paquier escreveu: > On Sun, May 03, 2020 at 04:23:24PM -0300, Ranier Vilela wrote: > > I don't know if it applies to the same case, but from the moment I > > installed python on the development machine, the Postgres build stopped > &

[REPORT] Static analys warnings

2020-05-03 Thread Ranier Vilela
((overwrite) ? PAI_OVERWRITE : 0) | \ ((is_heap) ? PAI_IS_HEAP : 0)) Typo | should be ||: ((overwrite) ? PAI_OVERWRITE : 0) || \ ((is_heap) ? PAI_IS_HEAP : 0)) regards, Ranier Vilela

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-03 Thread Ranier Vilela
comando interno ou externo, um programa operável ou um arquivo em lotes. etc Warning from build.pl Use of uninitialized value $ARGV[0] in uc at build.pl line 44. Use of uninitialized value $ARGV[0] in uc at build.pl line 48. regards, Ranier Vilela

Re: Unify drop-by-OID functions

2020-05-02 Thread Ranier Vilela
Em sáb., 2 de mai. de 2020 às 05:01, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> escreveu: > On 2020-05-01 23:31, Ranier Vilela wrote: > > I can suggest improvements? > > > > 1. In case Object is cached, delay open_table until the last moment, for > >

Re: Unify drop-by-OID functions

2020-05-01 Thread Ranier Vilela
ject->objectId); + + CatalogTupleDelete(rel, >t_self); + systable_endscan(scan); +table_close(rel, RowExclusiveLock); + } +} + regards, Ranier Vilela

Re: [PATCH] Fix possible overflow on tuplesort.c

2020-04-23 Thread Ranier Vilela
Em qui., 23 de abr. de 2020 às 16:43, Alvaro Herrera < alvhe...@2ndquadrant.com> escreveu: > On 2020-Apr-16, Ranier Vilela wrote: > > > When multiplying variables, the overflow will take place anyway, and only > > then will the meaningless product be explicitl

Re: [PATCH] FIx resource leaks (pg_resetwal.c)

2020-04-23 Thread Ranier Vilela
Em qui., 23 de abr. de 2020 às 16:43, Robert Haas escreveu: > On Thu, Apr 23, 2020 at 2:41 PM Ranier Vilela wrote: > > I do not agree in any way. At the very least what I am reporting is > suspect. And if I already propose a solution even if it is not the best, it > is much be

Re: [PATCH] FIx resource leaks (pg_resetwal.c)

2020-04-23 Thread Ranier Vilela
Em qui., 23 de abr. de 2020 às 16:27, Peter Geoghegan escreveu: > On Thu, Apr 23, 2020 at 11:41 AM Ranier Vilela > wrote: > > And if I already propose a solution even if it is not the best, it is > much better than being silent and missing the opportunity to fix a bug.

[PATCH] Fix possible Uninitialized variables (parse_manifest.c)

2020-04-23 Thread Ranier Vilela
Hi, Per Coverity. verify_manifest_checksum, declare and can utilize array of uint8, without initializing it. While here, I applied the quick exit technique, to avoid unnecessary computations, if it is possible to avoid them. regards, Ranier Vilela fix_uninitialized_array_parse_manifest.patch

Re: [PATCH] FIx resource leaks (pg_resetwal.c)

2020-04-23 Thread Ranier Vilela
Em qui., 23 de abr. de 2020 às 15:27, Andres Freund escreveu: > Hi, > > On 2020-04-23 15:20:59 -0300, Ranier Vilela wrote: > > Per Coverity. > > > > read_controlfile alloc memory with pg_malloc and fail in releasing the > > memory. > > Seriously, this is ge

[PATCH] FIx resource leaks (pg_resetwal.c)

2020-04-23 Thread Ranier Vilela
Hi, Per Coverity. read_controlfile alloc memory with pg_malloc and fail in releasing the memory. regards, Ranier Vilela fix_resource_leaks_pg_resetwal.patch Description: Binary data

[PATCH] Fix Null pointer dereferences (pgoutput.c)

2020-04-23 Thread Ranier Vilela
Hi, Per Coverity. If test oldtuple can be NULL, I mean it can really be NULL. On DELETE process, if oldtuple is NULL, log error and continue. So UPDATE must have the same treatment. regards, Ranier Vilela fix_null_pointer_dereference_pgoutput.patch Description: Binary data

[PATCH] Fix division by zero (explain.c)

2020-04-23 Thread Ranier Vilela
s (copying the tuples into a * prefix group), we don't need to do anything if there were 0 full * groups. */ regards, Ranier Vilela fix_division_by_zero_explain.patch Description: Binary data

Re: [PATCH] Fix buffer not null terminated on (ecpg lib)

2020-04-22 Thread Ranier Vilela
Em qua., 22 de abr. de 2020 às 23:27, Kyotaro Horiguchi < horikyota@gmail.com> escreveu: > Hello. > > At Wed, 22 Apr 2020 19:48:07 -0300, Ranier Vilela > wrote in > > Hi, > > strncpy, it is not a safe function and has the risk of corrupting memory. > >

Re: [PATCH] FIx explicit null dereference pointer (nbtree.c)

2020-04-22 Thread Ranier Vilela
Em qua., 22 de abr. de 2020 às 21:24, Peter Geoghegan escreveu: > On Wed, Apr 22, 2020 at 3:55 PM Ranier Vilela wrote: > > per Coverity. > > Some Postgres hackers have access to a dedicated coverity > installation, and this issue has probably already been dismissed. &g

[PATCH] FIx explicit null dereference pointer (nbtree.c)

2020-04-22 Thread Ranier Vilela
h. CID 1314742 (#2 of 2): Explicit null dereferenced (FORWARD_NULL) 6. var_deref_op: Dereferencing null pointer opaque. regards, Ranier Vilela fix_explicit_null_dereference_nbtree.patch Description: Binary data

[PATCH] Fix buffer not null terminated on (ecpg lib)

2020-04-22 Thread Ranier Vilela
Hi, strncpy, it is not a safe function and has the risk of corrupting memory. On ecpg lib, two sources, make use of strncpy risk, this patch tries to fix. 1. Make room for the last null-characte; 2. Copies Maximum number of characters - 1. per Coverity. regards, Ranier Vilela

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-22 Thread Ranier Vilela
tached patch. > I made some style changes too. 1. Change: strcpy(iso_lc_messages, "C"); to iso_lc_messages[0] = 'C'; iso_lc_messages[1] = '\0'; 2. Remove vars hyphen and underscore; 3. Avoid call second wcsrchr, if hyphen is not found. If it's not too much perfectionism. regards, Ran

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-21 Thread Ranier Vilela
is found for a locale with the format * _. * The order for search locale is essential: * Find LCType first as LOCALE_SNAME, if not found try LOCALE_SENGLISHLANGUAGENAME and * finally LOCALE_SENGLISHCOUNTRYNAME, before return. */ Typo "enumarating". 2. Maybe the fail has here: if (hyphen == NULL || underscore == NULL) Change || to &&, the logical is wrong? 3. Why iso_lc_messages[0] = '\0'? If we go call strchr, soon after, it's a waste. regards, Ranier Vilela

Re: [PATCH] Small optimization across postgres (remove strlen duplicate usage)

2020-04-19 Thread Ranier Vilela
Em dom., 19 de abr. de 2020 às 22:00, David Rowley escreveu: > On Mon, 20 Apr 2020 at 11:24, Ranier Vilela wrote: > > I tried: https://godbolt.org with: > > > > -O2: > > > > f1: > > int main (int argv, char **argc) > > { > > return strlen

Re: [PATCH] Small optimization across postgres (remove strlen duplicate usage)

2020-04-19 Thread Ranier Vilela
Em dom., 19 de abr. de 2020 às 18:38, Tom Lane escreveu: > Tomas Vondra writes: > > On Sun, Apr 19, 2020 at 11:24:38AM -0300, Ranier Vilela wrote: > >> strlen it is one of the low fruits that can be harvested. > > > Maybe there are places where this would hel

Re: [PATCH] Small optimization across postgres (remove strlen duplicate usage)

2020-04-19 Thread Ranier Vilela
main: # @main xor eax, eax cmp qword ptr [rsi], 0 seteal ret For me clearly str [0] == '\ 0', wins. regards, Ranier Vilela

Re: [PATCH] Small optimization across postgres (remove strlen duplicate usage)

2020-04-19 Thread Ranier Vilela
Em dom., 19 de abr. de 2020 às 16:33, Tomas Vondra < tomas.von...@2ndquadrant.com> escreveu: > On Sun, Apr 19, 2020 at 11:24:38AM -0300, Ranier Vilela wrote: > >Hi, > >strlen it is one of the low fruits that can be harvested. > >What is your opinion? > > >

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-19 Thread Ranier Vilela
Em dom., 19 de abr. de 2020 às 12:34, Juan José Santamaría Flecha < juanjo.santama...@gmail.com> escreveu: > > On Sun, Apr 19, 2020 at 1:58 PM Ranier Vilela wrote: > >> Em dom., 19 de abr. de 2020 às 07:16, Juan José Santamaría Flecha < >> juanjo.santama...@gmai

[PATCH] Small optimization across postgres (remove strlen duplicate usage)

2020-04-19 Thread Ranier Vilela
Hi, strlen it is one of the low fruits that can be harvested. What is your opinion? regards, Ranier Vilela remove_strlen.patch Description: Binary data

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-19 Thread Ranier Vilela
able. > > The attached results (WindowsNLSLocales.ods) come from Windows 10 (1903) > and Visual C++ build 1924, 64-bit. > > On Sat, Apr 18, 2020 at 1:43 PM Ranier Vilela wrote: > >> I have some observations about this patch, related to style, if you will >> allow m

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-18 Thread Ranier Vilela
en = wcslen(test_locale); + if (GetLocaleInfoEx(pStr, LOCALE_SENGLISHCOUNTRYNAME, + test_locale + len, LOCALE_NAME_MAX_LENGTH - len) > 0) + { + WCHAR **argv = (WCHAR **) lparam; + + if (wcsncmp(argv[0], test_locale, len) == 0) + { + wcscpy(argv[1], pStr); + return FALSE; + } + } + } + return TRUE; +} regards, Ranier Vilela

[PATCH] Fix possible overflow on tuplesort.c

2020-04-16 Thread Ranier Vilela
Hi, When multiplying variables, the overflow will take place anyway, and only then will the meaningless product be explicitly promoted to type int64. It is one of the operands that should have been cast instead to avoid the overflow. regards, Ranier Vilela

[PATCH] Tiny optimization on nbtinsert.c

2020-04-16 Thread Ranier Vilela
Hi, Avoiding some calls and set vars, when it is not necessary. best regards, Ranier Vilela nbtinsert_tiny_optimization.patch Description: Binary data

Re: [PATCH'] Variables assigned with values that is never used.

2020-04-16 Thread Ranier Vilela
Em sáb., 28 de mar. de 2020 às 10:33, Ranier Vilela escreveu: > Hi, > > Theses variables, are assigned with values that never is used and, can > safely have their values removed. > 1. https://github.com/postgres/postgres/commit/f0ca378d4c139eda99ef14998115c1674dac3fc5 diff --gi

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-15 Thread Ranier Vilela
Em qua., 15 de abr. de 2020 às 15:28, Juan José Santamaría Flecha < juanjo.santama...@gmail.com> escreveu: > > > On Wed, Apr 15, 2020 at 4:46 PM Ranier Vilela wrote: > >> Em qua., 15 de abr. de 2020 às 03:08, davinder singh < >> davindersingh2...@gmail.com&

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-15 Thread Ranier Vilela
Em qua., 15 de abr. de 2020 às 03:08, davinder singh < davindersingh2...@gmail.com> escreveu: > > Thanks for the review comments. > > On Tue, Apr 14, 2020 at 9:12 PM Ranier Vilela wrote: > >> >>I m still working on testing this patch. If anyone has Idea please &g

PG compilation error with Visual Studio 2015/2017/2019

2020-04-14 Thread Ranier Vilela
>= 0x0600 is true and loct is not used? regards, Ranier Vilela

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-09 Thread Ranier Vilela
Em qui., 9 de abr. de 2020 às 09:14, Juan José Santamaría Flecha < juanjo.santama...@gmail.com> escreveu: > > On Thu, Apr 9, 2020 at 1:56 PM Ranier Vilela wrote: > >> Attached, your patch with those considerations. >> > I see no attachment. > Sorry, my mystake.

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-09 Thread Ranier Vilela
Hi, I have a few comments about the patch, if I may. 1. Variable rc runs the risk of being used uninitialized. 2. Variable loct has a redundant declaration ( = NULL). 3. Return "C", does not solve the first case? Attached, your patch with those considerations. regards, Ranier VIlela

Re: [PATCH] Redudant initilization

2020-04-01 Thread Ranier Vilela
Hi, New patch with yours suggestions. best regards, Ranier Vilela v2_redundant_initialization.patch Description: Binary data

[PATCH] Fix type var declaration (src/backend/access/brin/brin.c)

2020-03-31 Thread Ranier Vilela
Hi, bringetbitmap function returns int64 value, but internally uses int. For prevent future bugs, fix to right type. best regards, Ranier Vilela fix_int64_brin.patch Description: Binary data

Re: [PATCH] remove condition always true (/src/backend/access/heap/vacuumlazy.c)

2020-03-31 Thread Ranier Vilela
Hi, Thanks for the commit. Ranier Vilela

Re: [PATCH] remove condition always true (/src/backend/access/heap/vacuumlazy.c)

2020-03-30 Thread Ranier Vilela
Em seg., 30 de mar. de 2020 às 18:14, Andres Freund escreveu: > Hi, > > On 2020-03-30 14:10:29 -0700, Andres Freund wrote: > > On 2020-03-30 17:08:01 -0300, Ranier Vilela wrote: > > > Em seg., 30 de mar. de 2020 às 16:05, Andres Freund < > and...@anarazel.de>

[PATCH] remove condition always true (/src/backend/access/heap/vacuumlazy.c)

2020-03-30 Thread Ranier Vilela
, apparently it checks before unlocking. best regards, Ranier Vilela remove_condition_always_true.patch Description: Binary data

[PATCH] Remove some reassigned values.

2020-03-30 Thread Ranier Vilela
Hi, This patch remove reassigned values, with safety. Plancat.c, needs a more careful review. Best regards Ranier Vilela remove_reassigned_values.patch Description: Binary data

Re: Possible copy and past error? (\usr\backend\commands\analyze.c)

2020-03-30 Thread Ranier Vilela
Em seg., 30 de mar. de 2020 às 06:06, Magnus Hagander escreveu: > On Sat, Mar 28, 2020 at 11:49 AM Ranier Vilela > wrote: > > > > Em sex., 27 de mar. de 2020 às 20:49, Tom Lane > escreveu: > >> > >> Ranier Vilela writes: > >> > Can someon

Re: Possible copy and past error? (\usr\backend\commands\analyze.c)

2020-03-30 Thread Ranier Vilela
Em seg., 30 de mar. de 2020 às 05:16, Michael Paquier escreveu: > On Sat, Mar 28, 2020 at 07:48:22AM -0300, Ranier Vilela wrote: > > I completely disagree. My tools have proven their worth, including > finding > > serious errors in the code, which fortunately have b

Re: [PATCH] Redudant initilization

2020-03-30 Thread Ranier Vilela
Em dom., 29 de mar. de 2020 às 21:57, Kyotaro Horiguchi < horikyota@gmail.com> escreveu: > Hello. > > At Sat, 28 Mar 2020 19:04:00 -0300, Ranier Vilela > wrote in > > Hi, > > This patch fixes some redundant initilization, that are safe to remove. > > &g

[PATCH] Redudant initilization

2020-03-28 Thread Ranier Vilela
Hi, This patch fixes some redundant initilization, that are safe to remove. best regards, Ranier Vilela redudant_initialization.patch Description: Binary data

[PATCH'] Variables assigned with values that is never used.

2020-03-28 Thread Ranier Vilela
Hi, Theses variables, are assigned with values that never is used and, can safely have their values removed. best regards, Ranier Vilela variables_assigned_unused_value.patch Description: Binary data

Re: Possible copy and past error? (\usr\backend\commands\analyze.c)

2020-03-28 Thread Ranier Vilela
Em sex., 27 de mar. de 2020 às 20:49, Tom Lane escreveu: > Ranier Vilela writes: > > Can someone check if there is a copy and paste error, at file: > > \usr\backend\commands\analyze.c, at lines 2225 and 2226? > > int num_mcv = stats->attr->attstattarget; >

Possible copy and past error? (\usr\backend\commands\analyze.c)

2020-03-27 Thread Ranier Vilela
stats->attr->attstattarget; int num_bins = num_mcv; To silence this alert. best regards, Ranier Vilela

Re: Broken resetting of subplan hash tables

2020-03-01 Thread Ranier Vilela
a waste if possible, resetting it. By analogy, I have code with arrays where, I reuse them, with only one line, instead of reconstructing them. a->nelts = 0; / * reset array * / If possible, doing the same for hashtables would be great. regards, Ranier Vilela

[REPORT] Possible Memory Leak Postgres Windows

2020-02-29 Thread Ranier Vilela
Hi, I'm sending this report from DrMemory, which shows some leaks from the current postgres. DrMemory is it is a reliable tool, but it is not perfect. ( https://drmemory.org/) regards, Ranier Vilela Dr. Memory version 2.2.0 build 1 built on Jul 1 2019 00:42:20 Windows version: WinVer=105;Rel

Re: [PATCH] libpq improvements and fixes

2020-02-14 Thread Ranier Vilela
Em sex., 14 de fev. de 2020 às 03:13, Michael Paquier escreveu: > On Thu, Feb 13, 2020 at 02:22:36PM -0300, Ranier Vilela wrote: > > I just kept it, even if I duplicated the error message, the style was > kept > > and in my opinion it is much more coherent and readable. >

Re: [PATCH] libpq improvements and fixes

2020-02-13 Thread Ranier Vilela
Em qua., 12 de fev. de 2020 às 22:25, Tom Lane escreveu: > Ranier Vilela writes: > > Coverity detected a dead code in the src / interfaces / libpq / fe-auth.c > > file, to correct it, a simplification was made and the oom_error goto was > > removed, since it is clea

[PATCH] libpq improvements and fixes

2020-02-12 Thread Ranier Vilela
. It makes more sense to do the basic checks, only to start communicating with the server afterwards. These changes are passing the regression tests and are in use in libpq.dll, used in production by my customers. regards, Ranier Vilela libpq.patch Description: Binary data

Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-11 Thread Ranier Vilela
Em ter., 11 de fev. de 2020 às 18:08, Andrew Dunstan < andrew.duns...@2ndquadrant.com> escreveu: > > On 2/10/20 7:13 AM, Ranier Vilela wrote: > > > > > > Unfortunately, i will have to live with 32 bits clients for a long > > time yet. > > I

Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-10 Thread Ranier Vilela
Em seg., 10 de fev. de 2020 às 10:53, Craig Ringer escreveu: > On Mon, 10 Feb 2020 at 20:14, Ranier Vilela wrote: > > > > "adminpack.obj : error LNK2019: sφmbolo externo indefinido > _Int64GetDatum referenciado na funτπo _pg_file_write > [C:\dll\postgres\adminp

Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-10 Thread Ranier Vilela
, i will have to live with 32 bits clients for a long time yet. I still have customers using Windows XP yet ... best regards, Ranier Vilela

Postgres 32 bits client compilation fail. Win32 bits client is supported?

2020-02-07 Thread Ranier Vilela
ostgres \ src \ tools \ msvc / Mkvcbuild.pm line 842. Question: Will Postgres continue to support 32-bit client? regards, Ranier Vilela

Re: [PATCH] Windows port, fix some resources leaks

2020-01-28 Thread Ranier Vilela
ybe it didn't bother anyone, because the Windows port is much less used. Anyway, I believe that freeing the memory before returning false, will not bring down the service, changing the patch to LOG, instead of FATAL. The primary error of the patch was to use FATAL. regards, Ranier Vilela

Re: [PATCH] Windows port, fix some resources leaks

2020-01-28 Thread Ranier Vilela
end/port/win32_shmem.c. On line 575 in src / backend / port / win32_shmem.c, there is a comment that tells to not use FATAL. "Don't use FATAL since we're running in the postmaster." regards, Ranier Vilela

Re: [PATCH] /src/backend/access/transam/xlog.c, tiny improvements

2020-01-27 Thread Ranier Vilela
Em dom., 26 de jan. de 2020 às 23:48, Mark Dilger < mark.dil...@enterprisedb.com> escreveu: > > On Jan 24, 2020, at 12:48 PM, Ranier Vilela wrote: > > > > 3. At function KeepLogSeg (line 9357) the test if (slotSegNo <= 0), the > var slotSegNo is uint64 and not can

Re: [PATCH] Windows port, fix some resources leaks

2020-01-27 Thread Ranier Vilela
Em dom., 26 de jan. de 2020 às 23:04, Michael Paquier escreveu: > On Fri, Jan 24, 2020 at 09:37:25AM -0300, Ranier Vilela wrote: > > Em sex., 24 de jan. de 2020 às 04:13, Michael Paquier < > mich...@paquier.xyz> > > escreveu: > >> There is some progress. You sho

[PATCH] /src/backend/access/transam/xlog.c, tiny improvements

2020-01-24 Thread Ranier Vilela
. 3. At function KeepLogSeg (line 9357) the test if (slotSegNo <= 0), the var slotSegNo is uint64 and not can be < 0. As it is a critical file, even though small, these improvements, I believe are welcome, because they improve readability. regards, Ranier Vilela xlog.patch Description:

Re: [PATCH] Windows port, fix some resources leaks

2020-01-24 Thread Ranier Vilela
Last time improvement to restricted_token.c regards, Ranier Vilela restricted_token_leaks.patch Description: Binary data

Re: [PATCH] Windows port, fix some resources leaks

2020-01-24 Thread Ranier Vilela
Em sex., 24 de jan. de 2020 às 04:13, Michael Paquier escreveu: > On Wed, Jan 22, 2020 at 05:51:51PM -0300, Ranier Vilela wrote: > > After review the patches and build all and run regress checks for each > > patch, those are the ones that don't break. > > There is some

Re: [PATCH] Windows port, fix some resources leaks

2020-01-22 Thread Ranier Vilela
Hi, After review the patches and build all and run regress checks for each patch, those are the ones that don't break. Not all leaks detected by Coverity are fixed. regards, Ranier Vilela auth_leak.patch Description: Binary data logging_leaks.patch Description: Binary data

Re: [PATCH] Windows port, fix some resources leaks

2020-01-21 Thread Ranier Vilela
ehand. The free function with variable NULL, has no effect and can be called without problems. 7. /src/backend/libpq/auth.c In case of failure, it was necessary to release the handlers properly. regards, Ranier Vilela postmaster_resource_leak.patch Description: Binary data win32_shmem_resource_leak.p

Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error

2020-01-19 Thread Ranier Vilela
Hi, Yes, but the comment it does not clarify that the return of the variable "const_one" is intentional, instead of "const_zero". Anybody with reads the source, can think which is a copy and paste mistake. regards Ranier Vilela Em dom., 19 de jan. de 2020 às 21:22, Tom Lane

[PATCH] Windows port, fix some missing locks

2020-01-19 Thread Ranier Vilela
Hi, Two possible race condition found. 1. src\backend\port\win32\signal.c (line 82) The var "pg_signal_queue", is accessed eleswhere with lock. 2. src\backend\postmaster\syslogger.c The var "rotation_requested" is accessed elsewhere with lock. regards, Ranier Vilela win

[PATCH] src\backend\utils\adt\numeric.c copy and past error

2020-01-19 Thread Ranier Vilela
Hi, Possible copy and past error, found in numeric.c. I believe I believe that the author's intention was to return const_zero. regards, Ranier Vilela numeric.patch Description: Binary data

[PATCH] Windows port, fix some resources leaks

2020-01-19 Thread Ranier Vilela
Hi, greetings everyone. Continuing the process of improving windows port, I'm trying to fix some leaks. best regards, Ranier Vilela win_resource_leak.patch Description: Binary data

Re: [PATCH] Fix expressions always false

2019-12-19 Thread Ranier Vilela
platforms than just Windows. Thank you for point me, about this. regards, Ranier Vilela Em qui., 19 de dez. de 2019 às 20:58, Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> escreveu: > Ranier Vilela writes: > > > More about expressions always false. > > 2. src/ba

[PATCH] Fix expressions always false

2019-12-19 Thread Ranier Vilela
dex is declared long. . Comparison with int limits is always false. 4. src/backend/utils/adt/network.c ip_addrsize is macro and awlays return 4 or 16 regards, Ranier Vilela diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c index dbed597816..f0ad9f23e5 100

RE: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-12-19 Thread Ranier Vilela
decent compiler, will remove, maybe, msvc not, but that's another story... Best regards, Ranier Vilela

RE: Windows port minor fixes

2019-12-18 Thread Ranier Vilela
is replying to. I can't tell if it's me doing something wrong or if live outlook can't organize it the right way. Anyway, I will switch to gmail, ranier...@gmail.com, to see if it looks better. regards, Ranier Vilela

RE: [PATCH] Windows port add support to BCryptGenRandom

2019-12-18 Thread Ranier Vilela
about: 1. This break MingW? 2. Legacy API, have to stay? 3. Perl support, pgbench specifically. If legacy API, have to stay, I have no doubt that it needs to be guarded by conditionals. Best regards, Ranier Vilela 1.

RE: [Proposal] Level4 Warnings show many shadow vars

2019-12-18 Thread Ranier Vilela
in this case, >something which could be more adapted is to remove the argument from >usage() because progname is a global variable, initialized from the >beginning in pg_restore. Yeah, this is good hint about how improve the patch. Best regards, Ranier Vilela

RE: [PATCH] Fix possible underflow in expression (maxoff - 1)

2019-12-18 Thread Ranier Vilela
f latches, it would be a warning that something is not good in the patch. Unfortunately, that would not show where in the code the problem would be. regards, Ranier Vilela

RE: [PATCH] Windows port add support to BCryptGenRandom

2019-12-17 Thread Ranier Vilela
itional use of BCryptGenRandom. Best regards, Ranier Vilela

<    3   4   5   6   7   8   9   >