Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-03 Thread Tom Lane
Michael Paquier writes: > On Sat, Sep 03, 2022 at 05:00:30PM -0700, Zhihong Yu wrote: >> Please see the attached patch which frees the search_message in the above >> case. > Yep, nice catch, I am reading the same thing as you do. I can see > that we already do that after a failing

Re: json docs fix jsonb_path_exists_tz again

2022-09-03 Thread Michael Paquier
On Sat, Sep 03, 2022 at 10:01:25AM -0400, Andrew Dunstan wrote: > Thanks for fixing, you beat me to it. No problem, I was just passing by :) -- Michael signature.asc Description: PGP signature

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-03 Thread Michael Paquier
On Sat, Sep 03, 2022 at 05:00:30PM -0700, Zhihong Yu wrote: >Note that *res* parameter of *ldap*_*search*_*ext*_*s()* > and *ldap*_*search*_*s()* >should be freed with *ldap*_*msgfree()* regardless of return > value of these >functions. > > Please see the attached

Re: pg_basebackup's --gzip switch misbehaves

2022-09-03 Thread Michael Paquier
On Sat, Sep 03, 2022 at 11:11:29AM -0400, Tom Lane wrote: > It makes sense that base.tar.gz is compressed a little better with > --gzip than with level-1 compression, but why is pg_wal.tar.gz not > compressed at all? It looks like the problem probably boils down to > which of "-1" and "0" means

Re: build remaining Flex files standalone

2022-09-03 Thread John Naylor
On Sat, Sep 3, 2022 at 1:29 AM Andres Freund wrote: > > Subject: [PATCH v4 01/11] Preparatory refactoring for compiling guc-file.c > > standalone > > Subject: [PATCH v4 02/11] Move private declarations shared between guc.c and > > guc-file.l to new header > > Subject: [PATCH v4 03/11] Build

Re: Schema variables - new implementation for Postgres 15

2022-09-03 Thread Julien Rouhaud
On Sat, Sep 03, 2022 at 11:00:51PM +0800, Julien Rouhaud wrote: > Hi, > > On Fri, Sep 02, 2022 at 07:42:00AM +0200, Pavel Stehule wrote: > > > > rebased today > > After some off-list discussion with Pavel, I'm sending some proposal patches > (in .txt extension) to apply to the last patchset. > >

Re: Add 64-bit XIDs into PostgreSQL 15

2022-09-03 Thread Dilip Kumar
On Mon, Jul 18, 2022 at 2:54 PM Pavel Borisov wrote: >> >> > I can agree with you that sending rebased patches too often can be a >> > little annoying. On the other hand, otherwise, it's just red in Cfbot. I >> > suppose it's much easier and more comfortable to review the patches that >> > at

Re: making relfilenodes 56 bits

2022-09-03 Thread Dilip Kumar
On Sat, Sep 3, 2022 at 5:11 PM Amit Kapila wrote: > > I have found one more issue with this approach of rewriting the > > conflicting table. Earlier I thought we could do the conflict > > checking and rewriting inside create_new_objects() right before the > > restore command. But after

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2022-09-03 Thread Reid Thompson
On Wed, 2022-08-31 at 12:34 -0500, Justin Pryzby wrote: > You should name the patches with different prefixes, like > 001,002,003  Otherwise, cfbot may try to apply them in the wrong > order. > git format-patch is the usual tool for that. Thanks for the pointer. My experience with git in the past

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-09-03 Thread Reid Thompson
On Wed, 2022-08-31 at 12:05 -0500, Justin Pryzby wrote: > > +  proargmodes => > > '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}' > > , > > In the past, there was concern about making pg_stat_activity wider by > adding information that's less-essential than what's been there

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-09-03 Thread Tom Lane
Here's a draft patch for this. It seems to work on Linux, but the Windows code is just speculation. In particular, I did path = _fullpath(NULL, fname, 0); if (path == NULL) _dosmaperr(GetLastError()); but I'm not really sure that the _dosmaperr bit is needed,

Re: warning: comparison of integer expressions of different signedness related to simd.h

2022-09-03 Thread John Naylor
On Sat, Sep 3, 2022 at 12:57 PM Tom Lane wrote: > > John Naylor writes: > > On Sat, Sep 3, 2022 at 12:30 PM Pavel Stehule > > wrote: > >> /usr/local/pgsql/master/include/server/port/simd.h: In function > >> ‘vector8_has’: > >> /usr/local/pgsql/master/include/server/port/simd.h:168:27:

freeing LDAPMessage in CheckLDAPAuth

2022-09-03 Thread Zhihong Yu
Hi, In CheckLDAPAuth(), around line 2606: if (r != LDAP_SUCCESS) { ereport(LOG, (errmsg("could not search LDAP for filter \"%s\" on server \"%s\": %s", It seems that the call to ldap_msgfree() is missing in the above case. According to

Re: Fix typo function circle_same (src/backend/utils/adt/geo_ops.c)

2022-09-03 Thread Daniel Gustafsson
> On 3 Sep 2022, at 09:36, Julien Rouhaud wrote: > Yeah, there are unfortunately a lot of problems around those and NaN, with > multiple reports in the past (I recall [1] and [2] but there were others). NaNs are indeed incredibly complicated, but I think we are sort of in a good place here

Re: allowing for control over SET ROLE

2022-09-03 Thread Jeff Davis
On Wed, 2022-08-31 at 08:56 -0400, Robert Haas wrote: > In some circumstances, it may be desirable to control this behavior. > For example, if we GRANT pg_read_all_settings TO seer, we do want the > seer to be able to read all the settings, else we would not have > granted the role. But we might

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-09-03 Thread Tom Lane
I wrote: > Andrew Dunstan writes: >> These days there seem to be library functions that do this, realpath(3) >> and canonicalize_file_name(3). The latter is what seems to be called by >> readlink(1). Should we be using one of those? > Oh! I see realpath() in POSIX, but not

Re: Solaris "sed" versus pre-v13 plpython tests

2022-09-03 Thread Noah Misch
On Thu, Sep 01, 2022 at 11:10:35AM +0200, Alvaro Herrera wrote: > On 2022-Aug-31, Noah Misch wrote: > > > On Wed, Aug 31, 2022 at 06:25:01PM -0400, Tom Lane wrote: > > > I am not completely sure why buildfarm member wrasse isn't failing > > > similarly > > > > wrasse disabled plpython in v12-,

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-09-03 Thread Tom Lane
Andrew Dunstan writes: > On 2022-09-01 Th 19:39, Tom Lane wrote: >> find_my_exec() wants to obtain an absolute, symlink-free path >> to the program's own executable, for what seem to me good >> reasons. However, chasing down symlinks is left to its >> subroutine resolve_symlinks(), which does

pg_basebackup's --gzip switch misbehaves

2022-09-03 Thread Tom Lane
I've been trying to figure out why my new buildfarm animal mamba occasionally fails the pg_basebackup tests [1][2]. I've not run that to ground yet, but one thing I've found that's consistently reproducible everywhere is that pg_basebackup's --gzip switch misbehaves. The manual says, and the

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-09-03 Thread Andrew Dunstan
On 2022-09-01 Th 19:39, Tom Lane wrote: > find_my_exec() wants to obtain an absolute, symlink-free path > to the program's own executable, for what seem to me good > reasons. However, chasing down symlinks is left to its > subroutine resolve_symlinks(), which does this: > > * To resolve a

Re: Schema variables - new implementation for Postgres 15

2022-09-03 Thread Julien Rouhaud
Hi, On Fri, Sep 02, 2022 at 07:42:00AM +0200, Pavel Stehule wrote: > > rebased today After some off-list discussion with Pavel, I'm sending some proposal patches (in .txt extension) to apply to the last patchset. To sum up, when a session issues a DROP VARIABLE, the session will receive an

Re: json docs fix jsonb_path_exists_tz again

2022-09-03 Thread Andrew Dunstan
On 2022-09-02 Fr 20:59, Michael Paquier wrote: > On Fri, Sep 02, 2022 at 04:25:38PM +0200, Erik Rijkers wrote: >> In funcs.sgml, the value fed into jsonb_path_exists_tz was wrong; fixed as >> attached. >> >> (was inadvertently reverted with the big JSON revert) > Yeah, good catch. This comes

Re: win_flex.exe (and likely win_bison.exe) isn't concurrency safe

2022-09-03 Thread Andrew Dunstan
On 2022-09-02 Fr 18:43, Andres Freund wrote: > Hi, > > building PG with meson on windows I occasionally got weird errors around > scanners. Sometimes scanner generation would fail with > > win_flex.exe: error deleting file > C:\Users\myadmin\AppData\Local\Temp\~flex_out_main_2 > > sometimes

Re: making relfilenodes 56 bits

2022-09-03 Thread Amit Kapila
On Tue, Aug 30, 2022 at 6:15 PM Dilip Kumar wrote: > > On Fri, Aug 26, 2022 at 9:33 PM Robert Haas wrote: > > > > On Fri, Aug 26, 2022 at 7:01 AM Dilip Kumar wrote: > > > While working on this solution I noticed one issue. Basically, the > > > problem is that during binary upgrade when we try

Re: add test to psql for coverage with --help, \e option, encoding option

2022-09-03 Thread Dong Wook Lee
I confirmed that I missed the patch file. And the current code is different from when I wrote the patch, so I don't think my patch will be meaningful anymore. On Sat, Sep 3, 2022 at 6:08 PM Dong Wook Lee wrote: > > Hi hackers, > I try to add to psql test about --help, \e, and the encoding

add test to psql for coverage with --help, \e option, encoding option

2022-09-03 Thread Dong Wook Lee
Hi hackers, I try to add to psql test about --help, \e, and the encoding option. --- Regards, DongWook Lee.

Re: making relfilenodes 56 bits

2022-09-03 Thread Dilip Kumar
On Sat, Sep 3, 2022 at 1:50 PM Dilip Kumar wrote: > > On Tue, Aug 30, 2022 at 9:23 PM Robert Haas wrote: > > > Well, that's very awkward. It doesn't seem like it would be very > > difficult to teach pg_upgrade to call pg_restore without --clean and > > just do the drop database itself, but that

vacuumlo: add test to vacuumlo for test coverage

2022-09-03 Thread Dong Wook Lee
Hi hackers, I write a tiny patch about vacuumlo to improve test coverage. I hope my work is meaningful. --- Regards, DongWook Lee. v1_add_test_to_vacuumlo.patch Description: Binary data

Re: making relfilenodes 56 bits

2022-09-03 Thread Dilip Kumar
On Tue, Aug 30, 2022 at 9:23 PM Robert Haas wrote: > Well, that's very awkward. It doesn't seem like it would be very > difficult to teach pg_upgrade to call pg_restore without --clean and > just do the drop database itself, but that doesn't really help, > because pg_restore will in any event be

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-09-03 Thread Michael Paquier
On Sat, Sep 03, 2022 at 10:47:32AM +0500, Ibrar Ahmed wrote: > Your patch require a rebase. Please provide the latest rebase patch. I was looking for a CF entry yesterday when I looked at this patch, missing https://commitfest.postgresql.org/39/3496/. This has been applied as of bfb9dfd. --

Re: Fix typo function circle_same (src/backend/utils/adt/geo_ops.c)

2022-09-03 Thread Julien Rouhaud
Hi, On Fri, Sep 01, 2022 at 09:55:15PM +0200, Daniel Gustafsson wrote: > > On 2 Sep 2022, at 21:22, Ranier Vilela wrote: > > > > Em sex., 2 de set. de 2022 às 16:15, Daniel Gustafsson > > escreveu: > > > On 2 Sep 2022, at 21:08, Ranier Vilela > >

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2022-09-03 Thread Julien Rouhaud
Hi, On Sat, Sep 03, 2022 at 10:36:37AM +0500, Ibrar Ahmed wrote: > > Hi Kyotaro Horiguchi, Fabien Coelho, Daniel Gustafsson, > > Since you haven't had time to write a review the last many days, the author > replied > with a rebased patch for a long time and never heard. We've taken your name >

Re: warning: comparison of integer expressions of different signedness related to simd.h

2022-09-03 Thread Pavel Stehule
so 3. 9. 2022 v 7:57 odesílatel Tom Lane napsal: > John Naylor writes: > > On Sat, Sep 3, 2022 at 12:30 PM Pavel Stehule > wrote: > >> /usr/local/pgsql/master/include/server/port/simd.h: In function > ‘vector8_has’: > >> /usr/local/pgsql/master/include/server/port/simd.h:168:27: warning: >