Re: Simplify documentation related to Windows builds

2024-01-30 Thread Michael Paquier
On Fri, Jan 19, 2024 at 06:11:40AM -0500, Andrew Dunstan wrote: > FYI Strawberry was a bit stuck for a while at 5.32, but they are now up to > 5.38. See > > I agree we shouldn't be recommending any particular perl distro, especially > not ASPerl which now

why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Pavel Stehule
Hi I have one question, what is a block of implementation of some variant of VACUUM FULL like REINDEX CONCURRENTLY? Why similar mechanism of REINDEX CONCURRENTLY cannot be used for VACUUM FULL? Regards Pavel

Re: Improve eviction algorithm in ReorderBuffer

2024-01-30 Thread Masahiko Sawada
On Fri, Jan 26, 2024 at 5:36 PM Masahiko Sawada wrote: > > On Wed, Dec 20, 2023 at 12:11 PM Amit Kapila wrote: > > > > On Wed, Dec 20, 2023 at 6:49 AM Masahiko Sawada > > wrote: > > > > > > On Tue, Dec 19, 2023 at 8:02 PM Amit Kapila > > > wrote: > > > > > > > > On Tue, Dec 19, 2023 at 8:31 A

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Michael Paquier
On Tue, Jan 30, 2024 at 09:01:57AM +0100, Pavel Stehule wrote: > I have one question, what is a block of implementation of some variant of > VACUUM FULL like REINDEX CONCURRENTLY? Why similar mechanism of REINDEX > CONCURRENTLY cannot be used for VACUUM FULL? You may be interested in these threads

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-30 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Tue, 30 Jan 2024 16:20:54 +0900, Michael Paquier wrote: >>> +if (!format_specified) >>> +/* Set the default format. */ >>> +ProcessCopyOptionFormatTo(pstate, opts_out

Re: More new SQL/JSON item methods

2024-01-30 Thread Jeevan Chalke
On Mon, Jan 29, 2024 at 11:03 AM Tom Lane wrote: > Kyotaro Horiguchi writes: > > Having said that, I'm a bit concerned about the case where an overly > > long string is given there. However, considering that we already have > > "invalid input syntax for type xxx: %x" messages (including for the

Re: meson + libpq_pipeline

2024-01-30 Thread Peter Eisentraut
On 29.01.24 18:37, Alvaro Herrera wrote: I just realized while looking at Jelte's patch for the new nonblocking query cancel stuff that the Meson build doesn't run the libpq_pipeline tests :-( Is there any way to wire the tests to make it work? I think it is running already. For example, here

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 9:14 odesílatel Michael Paquier napsal: > On Tue, Jan 30, 2024 at 09:01:57AM +0100, Pavel Stehule wrote: > > I have one question, what is a block of implementation of some variant of > > VACUUM FULL like REINDEX CONCURRENTLY? Why similar mechanism of REINDEX > > CONCURRENTLY cann

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-30 Thread Michael Paquier
On Tue, Jan 30, 2024 at 05:15:11PM +0900, Sutou Kouhei wrote: > We use defel->location for an error message. (We don't need > to set location for the default "text" DefElem.) Yeah, but you should not need to have this error in the paths that set the callback routines in opts_out if the same valida

RE: speed up a logical replica setup

2024-01-30 Thread Hayato Kuroda (Fujitsu)
Dear Euler, Thanks for updating the patch! > One open item that is worrying me is how to handle the pg_ctl timeout. This > patch does nothing and the user should use PGCTLTIMEOUT environment variable > to > avoid that the execution is canceled after 60 seconds (default for pg_ctl). > Even if you

Re: UUID v7

2024-01-30 Thread Andrey M. Borodin
> On 30 Jan 2024, at 12:28, Sergey Prokhorenko > wrote: > > > I think this phrase is outdated: "This function can optionally accept a > timestamp used instead of current time. > This allows implementation of k-way sotable identifiers.” Fixed. > This phrase is wrong: "Both functions return a

Re: Change GUC hashtable to use simplehash?

2024-01-30 Thread John Naylor
On Tue, Jan 30, 2024 at 4:13 AM Ants Aasma wrote: > But given that we know the data length and we have it in a register > already, it's easy enough to just mask out data past the end with a > shift. See patch 1. Performance benefit is about 1.5x Measured on a > small test harness that just hashes

Re: Documentation to upgrade logical replication cluster

2024-01-30 Thread vignesh C
On Mon, 29 Jan 2024 at 16:01, Bharath Rupireddy wrote: > > On Mon, Jan 29, 2024 at 10:10 AM vignesh C wrote: > > > > Thanks for the comments, the attached v5 version patch has the changes > > for the same. > > Thanks for working on this. Here are some comments on the v5 patch: > > 1. > + > +

Re: Report planning memory in EXPLAIN ANALYZE

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-30, Ashutosh Bapat wrote: > On Mon, Jan 29, 2024 at 10:43 PM Alvaro Herrera > wrote: > > I also added a trivial test for EXPLAIN EXECUTE, which was uncovered, > > and some other minor stylistic changes. > > Thanks. Looks fine to me. Thanks for looking! -- Álvaro HerreraB

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-01-30 Thread John Naylor
On Tue, Jan 30, 2024 at 7:56 AM Masahiko Sawada wrote: > > On Mon, Jan 29, 2024 at 8:48 PM John Naylor wrote: > > I meant the macro could probably be > > > > Max(SLAB_DEFAULT_BLOCK_SIZE, (size) * N) > > > > (Right now N=32). I also realize I didn't answer your question earlier > > about block si

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-30, Pavel Stehule wrote: > One of my customer today is reducing one table from 140GB to 20GB. Now he > is able to run archiving. He should play with pg_repack, and it is working > well today, but I ask myself, what pg_repack does not be hard to do > internally because it should be don

Re: UUID v7

2024-01-30 Thread Junwang Zhao
Hi Andrey, On Tue, Jan 30, 2024 at 5:56 PM Andrey M. Borodin wrote: > > > > > On 30 Jan 2024, at 12:28, Sergey Prokhorenko > > wrote: > > > > > > I think this phrase is outdated: "This function can optionally accept a > > timestamp used instead of current time. > > This allows implementation o

Re: Synchronizing slots from primary to standby

2024-01-30 Thread shveta malik
On Tue, Jan 30, 2024 at 11:31 AM Amit Kapila wrote: > > In this regard, I feel we don't need to dump/restore the 'FAILOVER' > option non-binary upgrade paths similar to the 'ENABLE' option. For > binary upgrade, if the failover option is enabled, then we can enable > it using Alter Subscription SE

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-30 Thread Ashutosh Bapat
On Wed, Jan 24, 2024 at 7:15 AM Jeff Davis wrote: > > On Tue, 2024-01-23 at 15:21 +0530, Ashutosh Bapat wrote: > > I am with the prefix. The changes it causes make review difficult. If > > you can separate those changes into a patch that will help. > > I ended up just removing the dummy FDW. Real

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 11:31 odesílatel Alvaro Herrera napsal: > On 2024-Jan-30, Pavel Stehule wrote: > > > One of my customer today is reducing one table from 140GB to 20GB. Now > he > > is able to run archiving. He should play with pg_repack, and it is > working > > well today, but I ask myself, wha

Re: MERGE ... RETURNING

2024-01-30 Thread jian he
I didn't find any issue with v15. no commit message in the patch, If a commit message is there, I can help proofread.

Re: Returning non-terminated string in ECPG Informix-compatible function

2024-01-30 Thread Oleg Tselebrovskiy
Here's the code for bug reproduction: #include #include EXEC SQL INCLUDE pgtypes_interval.h; EXEC SQL INCLUDE ecpg_informix.h; EXEC SQL BEGIN DECLARE SECTION; char dirty_str[100] = "a__c_d_"; interval *interval_ptr; EXEC SQL END DECLARE SECTION;

Re:Bug report and fix about building historic snapshot

2024-01-30 Thread cca5507
> This patch may be better, which only track catalog modified transactions. Can anyone help review this patch? Thanks. -- Regards, ChangAo Chen

Re: Some revises in adding sorting path

2024-01-30 Thread David Rowley
On Mon, 29 Jan 2024 at 22:39, Richard Guo wrote: > So in the v3 patch I've brought back the logic that considers > incremental sort on partial paths in gather_grouping_paths(). However, > I failed to compose a test case for this scenario without having to > generate a huge table. So in the v3 pa

Re: Incorrect cost for MergeAppend

2024-01-30 Thread Alexander Kuzmenkov
Here is a small patch that reproduces the problem on two tables with inheritance, and fixes it. I'll add it to the Commitfest. On Tue, Jan 30, 2024 at 8:20 AM Ashutosh Bapat wrote: > > On Mon, Jan 29, 2024 at 6:11 PM Alexander Kuzmenkov > wrote: > > > > Hello hackers, > > > > While investigating

003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Nazir Bilal Yavuz
Hi, I was trying to install newer Perl versions to Windows CI images and found that 003_extrafiles.pl test fails on Windows with: (0.183s) not ok 2 - file lists match (0.000s) # Failed test 'file lists match' # at C:/cirrus/src/bin/pg_rewind/t/003_extrafiles.pl line 81. (0.000s) # Structu

Re: Reducing output size of nodeToString

2024-01-30 Thread Matthias van de Meent
On Tue, 9 Jan 2024, 09:23 Peter Eisentraut, wrote: > > On 04.01.24 00:23, Matthias van de Meent wrote: > > Something like the attached? It splits out into the following > > 0001: basic 'omit default values' > > /* Write an integer field (anything written as ":fldname %d") */ > -#define WRITE_INT

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-30, Pavel Stehule wrote: > some basic variant (without autovacuum support) can be good enough. We have > no autovacuum support for REINDEX CONCURRENTLY and I don't see a necessity > for it (sure, it can be limited by my perspective) . The necessity of > reducing table size is not too c

Re: meson + libpq_pipeline

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-29, Jelte Fennema-Nio wrote: > On Mon, 29 Jan 2024 at 19:37, Tristan Partin wrote: > > > > On Mon Jan 29, 2024 at 11:37 AM CST, Alvaro Herrera wrote: > > > I just realized while looking at Jelte's patch for the new nonblocking > > > query cancel stuff that the Meson build doesn't run

Re: Some revises in adding sorting path

2024-01-30 Thread Richard Guo
On Tue, Jan 30, 2024 at 7:00 PM David Rowley wrote: > On Mon, 29 Jan 2024 at 22:39, Richard Guo wrote: > > So in the v3 patch I've brought back the logic that considers > > incremental sort on partial paths in gather_grouping_paths(). However, > > I failed to compose a test case for this scenar

Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Nazir Bilal Yavuz
Hi, On Tue, 30 Jan 2024 at 14:21, Nazir Bilal Yavuz wrote: > > It looks like File::Find converts backslashes to slashes in the newer > Perl versions. I tried to find the related commit and found this: > https://github.com/Perl/perl5/commit/414f14df98cb1c9a20f92c5c54948b67c09f072d I forgot to men

Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Andrew Dunstan
On 2024-01-30 Tu 06:21, Nazir Bilal Yavuz wrote: Hi, I was trying to install newer Perl versions to Windows CI images and found that 003_extrafiles.pl test fails on Windows with: (0.183s) not ok 2 - file lists match (0.000s) # Failed test 'file lists match' # at C:/cirrus/src/bin/pg_rewin

RE: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-01-30 Thread Zhijie Hou (Fujitsu)
On Tuesday, January 30, 2024 11:21 AM vignesh C wrote: > > On Tue, 30 Jan 2024 at 07:24, Zhijie Hou (Fujitsu) > wrote: > > > > On Monday, January 29, 2024 9:22 PM vignesh C > wrote: > > > > > > On Fri, 26 Jan 2024 at 11:30, Alexander Lakhin > wrote: > > > > > > > > Hello hackers, > > > > > > >

Re: Supporting MERGE on updatable views

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-29, Dean Rasheed wrote: > Yeah, for all practical purposes, that check in CheckValidResultRel() > has been dead code since d751ba5235, but I think it's still worth > doing, and if we're going to do it, we should do it properly. I don't > like using elog() in some cases and ereport() in

Re: Question on LWLockMode in dsa.c

2024-01-30 Thread Masahiko Sawada
On Tue, Jan 30, 2024 at 4:43 PM Bharath Rupireddy wrote: > > On Tue, Jan 30, 2024 at 6:24 AM Masahiko Sawada wrote: > > > > Hi, > > > > While working on radix tree patch[1], John Naylor found that dsa.c > > doesn't already use shared locks even in dsa_dump(). dsa_dump() seems > > a pure read-only

Re: Incorrect cost for MergeAppend

2024-01-30 Thread Aleksander Alekseev
Hi, > Here is a small patch that reproduces the problem on two tables with > inheritance, and fixes it. I'll add it to the Commitfest. Thanks for the patch. I can confirm that it changes the plan from Sort + Append to MergeAppend. Before: ``` explain (costs off) select * from ma0 where a < 100

Re: Incorrect cost for MergeAppend

2024-01-30 Thread David Rowley
On Wed, 31 Jan 2024 at 00:06, Alexander Kuzmenkov wrote: > Here is a small patch that reproduces the problem on two tables with > inheritance, and fixes it. I'll add it to the Commitfest. Good catch. It seems to have been broken since MergeAppends were added in 11cad29c9. The code fix looks goo

scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Alvaro Herrera
I noticed while answering a question that commit b577743000cd added the GUC scram_iterations and marked it GUC_REPORT, but failed to add it to the PQparameterStatus documentation. Here's a proposed patch to add it there. diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index d0d5aef

Re: Rename setup_cancel_handler in pg_dump

2024-01-30 Thread Daniel Gustafsson
> On 26 Jan 2024, at 01:42, Yugo NAGATA wrote: > I am proposing it because there is a public function with > the same name in fe_utils/cancel.c. I know pg_dump/parallel.c > does not include fe_utils/cancel.h, so there is no conflict, > but I think it is better to use different names to reduce > p

Re: Functions to return random numbers in a given range

2024-01-30 Thread Aleksander Alekseev
Hi, > Interestingly, the cfbot didn't pick up on the fact that it needed > rebasing. Anyway, the copyright years in the new file's header comment > needed updating, so here is a rebase doing that. Maybe I'm missing something but I'm not sure if I understand what this test tests particularly: ```

Re: Change GUC hashtable to use simplehash?

2024-01-30 Thread Ants Aasma
On Tue, 30 Jan 2024 at 12:04, John Naylor wrote: > > On Tue, Jan 30, 2024 at 4:13 AM Ants Aasma wrote: > > But given that we know the data length and we have it in a register > > already, it's easy enough to just mask out data past the end with a > > shift. See patch 1. Performance benefit is abo

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
Hi so 6. 1. 2024 v 16:51 odesílatel vignesh C napsal: > On Fri, 21 Jul 2023 at 02:59, Ivan Panchenko wrote: > > > > Friday, 14 July 2023, 23:27 +03:00 от Tom Lane : > > > > =?UTF-8?B?SXZhbiBQYW5jaGVua28=?= writes: > > > Четверг, 6 июля 2023, 14:48 +03:00 от Peter Eisentraut < > pe...@eisentrau

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Daniel Gustafsson
> On 30 Jan 2024, at 13:36, Alvaro Herrera wrote: > > I noticed while answering a question that commit b577743000cd added the > GUC scram_iterations and marked it GUC_REPORT, but failed to add it to > the PQparameterStatus documentation. Ugh, thanks for fixing! > 1. that list looks to be in ran

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Jelte Fennema-Nio
On Tue, 30 Jan 2024 at 13:37, Alvaro Herrera wrote: > > I noticed while answering a question that commit b577743000cd added the > GUC scram_iterations and marked it GUC_REPORT, but failed to add it to > the PQparameterStatus documentation. +1 the improvements your suggesting (although 3 I don't k

pg_stat_advisor extension

2024-01-30 Thread Илья Евдокимов
Hello PostgreSQL Hackers, I'm thrilled to share with you a new PostgreSQL extension I've developed, called 'pg_stat_advisor'. The genesis of this extension traces back to a conversation in this: https://www.postgresql.org/message-id/e2512fd5-77a4-825b-e456-c0586e37f293%40enterprisedb.com The 'pg_st

Re: Incorrect cost for MergeAppend

2024-01-30 Thread Alexander Kuzmenkov
On Tue, Jan 30, 2024 at 1:20 PM David Rowley wrote: > You should likely focus on trying to find a test that does not require > making 2 tables with 10k rows. Is 1k smallint OK? It should fit in one page. Still reproduces the error, and the entire test case runs in under 10 ms. diff --git a/src/ba

Re: Improvement discussion of custom and generic plans

2024-01-30 Thread Quan Zongliang
On 2023/11/3 15:27, Quan Zongliang wrote: Hi We have one such problem. A table field has skewed data. Statistics: n_distinct | -0.4481973 most_common_vals   | {5f006ca25b52ed78e457b150ee95a30c} most_common_freqs  | {0.5518474} Data generation: CREATE TABLE s_user (

Re: UUID v7

2024-01-30 Thread Andrey M. Borodin
> On 30 Jan 2024, at 15:33, Junwang Zhao wrote: > > It's always good to add a newline at the end of a source file, though > this might be nitpicky. Thanks, also fixed warning found by CFBot. Best regards, Andrey Borodin. v17-0001-Implement-UUID-v7.patch Description: Binary data

Re: Optmize bitmapword macros calc (src/backend/nodes/bitmapset.c)

2024-01-30 Thread Ranier Vilela
Em seg., 29 de jan. de 2024 às 19:40, Nathan Bossart < nathandboss...@gmail.com> escreveu: > On Tue, Jan 30, 2024 at 11:23:57AM +1300, David Rowley wrote: > > On Tue, 30 Jan 2024 at 08:32, Nathan Bossart > wrote: > >> I'm currently +0.1 for this change. I don't see any huge problem with > >> tri

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Andrew Dunstan
On 2024-01-29 Mo 11:20, Dave Cramer wrote: Dave Cramer www.postgres.rocks On Mon, 29 Jan 2024 at 11:16, Andrew Dunstan wrote: On 2024-01-26 Fr 09:18, Dave Cramer wrote: On Fri, 26 Jan 2024 at 07:36, Andrew Dunstan wrote: On 2024-01-25 Th 20:32, Michael Paquier wro

Re: compiling postgres on windows arm using meson

2024-01-30 Thread Nazir Bilal Yavuz
Hi, On Thu, 18 Jan 2024 at 05:07, Dave Cramer wrote: > > Greetings, > Getting the following error > > [1146/2086] Generating src/backend/postgres.def with a custom command > (wrapped by meson to set PATH) > FAILED: src/backend/postgres.def > "C:\Program Files\Meson\meson.exe" "--internal" "exe"

Re: Functions to return random numbers in a given range

2024-01-30 Thread Dean Rasheed
On Tue, 30 Jan 2024 at 12:47, Aleksander Alekseev wrote: > > Maybe I'm missing something but I'm not sure if I understand what this > test tests particularly: > > ``` > -- There should be no triple duplicates in 1000 full-range 32-bit random() > -- values. (Each of the C(1000, 3) choices of tripl

Re: POC, WIP: OR-clause support for indexes

2024-01-30 Thread jian he
On Tue, Dec 5, 2023 at 6:55 PM Andrei Lepikhov wrote: > > Here is fresh version with the pg_dump.pl regex fixed. Now it must pass > buildfarm. +JumbleState * +JumbleExpr(Expr *expr, uint64 *queryId) +{ + JumbleState *jstate = NULL; + + Assert(queryId != NULL); + + jstate = (JumbleState *) palloc(

Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs

2024-01-30 Thread Daniel Verite
vignesh C wrote: > patching file src/interfaces/libpq/exports.txt > Hunk #1 FAILED at 191. > 1 out of 1 hunk FAILED -- saving rejects to file > src/interfaces/libpq/exports.txt.rej > > Please post an updated version for the same. PFA a rebased version. Best regards, -- Daniel Vérité h

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Tom Lane
Alvaro Herrera writes: > I noticed while answering a question that commit b577743000cd added the > GUC scram_iterations and marked it GUC_REPORT, but failed to add it to > the PQparameterStatus documentation. Why is it GUC_REPORT at all? I don't see a strong need for that. (In particular, the re

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-30, Jelte Fennema-Nio wrote: > On Tue, 30 Jan 2024 at 13:37, Alvaro Herrera wrote: > > > > I noticed while answering a question that commit b577743000cd added the > > GUC scram_iterations and marked it GUC_REPORT, but failed to add it to > > the PQparameterStatus documentation. > > +

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Dave Cramer
On Tue, 30 Jan 2024 at 08:38, Andrew Dunstan wrote: > > On 2024-01-29 Mo 11:20, Dave Cramer wrote: > > > Dave Cramer > www.postgres.rocks > > > On Mon, 29 Jan 2024 at 11:16, Andrew Dunstan wrote: > >> >> On 2024-01-26 Fr 09:18, Dave Cramer wrote: >> >> >> >> On Fri, 26 Jan 2024 at 07:36, Andrew

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Daniel Gustafsson
> On 30 Jan 2024, at 15:36, Tom Lane wrote: > > Alvaro Herrera writes: >> I noticed while answering a question that commit b577743000cd added the >> GUC scram_iterations and marked it GUC_REPORT, but failed to add it to >> the PQparameterStatus documentation. > > Why is it GUC_REPORT at all? I

Documentation: warn about two_phase when altering a subscription

2024-01-30 Thread Bertrand Drouvot
Hi hackers, 776621a5e4 added a "warning" in the documentation to alter a subscription (to ensure the slot's failover property matches the subscription's one). The same remark could be done for the two_phase option. This patch is an attempt to do so. Looking forward to your feedback, Regards, -

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > I inserted perl reference support - hstore_plperl and json_plperl does it. > > +<->/* Dereference references recursively. */ > +<->while (SvROK(in)) > +<-><-->in = SvRV(in); That code in hstore_plperl and json_plperl is only relevant because they deal with non-scalar valu

Re: Synchronizing slots from primary to standby

2024-01-30 Thread Bertrand Drouvot
Hi, On Mon, Jan 29, 2024 at 09:15:57AM +, Bertrand Drouvot wrote: > Hi, > > On Mon, Jan 29, 2024 at 02:35:52PM +0530, Amit Kapila wrote: > > I think it is better to create a separate patch for two_phase after > > this patch gets committed. > > Yeah, makes sense, will do, thanks! It's done i

Re: cleanup patches for incremental backup

2024-01-30 Thread Robert Haas
On Mon, Jan 29, 2024 at 4:13 PM Nathan Bossart wrote: > On Mon, Jan 29, 2024 at 03:18:50PM -0500, Robert Haas wrote: > > I'm wondering if what we need to do is run pg_walsummary on both > > summary files in that case. If we just pick one or the other, how do > > we know which one to pick? > > Even

Fix some ubsan/asan related issues

2024-01-30 Thread Tristan Partin
Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, and there didn't seem to be anything preventing that in the LogLogicalMessage() codepath. Here is a preventative measure in LogLogicalMessage() and an Assert() in CopyXLogRecordToWAL(). Patch 2: Support building with -Db_san

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Tristan Partin
Spend so much time writing out the email, I once again forget attachments...UGH. -- Tristan Partin Neon (https://neon.tech) From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Mon, 29 Jan 2024 18:03:39 -0600 Subject: [PATCH v1 1/3] Refuse to registe

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > I inserted perl reference support - hstore_plperl and json_plperl does > it. > > > > +<->/* Dereference references recursively. */ > > +<->while (SvROK(in)) > > +<-><-->in = SvRV(

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread Akshat Jaimini
I think we should move this patch to the next CF as I believe that work is still going on resolving the last reported bug.

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > I inserted perl reference support - hstore_plperl and json_plperl does >> it. >> > >> > +<->/* Dereference references recursively. */ >> > +<->whil

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < > > ilm...@ilmari.org> napsal: > > > >> Pavel Stehule writes: > >> > >> > I inserted perl reference support - hstore_

Re: Extend pgbench partitioning to pgbench_history

2024-01-30 Thread Gabriele Bartolini
Hi Abhijit, Thanks for your input. Please accept my updated patch. Ciao, Gabriele On Tue, 16 Jan 2024 at 12:53, Abhijit Menon-Sen wrote: > At 2023-11-30 11:29:15 +0100, gabriele.bartol...@enterprisedb.com wrote: > > > > With the attached patch, I extend the partitioning capability to the > > p

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < >> > ilm...@ilmari.org> napsal: >> > >> >> Pavel Stehule writes: >> >> >> >> > I inse

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < > > ilm...@ilmari.org> napsal: > > > >> Pavel Stehule writes: > >> > >> > út 30. 1. 2024 v 16:43 odesílatel Dagfinn I

Re: cleanup patches for incremental backup

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 10:51 AM Robert Haas wrote: > I think the solution here is to find a better way to wait for the > inserts to be summarized, one that actually does wait for that to > happen. Here's a patch for that. I now think a7097ca630a25dd2248229f21ebce4968d85d10a was actually misguide

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 11:17 AM Akshat Jaimini wrote: > I think we should move this patch to the next CF as I believe that work is > still going on resolving the last reported bug. We shouldn't just keep pushing this forward to the next CF. It's been idle since July. If it needs more work, mark

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Gabriele Bartolini
Hi, I am sending an updated patch, and submitting this to the next commit fest, as I still believe this could be very useful. Thanks, Gabriele On Thu, 7 Sept 2023 at 21:51, Gabriele Bartolini < gabriele.bartol...@enterprisedb.com> wrote: > Hi everyone, > > I would like to propose a patch that a

Re: separating use of SerialSLRULock

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-29, Alvaro Herrera wrote: > It's terrifying that SerialAdd() doesn't seem to be covered by any > tests, though. I realized that there's some coverage when compiling with TEST_SUMMARIZE_SERIAL, so I tried that and it looks OK. One other change I made was in the comment that explains t

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < >> > ilm...@ilmari.org> napsal: >> > >> >> Pavel Stehule writes: >> >> >> >> > út 30.

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2024-01-30 Thread Alvaro Herrera
Hmm, this looks quite nice and simple. My only comment is that a sequence like this /* Read from WAL buffers, if available. */ rbytes = XLogReadFromBuffers(&output_message.data[output_message.len], startptr, nbytes, xlogreader->seg.ws_tli); output_message.

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 18:26 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < > > ilm...@ilmari.org> napsal: > > > >> Pavel Stehule writes: > >> > >> > út 30. 1. 2024 v 17:18 odesílatel Dagfinn I

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Melih Mutlu
Hi Heikki, Heikki Linnakangas , 29 Oca 2024 Pzt, 19:12 tarihinde şunu yazdı: > > Proposed change modifies socket_putmessage to send any data larger than > > 8K immediately without copying it into the send buffer. Assuming that > > the send buffer would be flushed anyway due to reaching its limit,

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Robert Haas
On Tue, Sep 12, 2023 at 10:39 AM Martín Marqués wrote: > The outcome looked for is that the system GUCs that require a restart > or reload are not modified unless it's through some orchestration or > someone with physical access to the configuration files (yeah, we > still have the COPY PROGRAM).

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Melih Mutlu
Hi Robert, Robert Haas , 29 Oca 2024 Pzt, 20:48 tarihinde şunu yazdı: > > If there's already some data in PqSendBuffer, I wonder if it would be > > better to fill it up with data, flush it, and then send the rest of the > > data directly. Instead of flushing the partial data first. I'm afraid > >

Re: UUID v7

2024-01-30 Thread Sergey Prokhorenko
typo: being carried to time step should be:being carried to timestemp Sergey Prokhorenko sergeyprokhore...@yahoo.com.au On Tuesday, 30 January 2024 at 04:35:45 pm GMT+3, Andrey M. Borodin wrote: > On 30 Jan 2024, at 15:33, Junwang Zhao wrote: > > It's always good to add a newline

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
Hi út 30. 1. 2024 v 18:35 odesílatel Pavel Stehule napsal: > > > út 30. 1. 2024 v 18:26 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < >> > ilm...@ilmari.org> napsal: >> > >> >> P

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 12:58 PM Melih Mutlu wrote: > Sounds like it's difficult to come up with a heuristic that would work well > enough for most cases. > One thing with sending data instead of copying it if the buffer is empty is > that initially the buffer is empty. I believe it will stay em

Re: Add LSN <-> time conversion functionality

2024-01-30 Thread Melanie Plageman
On Wed, Dec 27, 2023 at 5:16 PM Melanie Plageman wrote: > > Elsewhere [1] I required a way to estimate the time corresponding to a > particular LSN in the past. I devised the attached LSNTimeline, a data > structure mapping LSNs <-> timestamps with decreasing precision for > older time, LSN pairs.

Re: Schema variables - new implementation for Postgres 15

2024-01-30 Thread Dmitry Dolgov
Yep, in this constellation the implementation holds much better (in terms of memory) in my create/let/drop testing. I've marked the CF item as ready for committer, but a note for anyone who would like to pick up it from here -- we're talking about first 5 patches here, up to the memory cleaning af

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Tom Lane
Robert Haas writes: > I have to admit that I'm a little afraid that people will mistake this > for an actual security feature and file bug reports or CVEs about the > superuser being able to circumvent these restrictions. If we add this, > we had better make sure that the documentation is extremel

Re: Schema variables - new implementation for Postgres 15

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 20:15 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > Yep, in this constellation the implementation holds much better (in > terms of memory) in my create/let/drop testing. > > I've marked the CF item as ready for committer, but a note for anyone > who would like to pick

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Heikki Linnakangas
On 30/01/2024 17:57, Tristan Partin wrote: Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, and there didn't seem to be anything preventing that in the LogLogicalMessage() codepath. Here is a preventative measure in LogLogicalMessage() and an Assert() in CopyXLogRecordToWAL().

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-30 Thread Jeff Davis
On Tue, 2024-01-30 at 16:17 +0530, Ashutosh Bapat wrote: > Converting a server and user mapping to > conninfo should be delegated to the FDW being used since that FDW > knows best how to use those options. If I understand you correctly, you mean that there would be a new optional function associat

Re: Oversight in reparameterize_path_by_child leading to executor crash

2024-01-30 Thread Tom Lane
Richard Guo writes: > On Wed, Jan 17, 2024 at 5:01 PM Richard Guo wrote: >> Sure, here it is: >> v10-0001-Avoid-reparameterizing-Paths-when-it-s-not-suitable.patch > I forgot to mention that this patch applies on v16 not master. I spent some time looking at this patch (which seems more urgent t

Re: Some revises in adding sorting path

2024-01-30 Thread David Rowley
On Wed, 31 Jan 2024 at 00:44, Richard Guo wrote: > This patchset does not aim to introduce anything new; it simply > refactors the existing code. The newly added tests are used to show > that the code that is touched here is not redundant, but rather > essential for generating certain paths. I r

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Andres Freund
Hi, On 2024-01-30 22:05:28 +0200, Heikki Linnakangas wrote: > On 30/01/2024 17:57, Tristan Partin wrote: > > In my effort to try to see if the test suite would pass with asan > > enabled, I ran into a max_stack_depth issue. I tried maxing it out > > (hence, the patch), but that still didn't remedy

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 2:20 PM Tom Lane wrote: > Indeed. I'd go so far as to say that we should reject not only this > proposal, but any future ones that intend to prevent superusers from > doing things that superusers normally could do (and, indeed, are > normally expected to do). That sort of

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 30, 2024 at 2:20 PM Tom Lane wrote: >> Indeed. I'd go so far as to say that we should reject not only this >> proposal, but any future ones that intend to prevent superusers from >> doing things that superusers normally could do (and, indeed, are >> normally exp

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Andrew Dunstan
On 2024-01-30 Tu 09:50, Dave Cramer wrote: On Tue, 30 Jan 2024 at 08:38, Andrew Dunstan wrote: On 2024-01-29 Mo 11:20, Dave Cramer wrote: Dave Cramer www.postgres.rocks On Mon, 29 Jan 2024 at 11:16, Andrew Dunstan wrote: On 2024

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Andres Freund
Hi, On 2024-01-30 09:59:25 -0600, Tristan Partin wrote: > From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 > From: Tristan Partin > Date: Mon, 29 Jan 2024 18:03:39 -0600 > Subject: [PATCH v1 1/3] Refuse to register message in LogLogicalMessage if > NULL > If this occurs, t

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Magnus Hagander
On Tue, Jan 30, 2024 at 10:48 PM Tom Lane wrote: > > Robert Haas writes: > > There's nothing wrong with that exactly, but what does it gain us over > > my proposal of a sentinel file? > > I was imagining using selinux and/or sepgsql to directly prevent > writing postgresql.auto.conf from the Post

Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Andrew Dunstan
On 2024-01-30 Tu 06:49, Andrew Dunstan wrote: On 2024-01-30 Tu 06:21, Nazir Bilal Yavuz wrote: Hi, I was trying to install newer Perl versions to Windows CI images and found that 003_extrafiles.pl test fails on Windows with: (0.183s) not ok 2 - file lists match (0.000s) #   Failed test 'fil

Re: psql not responding to SIGINT upon db reconnection

2024-01-30 Thread Tristan Partin
On Fri Jan 12, 2024 at 11:13 AM CST, Tristan Partin wrote: On Fri Jan 12, 2024 at 10:45 AM CST, Robert Haas wrote: > On Mon, Jan 8, 2024 at 1:03 AM Tristan Partin wrote: > > I think the way to go is to expose some variation of libpq's > > pqSocketPoll(), which I would be happy to put together a

  1   2   >