Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().

2023-01-31 Thread Joel Jacobson
Hi, On Sun, Jan 29, 2023, at 14:33, Dean Rasheed wrote: > On Sat, 28 Jan 2023 at 22:14, Joel Jacobson wrote: >> HEAD, patched: >> sweight = (arg.weight * DEC_DIGITS) / 2 + 1 > > You haven't actually said why this formula is more correct than the > current one. I believe that it is when arg.we

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-01-31 Thread Kyotaro Horiguchi
Hi, Kuroda-san, Thanks for the detailed study. At Tue, 31 Jan 2023 07:06:40 +, "Hayato Kuroda (Fujitsu)" wrote in > Therefore, I think we can say that modern platforms that are supported by > PostgreSQL define int as 32-bit. > It satisfies the condition sizeof(int) <= sizeof(int32), so we

Re: meson: Optionally disable installation of test modules

2023-01-31 Thread Peter Eisentraut
On 30.01.23 18:42, Andres Freund wrote: On 2023-01-30 08:37:42 +0100, Peter Eisentraut wrote: One open issue (IMO) with the meson build system is that it installs the test modules under src/test/modules/ as part of a normal installation. This is because there is no way to set up up the build sys

Re: Add LZ4 compression in pg_dump

2023-01-31 Thread gkokolatos
--- Original Message --- On Friday, January 27th, 2023 at 6:23 PM, Justin Pryzby wrote: > > > On Thu, Jan 26, 2023 at 12:22:45PM -0600, Justin Pryzby wrote: > > > That commit also added this to pg-dump.c: > > > > + case PG_COMPRESSION_ZSTD: > > + pg_fatal("compression with %s

RE: Logical replication timeout problem

2023-01-31 Thread wangw.f...@fujitsu.com
On Mon, Jan 30, 2023 at 17:50 PM I wrote: > Attach the new patch. When invoking the function ReorderBufferProcessTXN, the threshold-related counter "changes_count" may have some random value from the previous transaction's processing. To fix this, I moved the definition of the counter "changes_cou

Re: Reducing power consumption on idle servers

2023-01-31 Thread Bharath Rupireddy
On Fri, Jan 27, 2023 at 12:41 PM Thomas Munro wrote: > > There's also the walwriter to look into; from memory it was a little > less fuzzy but I haven't looked recently. Thanks. I tried to do away with the walwriter hibernation for just some time and made it wait indefinitely until an event occur

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-01-31 Thread Amit Kapila
On Tue, Jan 31, 2023 at 1:40 PM Kyotaro Horiguchi wrote: > > Hi, Kuroda-san, Thanks for the detailed study. > > At Tue, 31 Jan 2023 07:06:40 +, "Hayato Kuroda (Fujitsu)" > wrote in > > Therefore, I think we can say that modern platforms that are supported by > > PostgreSQL define int as 32-

Re: Allow tests to pass in OpenSSL FIPS mode

2023-01-31 Thread Peter Eisentraut
On 09.12.22 05:16, Michael Paquier wrote: Some tests inspect the actual md5 result strings or build statistics based on them. I have tried to carefully preserve the meaning of the original tests, to the extent that they could be inferred, in some cases adjusting example values by matching the md

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

2023-01-31 Thread shveta malik
On Fri, Jan 27, 2023 at 3:41 PM shveta malik wrote: > > > I am reviewing further... > thanks > Shveta Few more comments: v4-0001: 1) REPLICATION_SLOT_SNAPSHOT --Do we need 'CREATE' prefix with it i.e. CREATE_REPLICATION_SNAPSHOT (or some other brief one with CREATE?). 'REPLICATION_SLOT_SNAPSH

Re: Timeline ID hexadecimal format

2023-01-31 Thread Peter Eisentraut
On 30.01.23 17:05, Sébastien Lardière wrote: Here's the patch with the suggested format ; plus, I add some note in the documentation about recovery_target_timeline, because I don't get how strtoul(), with the special 0 base parameter can work without 0x prefix ; I suppose that nobody use it.

Re: [PoC] Let libpq reject unexpected authentication requests

2023-01-31 Thread Peter Eisentraut
On 16.11.22 18:26, Jacob Champion wrote: On Tue, Nov 15, 2022 at 11:07 PM Michael Paquier wrote: I am beginning to look at the last version proposed, which has been marked as RfC. Does this patch need a refresh in light of a9e9a9f and 0873b2d? The changes for libpq_append_conn_error() should

Re: Named Operators

2023-01-31 Thread Peter Eisentraut
On 27.01.23 16:34, Matthias van de Meent wrote: On Fri, 27 Jan 2023 at 16:26, Peter Eisentraut wrote: On 12.01.23 14:55, Matthias van de Meent wrote: Matter of taste, I guess. But more importantly, defining an operator gives you many additional features that the planner can use to optimize yo

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

2023-01-31 Thread wangw.f...@fujitsu.com
On Mon, Jan 23, 2023 21:00 PM Melih Mutlu wrote: > Hi, > > Thanks for your review. > Attached updated versions of the patches. Thanks for updating the patch set. > > 5. New member "created_slot" in structure LogicalRepWorker > > + /* > > +* Indicates if the sync worker created a r

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-01-31 Thread Aleksander Alekseev
Hi hackers, > /opt/local/bin/xsltproc is provided by libxslt, and > /opt/local/bin/xmllint is provided by libxml2, neither of which > will be installed by our recipe as given. You might have pulled > those ports in already to build Postgres with, but if you didn't, the > recipe will fail. I wond

Re: Rework of collation code, extensibility

2023-01-31 Thread Peter Eisentraut
On 27.01.23 00:47, Jeff Davis wrote: I'm hoping to commit 0002 and 0003 soon-ish, maybe a week or two, please let me know if you want me to hold off. (I won't commit the GUCs unless others find them generally useful; they are included here to more easily reproduce my performance tests.) I have

Re: heapgettup() with NoMovementScanDirection unused in core?

2023-01-31 Thread David Rowley
On Tue, 31 Jan 2023 at 09:57, Melanie Plageman wrote: > As for the asserts, I was at a bit of a loss as to where to put an > assert which will make it clear that heapgettup() and > heapgettup_pagemode() do not handle NoMovementScanDirection but was > at a higher level of the executor. My thoughts

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

2023-01-31 Thread wangw.f...@fujitsu.com
On Tues, Jan 31, 2023 18:27 PM I wrote: > I found one typo in v9-0002, but it seems already mentioned by Shi in [1].#5 > before. Maybe you can have a look at that email for this and some other > comments. Sorry, I forgot to add the link to the email. Please refer to [1]. [1] - https://www.postgr

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

2023-01-31 Thread shveta malik
On Tue, Jan 31, 2023 at 3:57 PM wangw.f...@fujitsu.com wrote: > > On Mon, Jan 23, 2023 21:00 PM Melih Mutlu wrote: > > Hi, > > > > Thanks for your review. > > Attached updated versions of the patches. > > Thanks for updating the patch set. > > > > 5. New member "created_slot" in structure Logical

Re: [PoC] Let libpq reject unexpected authentication requests

2023-01-31 Thread Aleksander Alekseev
Hi Peter, > > Updated in v13, thanks! > > What is the status of this patch set? Michael had registered himself as > committer and then removed himself again. So I hadn't been paying much > attention myself. Was there anything left to discuss? Previously I marked the patch as RfC. Although it's

Re: dynamic result sets support in extended query protocol

2023-01-31 Thread Peter Eisentraut
On 30.01.23 14:06, Alvaro Herrera wrote: On 2022-Nov-22, Peter Eisentraut wrote: I added tests using the new psql \bind command to test this functionality in the extended query protocol, which showed that this got broken since I first wrote this patch. This "blame" is on the pipeline mode in l

Re: Timeline ID hexadecimal format

2023-01-31 Thread Ashutosh Bapat
On Mon, Jan 30, 2023 at 9:35 PM Sébastien Lardière wrote: > > On 27/01/2023 15:55, Peter Eisentraut wrote: > > On 27.01.23 14:52, Sébastien Lardière wrote: > >> The attached patch proposes to change the format of timelineid from > >> %u to %X. > > > > I think your complaint has merit. But note th

Re: Logical replication timeout problem

2023-01-31 Thread Amit Kapila
On Tue, Jan 31, 2023 at 2:53 PM wangw.f...@fujitsu.com wrote: > > On Mon, Jan 30, 2023 at 17:50 PM I wrote: > > Attach the new patch. > > When invoking the function ReorderBufferProcessTXN, the threshold-related > counter "changes_count" may have some random value from the previous > transaction's

Re: Logical replication timeout problem

2023-01-31 Thread Ashutosh Bapat
On Tue, Jan 31, 2023 at 4:58 PM Amit Kapila wrote: > Thanks, the patch looks good to me. I have slightly adjusted one of > the comments and ran pgindent. See attached. As mentioned in the > commit message, we shouldn't backpatch this as this requires a new > callback and moreover, users can incre

Re: odd buildfarm failure - "pg_ctl: control file appears to be corrupt"

2023-01-31 Thread Thomas Munro
On Tue, Jan 31, 2023 at 5:09 PM Thomas Munro wrote: > Clearly there is an element of speculation or superstition here. I > don't know what else to do if both PostgreSQL and ext4 decided not to > add interlocking. Maybe we should rethink that. How bad would it > really be if control file access

Re: Logical replication timeout problem

2023-01-31 Thread Amit Kapila
On Tue, Jan 31, 2023 at 5:03 PM Ashutosh Bapat wrote: > > On Tue, Jan 31, 2023 at 4:58 PM Amit Kapila wrote: > > > Thanks, the patch looks good to me. I have slightly adjusted one of > > the comments and ran pgindent. See attached. As mentioned in the > > commit message, we shouldn't backpatch th

Re: Non-superuser subscription owners

2023-01-31 Thread Mark Dilger
> On Jan 30, 2023, at 1:29 PM, Robert Haas wrote: > > I feel like you're accusing me of removing functionality that has > never existed. A subscription doesn't run as the subscription creator. > It runs as the subscription owner. If you or anyone else had added the > capability for it to run a

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-01-31 Thread Masahiko Sawada
On Tue, Jan 31, 2023 at 3:59 PM Masahiko Sawada wrote: > > On Tue, Jan 31, 2023 at 3:56 PM Amit Kapila wrote: > > > > On Tue, Jan 31, 2023 at 11:12 AM Masahiko Sawada > > wrote: > > > > > > On Mon, Jan 30, 2023 at 9:41 PM Masahiko Sawada > > > wrote: > > > > > > I've attached patches for HEAD

Re: Timeline ID hexadecimal format

2023-01-31 Thread Sébastien Lardière
On 31/01/2023 12:26, Ashutosh Bapat wrote: On Mon, Jan 30, 2023 at 9:35 PM Sébastien Lardière wrote: On 27/01/2023 15:55, Peter Eisentraut wrote: On 27.01.23 14:52, Sébastien Lardière wrote: The attached patch proposes to change the format of timelineid from %u to %X. I think your complaint

Re: Timeline ID hexadecimal format

2023-01-31 Thread Sébastien Lardière
On 31/01/2023 10:53, Peter Eisentraut wrote: On 30.01.23 17:05, Sébastien Lardière wrote: Here's the patch with the suggested format ; plus, I add some note in the documentation about recovery_target_timeline, because I don't get how strtoul(), with the special 0 base parameter can work witho

Re: Scan buffercache for a table

2023-01-31 Thread Justin Pryzby
On Mon, Jan 30, 2023 at 08:11:30PM -0800, Amin wrote: > Thank you Justin. I started a new thread because the context is a little > bit different. I am no longer interested in statistics anymore. I want to > find exact individual pages of a table which are cached and are/aren't > dirty. pg_buffercac

Re: [PoC] Let libpq reject unexpected authentication requests

2023-01-31 Thread Aleksander Alekseev
Hi Peter, > > What is the status of this patch set? Michael had registered himself as > > committer and then removed himself again. So I hadn't been paying much > > attention myself. Was there anything left to discuss? > > Previously I marked the patch as RfC. Although it's been a few months >

Re: Transparent column encryption

2023-01-31 Thread Peter Eisentraut
On 30.01.23 23:30, Jacob Champion wrote: The column encryption algorithm is set per-column -- but isn't it tightly coupled to the CEK, since the key length has to match? From a layperson perspective, using the same key to encrypt the same plaintext under two different algorithms (if they happen t

Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().

2023-01-31 Thread Dean Rasheed
On Tue, 31 Jan 2023 at 08:00, Joel Jacobson wrote: > > I think this is what we want: > > if (arg.weight < 0) > sweight = (arg.weight + 1) * DEC_DIGITS / 2 - 1; > else > sweight = arg.weight * DEC_DIGITS / 2 + 1; > That's still not right. If you want

Re: HOT chain validation in verify_heapam()

2023-01-31 Thread Robert Haas
On Mon, Jan 30, 2023 at 8:24 AM Himanshu Upadhyaya wrote: > Before this we stop the node by "$node->stop;" and then only we progress to > manual corruption. This will abort all running/in-progress transactions. > So, if we create an in-progress transaction and comment "$node->stop;" > then somehow

Re: heapgettup() with NoMovementScanDirection unused in core?

2023-01-31 Thread Melanie Plageman
On Tue, Jan 31, 2023 at 11:46:05PM +1300, David Rowley wrote: > On Tue, 31 Jan 2023 at 09:57, Melanie Plageman > wrote: > > As for the asserts, I was at a bit of a loss as to where to put an > > assert which will make it clear that heapgettup() and > > heapgettup_pagemode() do not handle NoMovemen

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-01-31 Thread Matthias van de Meent
On Mon, 30 Jan 2023 at 21:19, Andres Freund wrote: > On 2023-01-10 21:32:54 +0100, Matthias van de Meent wrote: > > On Tue, 10 Jan 2023 at 20:14, Andres Freund wrote: > > > On 2023-01-10 15:03:42 +0100, Matthias van de Meent wrote: > > > What precisely do you mean with "skew" here? Do you just me

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2023-01-31 Thread Amit Langote
Hi David, On Tue, Jan 24, 2023 at 12:58 PM David Rowley wrote: > On Fri, 20 Jan 2023 at 00:26, vignesh C wrote: > > CFBot shows some compilation errors as in [1], please post an updated > > version for the same: > > I've attached a rebased patch. Thanks for the new patch. Maybe you're planning

[PATCH] Report the query string that caused a memory error under Valgrind

2023-01-31 Thread Onur Tirtir
We use Valgrind --together with the suppression file provided in Postgres repo-- to test Citus extension against memory errors. We replace /bin/postgres executable with a simple bash script that executes the original postgres executable under Valgrind and then we run our usual regression tests.

Re: Assert fcinfo has enough args before allowing parameter access (was: Re: generate_series for timestamptz and time zone problem)

2023-01-31 Thread Tom Lane
Gurjeet Singh writes: > Please see attached the patch to that ensures we don't accidentally > access more parameters than that are passed to a SQL callable > function. I'm unexcited by that. It'd add a pretty substantial amount of code to catch an error that hardly anyone ever makes.

Re: pub/sub - specifying optional parameters without values.

2023-01-31 Thread Tom Lane
Amit Kapila writes: > On Tue, Jan 31, 2023 at 4:25 AM Tom Lane wrote: >> Hmph. I generally think that options defined like this (it's a boolean, >> except it isn't) are a bad idea, and would prefer to see that API >> rethought while we still can. > We have discussed this during development and

Re: Logical replication timeout problem

2023-01-31 Thread Ashutosh Bapat
On Tue, Jan 31, 2023 at 5:12 PM Amit Kapila wrote: > > On Tue, Jan 31, 2023 at 5:03 PM Ashutosh Bapat > wrote: > > > > On Tue, Jan 31, 2023 at 4:58 PM Amit Kapila wrote: > > > > > Thanks, the patch looks good to me. I have slightly adjusted one of > > > the comments and ran pgindent. See attache

Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().

2023-01-31 Thread Joel Jacobson
Hi, On Tue, Jan 31, 2023, at 14:40, Dean Rasheed wrote: > That's still not right. If you want a proper mathematically justified > formula, it's fairly easy to derive. ... > or equivalently, in code with truncated integer division: > > if (arg.weight >= 0) > sweight = arg.weight * DEC_D

Re: Underscores in numeric literals

2023-01-31 Thread Peter Eisentraut
On 23.01.23 21:45, Dean Rasheed wrote: On Wed, 4 Jan 2023 at 09:28, Dean Rasheed wrote: In addition, I think that strip_underscores() could then go away if numeric_in() were made to handle underscores. Essentially then, that would move all responsibility for parsing underscores and non-decima

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-01-31 Thread Ilya Gladyshev
> 17 янв. 2023 г., в 23:44, Tomas Vondra > написал(а): > Do we actually need the new parts_done field? I mean, we already do > track the value - at PROGRESS_CREATEIDX_PARTITIONS_DONE index in the > st_progress_param array. Can't we simply read it from there? Then we > would not have ABI issues w

Re: [BUG] Autovacuum not dynamically decreasing cost_limit and cost_delay

2023-01-31 Thread Scott Mead
On Mon, Jan 23, 2023 at 12:33 PM Alvaro Herrera wrote: > On 2021-Feb-08, Mead, Scott wrote: > > > Hello, > >I recently looked at what it would take to make a running autovacuum > > pick-up a change to either cost_delay or cost_limit. Users frequently > > will have a conservative value set, a

Re: Underscores in numeric literals

2023-01-31 Thread Dean Rasheed
On Tue, 31 Jan 2023 at 15:28, Peter Eisentraut wrote: > > Did you have any thoughts about what to do with the float types? I > guess we could handle those in a separate patch? > I was assuming that we'd do nothing for float types, because anything we did would necessarily impact their performanc

Re: Allow tailoring of ICU locales with custom rules

2023-01-31 Thread Laurenz Albe
On Mon, 2023-01-16 at 12:18 +0100, Peter Eisentraut wrote: > Updated patch attached. I like that patch. It applies and passes regression tests. I played with it: CREATE COLLATION german_phone (LOCALE = 'de-AT', PROVIDER = icu, RULES = '&oe < ö'); SELECT * FROM (VALUES ('od'), ('oe'), ('of

Clarify deleting comments and security labels in synopsis

2023-01-31 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, A user on IRC was confused about how to delete a security label using the `SECURITY LABLEL ON … IS …` command, and looking at the docs I can see why. The synopsis just says `IS 'label'`, which implies that it can only be a string. It's not until you read the description for `label` th

Re: pg_upgrade test failure

2023-01-31 Thread Justin Pryzby
On Tue, Jan 31, 2023 at 02:00:05PM +1300, Thomas Munro wrote: > On Thu, Jan 5, 2023 at 4:11 PM Thomas Munro wrote: > > On Wed, Dec 7, 2022 at 7:15 AM Andres Freund wrote: > > > On 2022-11-08 01:16:09 +1300, Thomas Munro wrote: > > > > So [1] on its own didn't fix this. My next guess is that the

Re: [PATCH] pgbench: add multiconnect option

2023-01-31 Thread vignesh C
On Wed, 11 Jan 2023 at 22:17, vignesh C wrote: > > On Tue, 8 Nov 2022 at 02:16, Fabien COELHO wrote: > > > > > > Hello Ian, > > > > > cfbot reports the patch no longer applies. As CommitFest 2022-11 is > > > currently underway, this would be an excellent time to update the patch. > > > > Attache

Re: [PATCH] Completed unaccent dictionary with many missing characters

2023-01-31 Thread vignesh C
On Mon, 16 Jan 2023 at 20:07, vignesh C wrote: > > On Fri, 4 Nov 2022 at 04:59, Ian Lawrence Barwick wrote: > > > > 2022年7月13日(水) 19:13 Przemysław Sztoch : > > > > > > Dear Michael P., > > > > > > 3. The matter is not that simple. When I change priorities (ie > > > Latin-ASCII.xml is less import

Re: Clarify deleting comments and security labels in synopsis

2023-01-31 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > A user on IRC was confused about how to delete a security label using > the `SECURITY LABLEL ON … IS …` command, and looking at the docs I can > see why. > The synopsis just says `IS 'label'`, which implies that it can only be a > string. It's n

Re: [PATCH] Add <> support to sepgsql_restorecon

2023-01-31 Thread vignesh C
On Wed, 18 Jan 2023 at 23:57, Joe Conway wrote: > > The following review has been posted through the commitfest application: > make installcheck-world: not tested > Implements feature: not tested > Spec compliant: not tested > Documentation:not tested > > This needs re

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2023-01-31 Thread vignesh C
On Thu, 8 Dec 2022 at 00:33, Andres Freund wrote: > > Hi, > > On 2022-11-04 09:25:52 +0100, Drouvot, Bertrand wrote: > > Please find attached a rebase in v7. > > cfbot complains that the docs don't build: > https://cirrus-ci.com/task/6694349031866368?logs=docs_build#L296 > > [03:24:27.317] ref/che

Re: A new strategy for pull-up correlated ANY_SUBLINK

2023-01-31 Thread vignesh C
On Fri, 6 Jan 2023 at 11:46, vignesh C wrote: > > On Sun, 13 Nov 2022 at 04:15, Tom Lane wrote: > > > > Andy Fan writes: > > > In the past we pull-up the ANY-sublink with 2 steps, the first step is to > > > pull up the sublink as a subquery, and the next step is to pull up the > > > subquery if

Re: [PATCH] New [relation] option engine

2023-01-31 Thread vignesh C
On Tue, 3 Jan 2023 at 18:38, vignesh C wrote: > > On Sun, 20 Nov 2022 at 11:42, Nikolay Shaplov wrote: > > > > В письме от воскресенье, 6 ноября 2022 г. 19:22:09 MSK пользователь Nikolay > > Shaplov написал: > > > > > > > > cfbot reports the patch no longer applies. As CommitFest 2022-11 is > >

Re: Adding CommandID to heap xlog records

2023-01-31 Thread vignesh C
On Mon, 16 Jan 2023 at 19:56, vignesh C wrote: > > On Thu, 3 Nov 2022 at 15:06, Ian Lawrence Barwick wrote: > > > > 2022年9月30日(金) 1:04 Matthias van de Meent : > > > > > > On Wed, 28 Sept 2022 at 19:40, Bruce Momjian wrote: > > > > > > > > On Thu, Sep 22, 2022 at 11:12:32PM +0200, Matthias van de

Re: [Proposal] Page Compression for OLTP

2023-01-31 Thread vignesh C
On Fri, 4 Nov 2022 at 07:02, Ian Lawrence Barwick wrote: > > 2022年7月27日(水) 2:47 chenhj : > > > > Hi hackers, > > > > I have rebase this patch and made some improvements. > > > > > > 1. A header is added to each chunk in the pcd file, which records the chunk > > of which block the chunk belongs to

Re: xml2: add test for coverage

2023-01-31 Thread vignesh C
On Tue, 17 Jan 2023 at 17:06, vignesh C wrote: > > On Fri, 25 Nov 2022 at 18:08, Peter Eisentraut > wrote: > > > > On 23.08.22 03:38, Dong Wook Lee wrote: > > > I made a small patch for xml2 to improve test coverage. > > > However, there was a problem using the functions below. > > > > > > - xpat

Re: vacuumlo: add test to vacuumlo for test coverage

2023-01-31 Thread vignesh C
On Tue, 17 Jan 2023 at 17:10, vignesh C wrote: > > On Wed, 16 Nov 2022 at 10:18, Ian Lawrence Barwick wrote: > > > > 2022年9月3日(土) 17:28 Dong Wook Lee : > > > > > > Hi hackers, > > > I write a tiny patch about vacuumlo to improve test coverage. > > > I hope my work is meaningful. > > > > Hi > > >

Re: Fix database creation during installchecks for ICU cluster

2023-01-31 Thread vignesh C
On Tue, 17 Jan 2023 at 17:17, vignesh C wrote: > > On Tue, 29 Nov 2022 at 20:24, Nazir Bilal Yavuz wrote: > > > > Hi, > > > > Thanks for the patch! > > > > > > On 10/29/22 12:54, Marina Polyakova wrote: > > > > > > 1) The ECPG tests fail because they use the SQL_ASCII encoding [2], > > > the data

Re: Clarify deleting comments and security labels in synopsis

2023-01-31 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: >> A user on IRC was confused about how to delete a security label using >> the `SECURITY LABLEL ON … IS …` command, and looking at the docs I can >> see why. > >> The synopsis just says `IS 'label'`, which implies that it can

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-01-31 Thread Tom Lane
Laurenz Albe writes: > [ 0001-Add-EXPLAIN-option-GENERIC_PLAN.v4.patch ] I took a closer look at this patch, and didn't like the implementation much. You're not matching the behavior of PREPARE at all: for example, this patch is content to let $1 be resolved with different types in different pla

Re: Clarify deleting comments and security labels in synopsis

2023-01-31 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > Tom Lane writes: >> Agreed; as-is, the syntax summary is not just confusing but outright >> wrong. >> >> I think we could go further and split the entry under Parameters >> to match: > Makes sense. Something like the attached v2? WFM, will pu

Re: Timeline ID hexadecimal format

2023-01-31 Thread Greg Stark
I actually find it kind of annoying that we use hex strings for a lot of things where they don't add any value. Namely Transaction ID and LSNs. As a result it's always a bit of a pain to ingest these in other tools or do arithmetic on them. Neither is referring to memory or anything where powers of

Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().

2023-01-31 Thread Dean Rasheed
On Tue, 31 Jan 2023 at 15:05, Joel Jacobson wrote: > > I also think the performance impact no matter how small isn't worth it, > but a comment based on your comments would be very valuable IMO. > > Below is an attempt at summarising your text, and to avoid the performance > impact, > maybe an #if

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-01-31 Thread Tom Lane
Aleksander Alekseev writes: >> For either sets of tools, the automatic download option doesn't appear >> to work anymore. This probably has to do with either the https or the >> redirects that have been mentioned. > Peter, thanks for reporting this. I got the same results: neither > tools work w

Re: heapgettup() with NoMovementScanDirection unused in core?

2023-01-31 Thread David Rowley
On Wed, 1 Feb 2023 at 03:02, Melanie Plageman wrote: > > On Tue, Jan 31, 2023 at 11:46:05PM +1300, David Rowley wrote: > > My thoughts were that we might want to put them > > table_scan_getnextslot() and table_scan_getnextslot_tidrange(). My > > rationale for that was that it makes it more clear t

Re: heapgettup() with NoMovementScanDirection unused in core?

2023-01-31 Thread Tom Lane
David Rowley writes: > On Wed, 1 Feb 2023 at 03:02, Melanie Plageman > wrote: >> I previously had the asserts here, but I thought perhaps we shouldn't >> restrict table AMs from using NoMovementScanDirection in whatever way >> they'd like. We care about protecting heapgettup() and >> heapgettup_

Re: pg_upgrade test failure

2023-01-31 Thread Thomas Munro
On Wed, Feb 1, 2023 at 6:28 AM Justin Pryzby wrote: > > I pushed the rmtree() change. Let's see if that helps, or tells us > > something new. > > I found a few failures since then: > > https://api.cirrus-ci.com/v1/artifact/task/6696942420361216/testrun/build/testrun/pg_upgrade/002_pg_upgrade/log/

Re: pg_upgrade test failure

2023-01-31 Thread Andres Freund
Hi, On January 31, 2023 12:54:42 PM PST, Thomas Munro wrote: >On Wed, Feb 1, 2023 at 6:28 AM Justin Pryzby wrote: >> > I pushed the rmtree() change. Let's see if that helps, or tells us >> > something new. >> >> I found a few failures since then: >> >> https://api.cirrus-ci.com/v1/artifact/ta

Re: pg_upgrade test failure

2023-01-31 Thread Thomas Munro
On Wed, Feb 1, 2023 at 10:04 AM Andres Freund wrote: > On January 31, 2023 12:54:42 PM PST, Thomas Munro > wrote: > >I'm not sure about anything, but if that's what's happening here, then > >maybe the attached would help. In short, it would make the previous > >theory true (the idea of a second

Re: pg_upgrade test failure

2023-01-31 Thread Thomas Munro
On Wed, Feb 1, 2023 at 9:54 AM Thomas Munro wrote: > ... I have one more idea ... I also had a second idea, barely good enough to mention and probably just paranoia. In a nearby thread I learned that process exit does not release Windows advisory file locks synchronously, which surprised this Un

Re: Show various offset arrays for heap WAL records

2023-01-31 Thread Peter Geoghegan
On Fri, Jan 27, 2023 at 9:24 AM Melanie Plageman wrote: > I have taken a stab at doing some of the tasks listed in this email. Cool. > I have made the new files rmgr_utils.c/h. > > I have come up with a standard format that I like for the output and > used it in all the heap record types. > > Ex

Re: heapgettup() with NoMovementScanDirection unused in core?

2023-01-31 Thread David Rowley
On Wed, 1 Feb 2023 at 03:02, Melanie Plageman wrote: > > On Tue, Jan 31, 2023 at 11:46:05PM +1300, David Rowley wrote: > > Both can be easily fixed, so no need to submit another patch as far as > > I'm concerned. > > I realized I forgot a commit message in the second version. Patch v1 has > one.

Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().

2023-01-31 Thread Joel Jacobson
On Tue, Jan 31, 2023, at 20:25, Dean Rasheed wrote: > That seems a bit wordy, given the context of this comment. I think > it's sufficient to just give the formula, and note that it simplifies > when DEC_DIGITS is even (not just 4): > > /* > * Assume the input was normalized, so arg.weight

Re: Show various offset arrays for heap WAL records

2023-01-31 Thread Peter Geoghegan
On Tue, Jan 31, 2023 at 1:52 PM Peter Geoghegan wrote: > > I would also like to see functions like XLogRecGetBlockRefInfo() pass > > something more useful than a stringinfo buffer so that we could easily > > extract out the relfilenode in pgwalinspect. > > That does seem particularly important. It

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-01-31 Thread Andres Freund
Hi, On 2023-01-31 15:05:17 +0100, Matthias van de Meent wrote: > On Mon, 30 Jan 2023 at 21:19, Andres Freund wrote: > > In an earlier, not posted, version I had an vacuum_defer_cleanup_age > > specific > > helper function for this, but it seems likely we'll need it in other places > > too. So I

Re: Logical replication timeout problem

2023-01-31 Thread Peter Smith
Here are my review comments for v13-1. == Commit message 1. The DDLs like Refresh Materialized views that generate lots of temporary data due to rewrite rules may not be processed by output plugins (for example pgoutput). So, we won't send keep-alive messages for a long time while process

Re: Show various offset arrays for heap WAL records

2023-01-31 Thread Peter Geoghegan
On Tue, Jan 31, 2023 at 1:52 PM Peter Geoghegan wrote: > Obviously what you're doing here will lead to a significant increase > in the verbosity of the output for affected WAL records. I don't feel > too bad about that, though. It's really an existing problem, and one > that should be fixed either

Re: recovery modules

2023-01-31 Thread Nathan Bossart
On Tue, Jan 31, 2023 at 08:13:11AM +0900, Michael Paquier wrote: > On Mon, Jan 30, 2023 at 12:04:22PM -0800, Nathan Bossart wrote: >> On Mon, Jan 30, 2023 at 11:48:10AM -0800, Andres Freund wrote: >>> I don't think _PG_archive_module_init() should actually allocate a memory >>> context and do other

Re: Rework of collation code, extensibility

2023-01-31 Thread Jeff Davis
On Tue, 2023-01-31 at 11:40 +0100, Peter Eisentraut wrote: > I don't know to what extent this depends on the abbreviated key GUC > discussion.  Does the rest of this patch set depend on this? The overall refactoring is not dependent logically on the GUC patch. It may require some trivial fixup if

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-01-31 Thread Tom Lane
I wrote: > It's worse than that: I find that > export XML_CATALOG_FILES=/dev/null > breaks the docs build on RHEL8 and Fedora 37 (latest) too, with the > same "failed to load external entity" symptom. I conclude from this > that there is no version of xsltproc anywhere that can still downloa

Re: [PoC] Let libpq reject unexpected authentication requests

2023-01-31 Thread Jacob Champion
On Tue, Jan 31, 2023 at 5:20 AM Aleksander Alekseev wrote: > To my knowledge there are no open questions left. I think the > patch is as good as it will ever get. A committer will need to decide whether they're willing to maintain 0003 or not, as mentioned with the v11 post. Which I suppose is th

Re: Non-superuser subscription owners

2023-01-31 Thread Andres Freund
Hi, On 2023-01-30 10:44:29 -0500, Robert Haas wrote: > On a technical level, I think that the idea of having a separate > objection for the connection string vs. the subscription itself is > perfectly sound, and to repeat what I said earlier, if someone wants > to implement that, cool. I also agre

Re: suppressing useless wakeups in logical/worker.c

2023-01-31 Thread Nathan Bossart
On Sat, Jan 28, 2023 at 10:26:25AM +0530, Amit Kapila wrote: > On Fri, Jan 27, 2023 at 4:07 AM Tom Lane wrote: >> Returning to the prior patch ... I don't much care for this: >> >> +/* Maybe there will be a free slot in a second... */ >> +retry_time = Timest

Re: [PoC] Let libpq reject unexpected authentication requests

2023-01-31 Thread Michael Paquier
On Tue, Jan 31, 2023 at 02:03:54PM +0300, Aleksander Alekseev wrote: >> What is the status of this patch set? Michael had registered himself as >> committer and then removed himself again. So I hadn't been paying much >> attention myself. Was there anything left to discuss? Yes, sorry about not

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-01-31 Thread Andres Freund
Hi, On 2023-01-31 18:54:31 -0500, Tom Lane wrote: > 1. I have not tested the meson changes. Works here. > 2. As this is written, you can't override the --nonet options very > easily in the Makefile build (you could do so at runtime by setting > XSLTPROC, but not at configure time); and you can'

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-01-31 Thread Matthias van de Meent
On Tue, 31 Jan 2023 at 23:48, Andres Freund wrote: > > Hi, > > On 2023-01-31 15:05:17 +0100, Matthias van de Meent wrote: > > If TransactionIdRetreatSafely will be exposed outside procarray.c, > > then I think the xid pointer should be replaced with normal > > arguments/returns; both for parity wi

Re: Add progress reporting to pg_verifybackup

2023-01-31 Thread Michael Paquier
On Fri, Jan 06, 2023 at 04:28:42PM +0900, Masahiko Sawada wrote: > I've attached the simple patch to add the progress reporting option to > pg_verifybackup. The progress information is displayed with --progress > option only during the checksum verification, which is the most time > consuming task.

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-01-31 Thread Michael Paquier
On Tue, Jan 11, 2022 at 12:29:44AM +1300, Thomas Munro wrote: > Thanks for testing. Tidied and pushed, to master only for now. I have noticed the following failure for v11~14 on one of my hosts that compiles with -DEXEC_BACKEND, and Nathan has redirected me here: https://buildfarm.postgresql.org/

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-01-31 Thread Tom Lane
Michael Paquier writes: > Could it be worth back-patching f3e7806? That's aged long enough now that it seems like a pretty safe thing to do. regards, tom lane

Re: pg_upgrade test failure

2023-01-31 Thread Thomas Munro
On Wed, Feb 1, 2023 at 10:08 AM Thomas Munro wrote: > On Wed, Feb 1, 2023 at 10:04 AM Andres Freund wrote: > > Maybe we should just handle it by sleeping and retrying, if on windows? Sad > > to even propose... > > Yeah, that's what that code I posted would do automatically, though > it's a bit h

Weird failure with latches in curculio on v15

2023-01-31 Thread Michael Paquier
Hi all, While browsing the buildfarm, I have noticed this failure on curcilio: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=curculio&dt=2023-02-01%2001%3A05%3A17 The test that has reported a failure is the check on the archive module callback: # Failed test 'check shutdown callback o

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-01-31 Thread Michael Paquier
On Tue, Jan 31, 2023 at 08:37:29PM -0500, Tom Lane wrote: > That's aged long enough now that it seems like a pretty safe > thing to do. Thanks. I'll wait for a few days before doing something for my buildfarm stuff, in case somebody thinks this is a bad idea.. -- Michael signature.asc Descripti

Generating "Subplan Removed" in EXPLAIN

2023-01-31 Thread Bruce Momjian
Our document states that EXPLAIN can generate "Subplan Removed": https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITION-PRUNING It is possible to determine the number of partitions which were removed during this phase by observing the “Subplans Remove

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-01-31 Thread Thomas Munro
On Wed, Feb 1, 2023 at 2:58 PM Michael Paquier wrote: > On Tue, Jan 31, 2023 at 08:37:29PM -0500, Tom Lane wrote: > > That's aged long enough now that it seems like a pretty safe > > thing to do. > > Thanks. I'll wait for a few days before doing something for my > buildfarm stuff, in case somebod

Re: Weird failure with latches in curculio on v15

2023-01-31 Thread Andres Freund
Hi, On 2023-02-01 10:53:17 +0900, Michael Paquier wrote: > While browsing the buildfarm, I have noticed this failure on curcilio: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=curculio&dt=2023-02-01%2001%3A05%3A17 > > The test that has reported a failure is the check on the archive >

Re: postgres_fdw uninterruptible during connection establishment / ProcSignalBarrier

2023-01-31 Thread Andres Freund
Hi, On 2023-01-30 12:00:55 -0800, Nathan Bossart wrote: > On Mon, Jan 30, 2023 at 11:49:37AM -0800, Andres Freund wrote: > > Why don't the dblink tests catch this? Any chance you or Robins could > > prepare > > a patch with fix and test, given that you know how to trigger this? > > It's trivial

Re: Generating "Subplan Removed" in EXPLAIN

2023-01-31 Thread Bruce Momjian
On Tue, Jan 31, 2023 at 08:59:57PM -0500, Bruce Momjian wrote: > Our document states that EXPLAIN can generate "Subplan Removed": > > > https://www.postgresql.org/docs/current/ddl-partitioning.html#DDL-PARTITION-PRUNING > > It is possible to determine the number of partitions which w

  1   2   >