Re: Should heapam_estimate_rel_size consider fillfactor?

2023-07-03 Thread Tomas Vondra
On 7/3/23 08:46, Peter Eisentraut wrote: > On 14.06.23 20:41, Corey Huinker wrote: >>     So maybe we should make table_block_relation_estimate_size smarter to >>     also consider the fillfactor in the "no statistics" branch, per the >>     attached patch. >> >> >> I like this a lot. The reason

Re: Autogenerate some wait events code and documentation

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 03:57:42PM +0900, Michael Paquier wrote: > I think that we should add some options to the perl script to be more > selective with the files generated. How about having two options > called --docs and --code to select one or the other, then limit what > gets generated in eac

Re: Fix regression tests to work with REGRESS_OPTS=--no-locale

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 08:48:22AM +0200, Peter Eisentraut wrote: > I think it makes sense to make those checks consistent. Thanks for the review! The last thing that sets ENCODING is test_oat_hooks, for stability. NO_LOCALE is used in test_oat_hooks and test_extensions (71cac85). I am not plann

Re: Should we remove db_user_namespace?

2023-07-03 Thread Michael Paquier
On Fri, Jun 30, 2023 at 01:05:09PM -0700, Nathan Bossart wrote: > The attached patch simply removes the GUC. I am on the side of +1'ing for the removal. -- Michael signature.asc Description: PGP signature

Re: pgbench: option delaying queries till connections establishment?

2023-07-03 Thread Fabien COELHO
Hello Dave, I am running pgbench with the following pgbench -h localhost -c 100 -j 100 -t 2 -S -s 1000 pgbench -U pgbench --protocol=simple Without pgbouncer I get around 5k TPS with pgbouncer I get around 15k TPS Looking at the code connection initiation time should not be part of the calcu

Re: Cleaning up threading code

2023-07-03 Thread Peter Eisentraut
On 10.06.23 07:26, Andres Freund wrote: -### -# Threading -### - -# XXX: About to rely on thread safety in the autoconf build, so not worth -# implementing a fallback. -cdata.se

Re: Add information about command path and version of flex in meson output

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 08:34:39AM +0200, Peter Eisentraut wrote: > Maybe this could be combined into one command? On clarity ground, I am not sure that combining both is a good idea. Perhaps the use of a different variable, like bison a few lines above, makes things cleaner? > Looks good otherwi

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-03 Thread Heikki Linnakangas
On 03/07/2023 05:59, Masahiko Sawada wrote: On Mon, Jul 3, 2023 at 11:55 AM Masahiko Sawada wrote: After further investigation, the performance degradation comes from calling posix_fallocate() (called via FileFallocate()) and pwritev() (called via FileZero) alternatively depending on how many

Re: pg_upgrade --copy-file-range

2023-07-03 Thread Peter Eisentraut
On 02.06.23 21:30, Thomas Munro wrote: I was just in a pg_upgrade unconference session at PGCon where the lack of $SUBJECT came up. This system call gives the kernel the option to use fast block cloning on XFS, ZFS (as of very recently), etc, and works on Linux and FreeBSD. It's probably much t

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-03 Thread Masahiko Sawada
On Mon, Jul 3, 2023 at 4:36 PM Heikki Linnakangas wrote: > > On 03/07/2023 05:59, Masahiko Sawada wrote: > > On Mon, Jul 3, 2023 at 11:55 AM Masahiko Sawada > > wrote: > >> > >> After further investigation, the performance degradation comes from > >> calling posix_fallocate() (called via FileFal

Re: Add information about command path and version of flex in meson output

2023-07-03 Thread Peter Eisentraut
On 03.07.23 09:30, Michael Paquier wrote: On Mon, Jul 03, 2023 at 08:34:39AM +0200, Peter Eisentraut wrote: Maybe this could be combined into one command? On clarity ground, I am not sure that combining both is a good idea. Perhaps the use of a different variable, like bison a few lines above,

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2023-07-03 Thread Palak Chaturvedi
Hi Thomas, Thank you for your suggestions. I have added the sql in the meson build as well. On Sat, 1 Jul 2023 at 03:39, Thomas Munro wrote: > > On Fri, Jun 30, 2023 at 10:47 PM Palak Chaturvedi > wrote: > > pgbench=# select count(pg_buffercache_invalidate(bufferid)) from > > pg_buffercache wher

Re: CI and test improvements

2023-07-03 Thread Peter Eisentraut
On 12.04.23 03:05, Justin Pryzby wrote: The patch is rebased now that meson is updated to avoid the windows python warnings (thanks Andres). To keep this moving along, I have committed [PATCH 3/8] cirrus/freebsd: define ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS

Re: Cleaning up threading code

2023-07-03 Thread Heikki Linnakangas
On 03/07/2023 10:29, Peter Eisentraut wrote: On 10.06.23 07:26, Andres Freund wrote: -### -# Threading -### - -# XXX: About to rely on thread safety in the autoconf build, so n

Re: On /*----- comments

2023-07-03 Thread Daniel Gustafsson
> On 30 Jun 2023, at 17:22, Tom Lane wrote: > Seems reasonable; the trailing dashes eat a line without adding much. +1 > Should we also provide specific guidance about how many leading dashes > to use for this? I vaguely recall that pgindent might only need one, > but I think using somewhere a

Re: Outdated description of PG_CACHE_LINE_SIZE

2023-07-03 Thread Heikki Linnakangas
On 01/07/2023 10:49, Julien Rouhaud wrote: Hi, I just noticed that the comment for PG_CACHE_LINE_SIZE still says that "it's currently used in xlog.c", which hasn't been true for quite some time. PFA a naive patch to make the description more generic. Applied, thanks! -- Heikki Linnakangas Ne

Re: patch: improve "user mapping not found" error message

2023-07-03 Thread Peter Eisentraut
On 23.06.23 09:45, Ian Lawrence Barwick wrote: if (!HeapTupleIsValid(tp)) + { + ForeignServer *server = GetForeignServer(serverid); + ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), -err

Re: Outdated description of PG_CACHE_LINE_SIZE

2023-07-03 Thread Julien Rouhaud
On Mon, Jul 03, 2023 at 12:01:55PM +0300, Heikki Linnakangas wrote: > On 01/07/2023 10:49, Julien Rouhaud wrote: > > > > I just noticed that the comment for PG_CACHE_LINE_SIZE still says that "it's > > currently used in xlog.c", which hasn't been true for quite some time. > > > > PFA a naive patch

Re: Should heapam_estimate_rel_size consider fillfactor?

2023-07-03 Thread Tomas Vondra
On 7/3/23 09:00, Tomas Vondra wrote: > > > On 7/3/23 08:46, Peter Eisentraut wrote: >> On 14.06.23 20:41, Corey Huinker wrote: >>>     So maybe we should make table_block_relation_estimate_size smarter to >>>     also consider the fillfactor in the "no statistics" branch, per the >>>     attac

Re: Improve list manipulation in several places

2023-07-03 Thread Peter Eisentraut
On 09.05.23 05:13, Richard Guo wrote: On Tue, May 9, 2023 at 1:26 AM Alvaro Herrera > wrote: The problem I see is that each of these new functions has a single caller, and the only one that looks like it could have a performance advantage is list_cop

Re: [PATCH] Remove unnecessary unbind in LDAP search+bind mode

2023-07-03 Thread Peter Eisentraut
On 23.03.23 02:45, Anatoly Zaretsky wrote: Comments in src/backend/libpq/auth.c [1] say: (after successfully finding the final DN to check the user-supplied password against) /* Unbind and disconnect from the LDAP server */ and later /* * Need to re-initialize the LDAP connection, so that we ca

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-07-03 Thread Jakub Wartak
Hi Masahiko, Out of curiosity I've tried and it is reproducible as you have stated : XFS @ 4.18.0-425.10.1.el8_7.x86_64: [root@rockyora ~]# time ./test test.1 1 total 20 fallocate 20 filewrite 0 real0m5.868s user0m0.035s sys 0m5.716s [root@rockyora ~]# time ./te

Re: sslinfo extension - add notbefore and notafter timestamps

2023-07-03 Thread Daniel Gustafsson
> On 30 Jun 2023, at 20:12, Cary Huang wrote: > >> This needs to adjust the tests in src/test/ssl which now fails due to SELECT >> * >> returning a row which doesn't match what the test was coded for. > > Thank you so much for pointing out. I have adjusted the extra ssl test to > account for t

Re: Optionally using a better backtrace library?

2023-07-03 Thread Alvaro Herrera
Hello, On 2023-Jul-02, Andres Freund wrote: > I like that we now have a builtin backtrace ability. Unfortunately I think the > backtraces are often not very useful, because only externally visible > functions are symbolized. Agreed, these backtraces are pretty close to useless. Not completely,

why doesn't call XLogCheckInvalidPages during primary crash recovery?

2023-07-03 Thread 王伟(学弈)
Hi hackers, Startup process will record not existed pages into hash table invalid_page_tab during replaying WAL. And it would call XLogCheckInvalidPages after reaching consistent recovery state. Finally, it will PANIC or WARNING based on parameter ignore_invalid_pages if where's any invalid page

Re: Consider \v to the list of whitespace characters in the parser

2023-07-03 Thread Peter Eisentraut
On 21.06.23 08:45, Michael Paquier wrote: One thing I was wondering: has the SQL specification anything specific about the way vertical tabs should be parsed? SQL has "whitespace", which includes any Unicode character with the White_Space property (which includes \v), and , which is implement

Re: Optionally using a better backtrace library?

2023-07-03 Thread David Steele
On 7/3/23 11:58, Alvaro Herrera wrote: Nice things about libbacktrace are that the generation of stack traces is documented to be async signal safe on most platforms (with a #define to figure that out, and a more minimal safe version always available) and that it supports a wide range of platfo

Re: Commitfest manager for July

2023-07-03 Thread Daniel Gustafsson
> On 28 Jun 2023, at 09:45, Daniel Gustafsson wrote: > > A quick scan of the archives doesn't turn up anyone who has volunteered in > advance to run the upcoming commitfest. Is anyone keen at trying their hand > at > this very important community work? The July CF is good for anyone doing this

logicalrep_message_type throws an error

2023-07-03 Thread Ashutosh Bapat
Hi All, logicalrep_message_type() is used to convert logical message type code into name while prepared error context or details. Thus when this function is called probably an ERROR is already raised. If logicalrep_message_type() gets an unknown message type, it will throw an error, which will supp

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-03 Thread vignesh C
On Fri, 30 Jun 2023 at 09:55, Amit Kapila wrote: > > On Thu, Jun 29, 2023 at 9:40 PM vignesh C wrote: > > > > On Thu, 29 Jun 2023 at 09:58, Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Thursday, June 29, 2023 12:06 PM vignesh C wrote: > > > > > > > > > > Thanks for the patches. > > > > > > I

Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)

2023-07-03 Thread Ranier Vilela
Em sex., 30 de jun. de 2023 às 15:48, Karina Litskevich < litskevichkar...@gmail.com> escreveu: > Hi, > > Good catch. Indeed, eb.rel shouldn't be NULL there and the tests should be > unnecessary. > Thanks for the confirmation. > However, it doesn't follow from the code of these functions. > From

Re: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods

2023-07-03 Thread Heikki Linnakangas
On 31/05/2023 15:47, Daniel Gustafsson wrote: The SSL tests for pg_ctl restarts with an incorrect key passphrase run pg_ctl manually and use the internal method _update_pid to set the server PID file accordingly. This is needed since $node->restart will BAIL in case the restart fails, which clea

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-03 Thread vignesh C
On Wed, 28 Jun 2023 at 12:02, Hayato Kuroda (Fujitsu) wrote: > > Dear Amit, > > > > > This actually makes sense. I quickly try to do that without adding any > > > > new replication message. As you would expect, it did not work. > > > > I don't really know what's needed to make a connection to last

Re: Cleaning up array_in()

2023-07-03 Thread jian he
based on Nikhil Benesch idea. The attached diff is based on v1-0002-Rewrite-ArrayCount-to-make-dimensionality-checks.patch. diff compare v1-0002: select '{{1,{2}},{2,3}}'::text[]; ERROR: malformed array literal: "{{1,{2}},{2,3}}" LINE 1: select '{{1,{2}},{2,3}}'::text[]; ^ -DET

Re: pgbnech: allow to cancel queries during benchmark

2023-07-03 Thread Fabien COELHO
Hello Yugo-san, In thread #0, setup_cancel_handler is called before the loop, the CancelRequested flag is set when Ctrl+C is issued. In the loop, cancel requests are sent when the flag is set only in thread #0. SIGINT is blocked in other threads, but the threads will exit after their query are

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-07-03 Thread jian he
On Thu, Jun 29, 2023 at 3:51 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Jian, > > Thank you for checking my patch! > > > > > in your patch: > > > printable ASCII characters will be replaced with a hex escape. > > > > My wording is not good. I think the result will be: ASCII characters > > will be

Allow specifying a dbname in pg_basebackup connection string

2023-07-03 Thread Jelte Fennema
Normally it doesn't really matter which dbname is used in the connection string that pg_basebackup and other physical replication CLI tools use. The reason being, that physical replication does not work at the database level, but instead at the server level. So you will always get the data for all

Re: Deleting prepared statements from libpq.

2023-07-03 Thread Jelte Fennema
@Michael is anything else needed from my side? If not, I'll mark the commitfest entry as "Ready For Committer".

Re: Creation of an empty table is not fsync'd at checkpoint

2023-07-03 Thread Daniel Gustafsson
This patch required a trivial rebase after conflicting with bfcf1b3480 so I've attached a v2 to get the CFBot to run this. -- Daniel Gustafsson v2-0001-Ensure-that-creation-of-an-empty-relfile-is-fsync.patch Description: Binary data

Re: logicalrep_message_type throws an error

2023-07-03 Thread Euler Taveira
On Mon, Jul 3, 2023, at 7:30 AM, Ashutosh Bapat wrote: > logicalrep_message_type() is used to convert logical message type code > into name while prepared error context or details. Thus when this > function is called probably an ERROR is already raised. If > logicalrep_message_type() gets an unknow

Re: cataloguing NOT NULL constraints

2023-07-03 Thread Alvaro Herrera
On 2023-Jun-30, Andres Freund wrote: > On 2023-06-30 13:44:03 +0200, Alvaro Herrera wrote: > > > The main novelty in this version of the patch, is that we now emit > > "throwaway" NOT NULL constraints when a column is part of the primary > > key. Then, after the PK is created, we run a DROP for

Re: Flush SLRU counters in checkpointer process

2023-07-03 Thread Daniel Gustafsson
> On 3 Mar 2023, at 09:06, Anthonin Bonnefoy > wrote: > > Here's the patch rebased with Andres' suggestions. > Happy to update it if there's any additionalj change required. This patch crashes 031_recovery_conflict with a SIGInvalid on Windows, can you please investigate and see what might be

Re: Make uselocale protection more consistent

2023-07-03 Thread Tristan Partin
On Mon Jul 3, 2023 at 1:24 AM CDT, Thomas Munro wrote: > On Mon, Jul 3, 2023 at 6:13 PM Peter Eisentraut wrote: > > On 27.06.23 17:02, Tristan Partin wrote: > > > This is a patch which implements an issue discussed in bug #17946[0]. It > > > doesn't fix the overarching issue of the bug, but merely

Re: Incremental sort for access method with ordered scan support (amcanorderbyop)

2023-07-03 Thread Miroslav Bendik
Thanks, for suggestions. On Sun 02. 07. 2023 at 10:18 Richard Guo wrote: > 1. For comment "On success, the result list is ordered by pathkeys.", I > think it'd be more accurate if we say something like "On success, the > result list is ordered by pathkeys or a prefix list of pathkeys." > consider

Re: logicalrep_message_type throws an error

2023-07-03 Thread Ashutosh Bapat
Thanks Euler for the patch. On Mon, Jul 3, 2023 at 6:32 PM Euler Taveira wrote: > > Masahiko, since abc0910e2e0 is your patch maybe you want to take a look at it. > A couple of comments. -char * +const char * Nice improvement. logicalrep_message_type(LogicalRepMsgType action) { switch

Re: generic plans and "initial" pruning

2023-07-03 Thread Daniel Gustafsson
> On 8 Jun 2023, at 16:23, Amit Langote wrote: > > Here is a new version. The local planstate variable in the hunk below is shadowing the function parameter planstate which cause a compiler warning: @@ -1495,18 +1556,15 @@ ExecEndPlan(PlanState *planstate, EState *estate) ListCell *l;

Re: Track Oldest Initialized WAL Buffer Page

2023-07-03 Thread Heikki Linnakangas
On 07/02/2023 16:00, Bharath Rupireddy wrote: Hi, While working on [1], I was looking for a quick way to tell if a WAL record is present in the WAL buffers array without scanning but I couldn't find one. /* The end-ptr of the page that contains the record */ expectedEndPtr += XLOG_BLCKSZ - rec

Re: Add support for AT LOCAL

2023-07-03 Thread Daniel Gustafsson
> On 6 Jun 2023, at 05:13, Vik Fearing wrote: > Patch against 3f1180 attached. This patch fails to compile, the declaration of variables in the switch block needs to be scoped within a { } block. I've fixed this trivial error in the attached v2 and also reflowed the comments which now no lo

Is a pg_stat_force_next_flush() call sufficient for regression tests?

2023-07-03 Thread Tomas Vondra
Hi, I noticed eelpout failed with this in stats.sql, in the pg_stat_io tests added a couple months ago [1]: @@ -1415,7 +1415,7 @@ :io_sum_vac_strategy_after_reuses > :io_sum_vac_strategy_before_reuses; ?column? | ?column? --+-- - t| t + t| f (1 row) Th

Re: Introduce "log_connection_stages" setting.

2023-07-03 Thread Daniel Gustafsson
> On 16 May 2023, at 20:51, Sergey Dudoladov wrote: > I have attached the fourth version of the patch. This version fails the ldap_password test on all platforms on pg_ctl failing to start: [14:48:10.544] --- stdout --- [14:48:10.544] # executing test in /tmp/cirrus-ci-build/build/testrun/lda

Re: logicalrep_message_type throws an error

2023-07-03 Thread Ashutosh Bapat
On Mon, Jul 3, 2023 at 6:52 PM Ashutosh Bapat wrote: > > Thanks Euler for the patch. > > On Mon, Jul 3, 2023 at 6:32 PM Euler Taveira wrote: > > > > Masahiko, since abc0910e2e0 is your patch maybe you want to take a look at > > it. > > > > A couple of comments. > > -char * > +const char * > > Ni

Re: cataloguing NOT NULL constraints

2023-07-03 Thread Peter Eisentraut
On 30.06.23 13:44, Alvaro Herrera wrote: OK, so here's a new attempt to get this working correctly. Attached is a small fixup patch for the documentation. Furthermore, there are a few outdated comments that are probably left over from previous versions of this patch set. * src/backend/cata

Re: Mark a transaction uncommittable

2023-07-03 Thread Daniel Gustafsson
> On 5 Jun 2023, at 09:22, Gurjeet Singh wrote: > Please see attached the patch that introduces this new feature. This patch fails the guc_check test due to something missing in the sample configuration. Please send a rebased version with this test fixed. [08:31:26.680] --- stdout --- [08:31:2

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Andrew Dunstan
On 2023-07-02 Su 09:15, Andrew Dunstan wrote: The buildfarm animal fairywren has been failing the tests for pg_basebackup because it can't create a file with a path longer than 255 chars. This has just been tripped because for release 16 it's running TAP tests, and the branch name is part of

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 03.07.23 08:24, Thomas Munro wrote: I propose[1] that we get rid of HAVE_LOCALE_T completely and make "libc" provider support unconditional. It's standardised, and every target system has it, even Windows. But Windows doesn't have uselocale(). [1] https://www.postgresql.org/message-id/flat

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 16:12, Andrew Dunstan wrote: > I've pushed a better solution, which creates the file via a short symlink. > Experimentation on fairywren showed this working. The buildfarm seems a tad upset after this? -- Daniel Gustafsson

Re: logicalrep_message_type throws an error

2023-07-03 Thread Euler Taveira
On Mon, Jul 3, 2023, at 10:57 AM, Ashutosh Bapat wrote: > On Mon, Jul 3, 2023 at 6:52 PM Ashutosh Bapat > wrote: > > > > The switch is on action which is an enum. So without default it will > > provide a compilation warning for missing enums. Adding "default" case > > defeats that purpose. I think

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 03.07.23 15:21, Tristan Partin wrote: I think it would be better to keep HAVE_LOCALE_T as encompassing any of the various locale_t-using functions, rather than using HAVE_USELOCALE as a proxy for them. Otherwise you create weird situations like having #ifdef HAVE_WCSTOMBS_L inside #ifdef HAVE

Re: Add support for AT LOCAL

2023-07-03 Thread Vik Fearing
On 7/3/23 15:42, Daniel Gustafsson wrote: On 6 Jun 2023, at 05:13, Vik Fearing wrote: Patch against 3f1180 attached. This patch fails to compile, the declaration of variables in the switch block needs to be scoped within a { } block. Interesting. It compiles for me. I've fixed th

Re: Optionally using a better backtrace library?

2023-07-03 Thread Peter Eisentraut
On 02.07.23 20:31, Andres Freund wrote: A lot of platforms have "libbacktrace" available, e.g. as part of gcc. I think we should consider using it, when available, to produce more useful backtraces. I hacked it up for ereport() to debug something, and the backtraces are considerably better: Ma

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Tristan Partin
On Fri Jun 30, 2023 at 7:13 AM CDT, Joe Conway wrote: > On 6/29/23 22:13, Tristan Partin wrote: > > On Mon Jun 5, 2023 at 11:00 AM CDT, Heikki Linnakangas wrote: > >> I think the uselocale() call renders ineffective the setlocale() calls > >> that we make later. Maybe we should replace our setloca

Re: Make uselocale protection more consistent

2023-07-03 Thread Tristan Partin
On Mon Jul 3, 2023 at 9:21 AM CDT, Peter Eisentraut wrote: > On 03.07.23 15:21, Tristan Partin wrote: > >>> I think it would be better to keep HAVE_LOCALE_T as encompassing any of > >>> the various locale_t-using functions, rather than using HAVE_USELOCALE > >>> as a proxy for them. Otherwise you

Re: check_strxfrm_bug()

2023-07-03 Thread Tristan Partin
On Sun Jul 2, 2023 at 8:49 PM CDT, Thomas Munro wrote: > On Sun, Jul 2, 2023 at 4:25 AM Noah Misch wrote: > > On Wed, Jun 28, 2023 at 01:02:21PM +1200, Thomas Munro wrote: > > > On Wed, Jun 28, 2023 at 11:03 AM Thomas Munro > > > wrote: > > > > The GCC build farm has just received some SPARC har

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Andrew Dunstan
On 2023-07-03 Mo 10:16, Daniel Gustafsson wrote: On 3 Jul 2023, at 16:12, Andrew Dunstan wrote: I've pushed a better solution, which creates the file via a short symlink. Experimentation on fairywren showed this working. The buildfarm seems a tad upset after this? Yeah :-( I think it shou

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 17:18, Andrew Dunstan wrote: > On 2023-07-03 Mo 10:16, Daniel Gustafsson wrote: >>> On 3 Jul 2023, at 16:12, Andrew Dunstan >>> wrote: >>> >>> I've pushed a better solution, which creates the file via a short symlink. >>> Experimentation on fairywren showed this working. >>

Re: Inconsistent results with libc sorting on Windows

2023-07-03 Thread Alvaro Herrera
On 2023-Jun-19, Juan José Santamaría Flecha wrote: > Ok, let's see where the report goes: > > https://developercommunity.visualstudio.com/t/CompareStringEx-non-transitive/10393003?q=comparestringex Hm, so this appears to have been marked as solved by Microsoft. Can you recheck? Also, what does

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2023-07-03 Thread jian he
On Mon, Jul 3, 2023 at 4:26 PM Palak Chaturvedi wrote: > > Hi Thomas, > Thank you for your suggestions. I have added the sql in the meson > build as well. > > On Sat, 1 Jul 2023 at 03:39, Thomas Munro wrote: > > > > On Fri, Jun 30, 2023 at 10:47 PM Palak Chaturvedi > > wrote: > > > pgbench=# sel

Re: Sampling-based timing for EXPLAIN ANALYZE

2023-07-03 Thread Daniel Gustafsson
This thread has been stale since January with no movement at all during the March CF, and according to the CFBot it stopped building at all ~ 14 weeks ago. I'm marking this returned with feedback, it can be resubmitted for a future CF if someone decides to pick it up. -- Daniel Gustafsson

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Tristan Partin
Joe, The Reply-To header in your email is pointing at joe@cd, fyi. Pretty strange. -- Tristan Partin Neon (https://neon.tech)

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-07-03 Thread Daniel Gustafsson
> On 1 Mar 2023, at 10:29, Jim Jones wrote: > > On 01.03.23 01:47, Kirk Wolak wrote: >> Patch Posted with one edit, for line editings (Thanks Jim!) > The patch didn't pass the SanityCheck: > > https://cirrus-ci.com/task/5445242183221248?logs=build#L1337 > > missing a header perhaps? > > #inclu

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Tristan Partin
On Sat Jun 24, 2023 at 8:09 AM CDT, Joe Conway wrote: > Although I have not looked yet, presumably we could have similar > problems with plpython. I would like to get agreement on this approach > against plperl before diving into that though. > > Thoughts? I don't see anything immediately wrong

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Joe Conway
On 7/3/23 12:17, Tristan Partin wrote: The Reply-To header in your email is pointing at joe@cd, fyi. Pretty strange. I noticed that -- it happened only the one time, and I am not sure why. Seems fine now though. -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Joe Conway
On 7/3/23 12:25, Tristan Partin wrote: On Sat Jun 24, 2023 at 8:09 AM CDT, Joe Conway wrote: Although I have not looked yet, presumably we could have similar problems with plpython. I would like to get agreement on this approach against plperl before diving into that though. Thoughts? I don

Re: explain analyze rows=%.0f

2023-07-03 Thread Daniel Gustafsson
> On 8 Jun 2023, at 19:49, Ibrar Ahmed wrote: > On Mon, Mar 20, 2023 at 7:56 PM Gregory Stark (as CFM) > wrote: > This patch was marked Returned with Feedback and then later Waiting on > Author. And it hasn't had any updates since January. What is the state > on this

Re: Inconsistent results with libc sorting on Windows

2023-07-03 Thread Juan José Santamaría Flecha
El lun, 3 jul 2023, 17:42, Alvaro Herrera escribió: > On 2023-Jun-19, Juan José Santamaría Flecha wrote: > > > Ok, let's see where the report goes: > > > > > https://developercommunity.visualstudio.com/t/CompareStringEx-non-transitive/10393003?q=comparestringex > > Hm, so this appears to have bee

Re: [PATCH] Add <> support to sepgsql_restorecon

2023-07-03 Thread Daniel Gustafsson
> On 20 Mar 2023, at 21:17, Ted Toth wrote: > > Not this month unfortunately other work has taken precedence. I'll need to > look at what it's going to take to create a test. Hopefully I can piggyback > on an existing test. This patch has been marked Waiting on Author since January, I'm markin

Re: Fdw batch insert error out when set batch_size > 65535

2023-07-03 Thread Tomas Vondra
On 7/2/23 15:50, Tomas Vondra wrote: > On 7/2/23 15:23, Tom Lane wrote: >> Andres Freund writes: >>> On 2021-06-11 18:44:28 -0400, Tom Lane wrote: I suggest what we do is leave it in place for long enough to get a round of reports from those slow animals, and then (assuming those re

Re: Optionally using a better backtrace library?

2023-07-03 Thread Andres Freund
Hi, On 2023-07-03 11:58:25 +0200, Alvaro Herrera wrote: > On 2023-Jul-02, Andres Freund wrote: > > I like that we now have a builtin backtrace ability. Unfortunately I think > > the > > backtraces are often not very useful, because only externally visible > > functions are symbolized. > > Agreed

Re: Does a cancelled REINDEX CONCURRENTLY need to be messy?

2023-07-03 Thread Álvaro Herrera
On 2023-Jul-01, Thom Brown wrote: > On Thu, 29 Jun 2023, 14:45 Álvaro Herrera, wrote: > > > ALTER TABLE DETACH CONCURRENTLY had to deal with this also, and it did it > > by having a COMPLETE option you can run later in case things got stuck the > > first time around. I suppose we could do someth

Re: Should heapam_estimate_rel_size consider fillfactor?

2023-07-03 Thread Tomas Vondra
On 7/3/23 11:40, Tomas Vondra wrote: > ... > > FWIW the reason why the integer division is intentional is most likely > that we want "floor" semantics - if there's 10.23 rows per page, that > really means 10 rows per page. > > I doubt it makes a huge difference in this particular place, considerin

Re: Optionally using a better backtrace library?

2023-07-03 Thread Tristan Partin
On Mon Jul 3, 2023 at 12:43 PM CDT, Andres Freund wrote: > On 2023-07-03 11:58:25 +0200, Alvaro Herrera wrote: > > On 2023-Jul-02, Andres Freund wrote: > > > Nice things about libbacktrace are that the generation of stack traces is > > > documented to be async signal safe on most platforms (with a

Why is DATESTYLE, ordering ignored for output but used for input ?

2023-07-03 Thread Dave Cramer
Greetings, For ISO and German dates the order DMY is completely ignored on output but used for input. test=# set datestyle to 'ISO,DMY'; SET select '7-8-2023'::date test-# ; date 2023-08-07 (1 row) test=# set datestyle to 'ISO,MDY'; SET test=# select '7-8-2023'::date ; date

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-07-03 Thread Nathan Bossart
On Sun, Jul 02, 2023 at 08:57:31PM -0700, Noah Misch wrote: > Another dimension of compromise could be to make MAINTAIN affect fewer > commands in v16. Un-revert the part of commit 05e1737 affecting just the > commands it still affects. For example, limit MAINTAIN and the 05e1737 > behavior chang

Size vs size_t or, um, PgSize?

2023-07-03 Thread Yurii Rashkovskii
Hi, I've run into an issue of a name clash with system libraries. Specifically, the `Size` type seems to be just an alias for `size_t` and, at least on macOS, it clashes with the core SDK, as it is also defined by MacTypes.h, which is used by some of the libraries one may want to use from within a

Including a sample Table Access Method with core code

2023-07-03 Thread Hannu Krosing
At PgCon 2023 in Ottawa we had an Unconference session on Table Access Methods [1] One thing that was briefly mentioned (but is missing from the notes) is need to have a sample API client in contrib/ , both for having a 2nd user for API to make it more likely that non-heap AMs are doable and also

Re: pgbnech: allow to cancel queries during benchmark

2023-07-03 Thread Fabien COELHO
Yugo-san, Some feedback about v1 of this patch. Patch applies cleanly, compiles. There are no tests, could there be one? ISTM that one could be done with a "SELECT pg_sleep(...)" script?? The global name "all_state" is quite ambiguous, what about "client_states" instead? Or maybe it could

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2023-07-03 Thread Thomas Munro
On Mon, Jul 3, 2023 at 4:26 PM Michael Paquier wrote: > I have not gone back to this part yet, though I plan to do so. As we > are at the beginning of the development cycle, I have applied the > patch to remove support for 1.0.1 for now on HEAD. Let's see what the > buildfarm tells. curculio (O

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: > I couldn't find any rationale as to why we might want to have this alias and > not use size_t. Any insight on this would be appreciated. This used to be a typedef for unsigned int a very long time ago. > Would there be any sense in changing

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 20:40, Thomas Munro wrote: > > On Mon, Jul 3, 2023 at 4:26 PM Michael Paquier wrote: >> I have not gone back to this part yet, though I plan to do so. As we >> are at the beginning of the development cycle, I have applied the >> patch to remove support for 1.0.1 for now on H

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Thomas Munro
On Tue, Jul 4, 2023 at 6:46 AM Daniel Gustafsson wrote: > > On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: > > If there's a willingness to try this out, I am happy to prepare a patch. > > This has been discussed a number of times in the past, and the conclusion from > last time IIRC was to use

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Yurii Rashkovskii
Hi Thomas, On Mon, Jul 3, 2023 at 12:03 PM Thomas Munro wrote: > On Tue, Jul 4, 2023 at 6:46 AM Daniel Gustafsson wrote: > > > On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: > > > If there's a willingness to try this out, I am happy to prepare a > patch. > > > > This has been discussed a nu

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 21:14, Yurii Rashkovskii wrote: > That being said, going ahead with the global renaming of Size to size_t will > mostly eliminate this clash in, say, five years when old versions will be > gone. At least it'll be fixed then. Otherwise, it'll never be fixed at all. > To me,

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Yurii Rashkovskii
Daniel, On Mon, Jul 3, 2023 at 12:20 PM Daniel Gustafsson wrote: > > On 3 Jul 2023, at 21:14, Yurii Rashkovskii wrote: > > > That being said, going ahead with the global renaming of Size to size_t > will mostly eliminate this clash in, say, five years when old versions will > be gone. At least

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2023-07-03 Thread Mikael Kjellström
On 2023-07-03 20:53, Daniel Gustafsson wrote: curculio (OpenBSD 5.9) is failing with "undefined reference to `X509_get_signature_nid'", but that's OK, Mikael already supplied a modern OpenBSD system to replace it Thanks for the report! OpenBSD 5.9 was released in 2016 and is thus well over

Re: ProcessStartupPacket(): database_name and user_name truncation

2023-07-03 Thread Nathan Bossart
On Sat, Jul 01, 2023 at 04:02:06PM +0200, Drouvot, Bertrand wrote: > Please find V2 attached where it's failing as soon as the database name or > user name are detected as overlength. Thanks, Bertrand. I chickened out and ended up committing v1 for now (i.e., simply removing the truncation code).

Re: Why is DATESTYLE, ordering ignored for output but used for input ?

2023-07-03 Thread Matthias van de Meent
On Mon, 3 Jul 2023 at 20:06, Dave Cramer wrote: > > Greetings, > > For ISO and German dates the order DMY is completely ignored on output but > used for input. > > test=# set datestyle to 'ISO,DMY'; > SET > select '7-8-2023'::date > test-# ; > date > > 2023-08-07 > (1 row) > > t

Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name

2023-07-03 Thread Nathan Bossart
On Sun, Jul 02, 2023 at 04:37:52PM -0700, Yurii Rashkovskii wrote: > Thank you for revising the patch. While this is relatively minor, I think > it should be set to MAXPGPATH directly to clarify their relationship. Committed. I set the size to MAXPGPATH directly instead of inventing a new macro w

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 10:23:02PM +0200, Mikael Kjellström wrote: > On 2023-07-03 20:53, Daniel Gustafsson wrote: >>> curculio (OpenBSD 5.9) is failing with "undefined reference to >>> `X509_get_signature_nid'", but that's OK, Mikael already supplied a >>> modern OpenBSD system to replace it >> >

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2023-07-03 Thread Michael Paquier
On Tue, Jul 04, 2023 at 06:40:49AM +1200, Thomas Munro wrote: > curculio (OpenBSD 5.9) is failing with "undefined reference to > `X509_get_signature_nid'", but that's OK, Mikael already supplied a > modern OpenBSD system to replace it (schnauzer, which is green) and he > was planning to shut curcul

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Tom Lane
Daniel Gustafsson writes: > On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: >> I couldn't find any rationale as to why we might want to have this alias and >> not use size_t. Any insight on this would be appreciated. > This used to be a typedef for unsigned int a very long time ago. I'm fair

  1   2   >