Re: pg_verifybackup: TAR format backup verification

2024-09-26 Thread Amul Sul
On Thu, Sep 26, 2024 at 12:18 AM Robert Haas wrote: > > On Thu, Sep 12, 2024 at 7:05 AM Amul Sul wrote: > > The updated version attached. Thank you for the review ! > > I have spent a bunch of time on this and have made numerous revisions. > I hope to commit the result, aftering seeing what you a

Re: Conflict Detection and Resolution

2024-09-26 Thread shveta malik
On Thu, Sep 26, 2024 at 2:57 PM shveta malik wrote: > > On Fri, Sep 20, 2024 at 8:40 AM Nisha Moond wrote: > > > > Thanks for the review. > > Here is the v14 patch-set fixing review comments in [1] and [2]. > > > > Thanks for the patches. I am reviewing patch001, it is WIP, but please > find init

Re: ALTER TABLE ONLY .. DROP CONSTRAINT on partitioned tables

2024-09-26 Thread Amit Langote
Hi Alvaro, On Fri, Sep 27, 2024 at 2:52 AM Alvaro Herrera wrote: > While studying a review note from Jian He on not-null constraints, I > came across some behavior introduced by commit 9139aa19423b[1] that I > think is mistaken. Consider the following example: > > CREATE TABLE parted (a int CONS

Re: query_id, pg_stat_activity, extended query protocol

2024-09-26 Thread Sami Imseih
> I am not sure. The GUCs pretty much enforce this behavior and I doubt > that these are going to break moving on. Of course they would, but we > are usually careful enough about that as long as it is possible to > grep for them. For example see the BRIN case in pageinspect. Yes, I see pageinspect

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-09-26 Thread Yugo NAGATA
On Thu, 26 Sep 2024 16:33:06 -0500 Nathan Bossart wrote: > On Mon, Aug 05, 2024 at 04:05:02PM +0900, Yugo Nagata wrote: > > + > > + While CREATE MATERIALIZED VIEW is running, the > + linkend="guc-search-path"/> is temporarily changed to > > pg_catalog, > > + pg_temp. > > + > > I thin

Re: micro-optimize nbtcompare.c routines

2024-09-26 Thread Nathan Bossart
On Fri, Sep 27, 2024 at 02:50:13PM +1200, David Rowley wrote: > I had been looking at [1] (which I've added your version to now). I > had been surprised to see gcc emitting different code for the first 3 > versions. Clang does a better job at figuring out they all do the same > thing and emitting t

Re: Add has_large_object_privilege function

2024-09-26 Thread Yugo NAGATA
On Thu, 26 Sep 2024 17:16:07 +0900 Michael Paquier wrote: > On Fri, Sep 13, 2024 at 03:56:11PM +0900, Yugo Nagata wrote: > > I confirmed the patches are committed in the master branch. > > Thank you! > > > > I've updated the commitfest status to "committed". > > This patch has been committed as

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-26 Thread Nathan Bossart
On Wed, Sep 25, 2024 at 08:04:59PM +, Max Johnson wrote: > I think your patch looks good, no objections. I am happy to have contributed. Great. I've attached what I have staged for commit. My first instinct was to not bother back-patching this since all currently-supported versions will have

Re: micro-optimize nbtcompare.c routines

2024-09-26 Thread David Rowley
On Fri, 27 Sept 2024 at 08:17, Nathan Bossart wrote: > Here's a patch that adjusts several routines in nbtcompare.c and related > files to use the branchless integer comparison functions added in commit > 6b80394. It's probably unlikely this produces a measurable benefit (at > least I've been una

Re: Modify comment in /postgres/src/bin/pg_walsummary/nls.mk

2024-09-26 Thread Fujii Masao
On 2024/09/26 15:05, btnakamurakoukil wrote: Hi hackers, I noticed incorrect comment in  /postgres/src/bin/pg_walsummary/nls.mk. The part that should be "pg_walsummary" is "pg_combinebackup", patch attached. This seems a simple copy/paste mistake when the file was created. Thanks for the pa

Re: Truncate logs by max_log_size

2024-09-26 Thread Euler Taveira
On Thu, Sep 26, 2024, at 3:30 PM, diPhantxm wrote: > I would like to suggest a patch to truncate some long queries. I believe > sometimes there is no need to log a query containing some gigabytes of blob, > for example. In patch a new parameter, named max_log_size, is introduced. It > defines th

Re: Pgoutput not capturing the generated columns

2024-09-26 Thread Masahiko Sawada
On Wed, Sep 25, 2024 at 11:15 PM Peter Smith wrote: > > Hi, I have written a new patch to document this feature. > > The patch adds a new section to the "Logical Replication" chapter. It > applies atop the existing patches. > > v33-0001 (same as v32-0001) > v33-0002 (same as v32-0002) > v33-0003 (

Re: query_id, pg_stat_activity, extended query protocol

2024-09-26 Thread Michael Paquier
On Thu, Sep 26, 2024 at 10:55:37PM +, Imseih (AWS), Sami wrote: > Sorry about my last reply. Not sure what happened with my email client. > Here it is again. No worries. > glad to see the asserts are working as expected ad finding these issues. > I took a look at the patch and tested it. It l

Re: query_id, pg_stat_activity, extended query protocol

2024-09-26 Thread Imseih (AWS), Sami
> Attached is the patch I am finishing with, with some new tests for > BRIN and btree to force parallel builds with immutable expressions > through functions. Sorry about my last reply. Not sure what happened with my email client. Here it is again. glad to see the asserts are working as expected

Re: query_id, pg_stat_activity, extended query protocol

2024-09-26 Thread Sami Imseih
> Attached is the patch I am finishing with, with some new tests for > BRIN and btree to force parallel builds with immutable expressions > through functions. glad to see the asserts are working as expected ad finding these issues. I took a look at the patch and tested it. It looks good. My only c

Re: Add has_large_object_privilege function

2024-09-26 Thread Michael Paquier
On Thu, Sep 26, 2024 at 07:51:06PM +0900, Fujii Masao wrote: > So, are you planning to commit the patch? If not, I'm happy to handle it! I have some time to look at the buildfarm today, so I'll just go do it now. Thanks for checking the patch. -- Michael signature.asc Description: PGP signature

Re: AIO writes vs hint bits vs checksums

2024-09-26 Thread Thomas Munro
On Wed, Sep 25, 2024 at 12:45 PM Thomas Munro wrote: > On Wed, Sep 25, 2024 at 8:30 AM Andres Freund wrote: > > However, our habit of modifying buffers while IO is going on is > > causing issues with filesystem level checksums as well, as evidenced by the > > fact that debug_io_direct = data on b

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-09-26 Thread Nathan Bossart
On Mon, Aug 05, 2024 at 04:05:02PM +0900, Yugo Nagata wrote: > + > + While CREATE MATERIALIZED VIEW is running, the + linkend="guc-search-path"/> is temporarily changed to pg_catalog, > + pg_temp. > + I think we should mention that this is not true when WITH NO DATA is used. Maybe somet

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-26 Thread Nathan Bossart
On Tue, Sep 24, 2024 at 02:26:08PM -0500, Nathan Bossart wrote: > On Tue, Sep 24, 2024 at 01:21:45PM +0900, Michael Paquier wrote: >> On Mon, Sep 23, 2024 at 10:50:21AM -0500, Nathan Bossart wrote: >>> I carefully inspected all the code paths this patch touches, and I think >>> I've got all the det

micro-optimize nbtcompare.c routines

2024-09-26 Thread Nathan Bossart
Here's a patch that adjusts several routines in nbtcompare.c and related files to use the branchless integer comparison functions added in commit 6b80394. It's probably unlikely this produces a measurable benefit (at least I've been unable to find any in my admittedly-limited testing), but in theo

Re: Retiring is_pushed_down

2024-09-26 Thread Tom Lane
Richard Guo writes: > When forming an outer join's joinrel, we have the is_pushed_down flag in > RestrictInfo nodes to distinguish those quals that are in that join's > JOIN/ON condition from those that were pushed down to the joinrel and > thus act as filter quals. Since now we have the outer-jo

Re: [ecpg bug]: can not use single '*' in multi-line comment after c preprocessor directives

2024-09-26 Thread Tom Lane
"Winter Loo" writes: > The following code fails to pass the ecpg compilation, although it is > accepted by the gcc compiler. Yeah ... an isolated "/" inside the comment doesn't work either. > Confused! I am uncertain how to rectify the regex. I hope someone can address > this bug. I poked at

Re: miscellaneous pg_upgrade cleanup

2024-09-26 Thread Nathan Bossart
Committed. -- nathan

Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest

2024-09-26 Thread Jelte Fennema-Nio
On Thu, 26 Sept 2024 at 08:06, Robert Haas wrote: > Focusing on the first patch seems odd to me, though Indeed the first few patches will often be small, and the big patch will appear later. When I split patches up, those small patches should usually be reviewable without looking at the big patch

Re: [PATCH] Support Int64 GUCs

2024-09-26 Thread Alexander Korotkov
On Thu, Sep 26, 2024 at 12:30 PM wenhui qiu wrote: > I think we need int64 GUCs, due to these parameters( > autovacuum_freeze_table_age, autovacuum_freeze_max_age,When a table age is > greater than any of these parameters an aggressive vacuum will be performed, > When we implementing xid

Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest

2024-09-26 Thread Robert Haas
On Wed, Sep 25, 2024 at 2:55 AM Jelte Fennema-Nio wrote: > Another thing that I'm interested in adding is some metric of patch > size, so it's easier to find small patches that are thus hopefully > "easy" to review. To accommodate multi-patch emails, I'm thinking of > showing lines changed in the

ALTER TABLE ONLY .. DROP CONSTRAINT on partitioned tables

2024-09-26 Thread Alvaro Herrera
Hello While studying a review note from Jian He on not-null constraints, I came across some behavior introduced by commit 9139aa19423b[1] that I think is mistaken. Consider the following example: CREATE TABLE parted (a int CONSTRAINT the_check CHECK (a > 0)) PARTITION BY LIST (a); CREATE TABLE

Truncate logs by max_log_size

2024-09-26 Thread diPhantxm
Hi hackers, I would like to suggest a patch to truncate some long queries. I believe sometimes there is no need to log a query containing some gigabytes of blob, for example. In patch a new parameter, named max_log_size, is introduced. It defines the maximum size of logged query, in bytes. Everyth

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-26 Thread Shayon Mukherjee
Hello, I am back with a PATCH :). Thanks to everyone in the threads for all the helpful discussions. This proposal is for a PATCH to introduce a GUC variable to disable specific indexes during query planning. This is an alternative approach to the previous PATCH I had proposed and is improved

Re: SQL:2023 JSON simplified accessor support

2024-09-26 Thread Andrew Dunstan
On 2024-09-26 Th 11:45 AM, Alexandra Wang wrote: Hi, I didn’t run pgindent earlier, so here’s the updated version with the correct indentation. Hope this helps! This is a really nice feature, and provides a lot of expressive power for such a small piece of code. I notice this doesn't see

Re: not null constraints, again

2024-09-26 Thread Alvaro Herrera
On 2024-Sep-26, jian he wrote: > +-- a PK in parent must have a not-null in child that it can mark inherited > +create table inh_parent (a int primary key); > +create table inh_child (a int primary key); > +alter table inh_child inherit inh_parent; -- nope > +alter table inh_child alter a set not

Re: [PATCH] Support Int64 GUCs

2024-09-26 Thread Tom Lane
Alexander Korotkov writes: > Do you think we don't need int64 GUCs just now, when 64-bit > transaction ids are far from committable shape? Or do you think we > don't need int64 GUCs even if we have 64-bit transaction ids? If yes, > what do you think we should use for *_age variables with 64-bit

Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges

2024-09-26 Thread Tom Lane
Christoph Berg writes: > I wish there was. The error reporting from failing extension scripts > is really bad with no context at all, it has hit me a few times in the > past already. Nobody's spent any work on that :-(. A really basic reporting facility is not hard to add, as in the attached fin

Re: SQL:2023 JSON simplified accessor support

2024-09-26 Thread Alexandra Wang
Hi, I didn’t run pgindent earlier, so here’s the updated version with the correct indentation. Hope this helps! Best, Alex v4-0001-Add-JSON-JSONB-simplified-accessor.patch Description: Binary data

Re: Test improvements and minor code fixes for formatting.c.

2024-09-26 Thread Tom Lane
Nathan Bossart writes: > On Sun, Sep 08, 2024 at 05:32:16PM -0400, Tom Lane wrote: >> In looking at this, I found that there's also no test coverage >> for the , V, or PL format codes. Also, the possibility of >> overflow while converting an input value to int in order to >> pass it to int_to

Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges

2024-09-26 Thread Christoph Berg
Re: Michael Banck > I guess there's no way to make that error a bit more helpful, like > printing out the offenbding SQL command, presumably because we are > loding an extension? I wish there was. The error reporting from failing extension scripts is really bad with no context at all, it has hit m

RFC/PoC: GUC option to enable tuple queue autoflush for parallel workers

2024-09-26 Thread Francesco Degrassi
Hi all. A brief overview of our use case follows. We are developing a foreign data wrapper which employs parallel scan support and predicate pushdown; given the types of queries we run, foreign scans can be very long and often return very few rows. As the scan can be very long and slow, we'd like

Re: Add new COPY option REJECT_LIMIT

2024-09-26 Thread torikoshia
On 2024-09-25 02:22, Fujii Masao wrote: Thanks for your review! Attached v5 patch. On 2024/09/24 14:25, torikoshia wrote: Updated the patch. Thanks for updating the patch! +REJECT_LIMIT { class="parameter">integer } The curly braces {} seem unnecessary here. + When a positive in

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-26 Thread Max Johnson
Hi there, I have amended my patch to reflect the changes that were discussed and have verified on my system that it works the same as before. I have also fixed a typo and changed the name of the patch to more accurately reflect what it does now. Please let me know if there is anything else you'

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-09-26 Thread Max Johnson
Hi Nathan, I think your patch looks good, no objections. I am happy to have contributed. Thanks, Max From: Nathan Bossart Sent: Wednesday, September 25, 2024 1:48 PM To: Max Johnson Cc: t...@sss.pgh.pa.us ; pgsql-hack...@postgresql.org Subject: Re: pg_ctl/misc

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2024-09-26 Thread Florents Tselai
On Thu, Sep 26, 2024 at 1:55 PM Alexander Korotkov wrote: > On Thu, Sep 26, 2024 at 12:04 AM Tom Lane wrote: > > Florents Tselai writes: > > > This patch is a follow-up and generalization to [0]. > > > It adds the following jsonpath methods: lower, upper, initcap, > l/r/btrim, > > > replace, s

Re: Add on_error and log_verbosity options to file_fdw

2024-09-26 Thread torikoshia
On 2024-09-25 00:46, Fujii Masao wrote: Thanks for the comments! On 2024/09/24 20:08, torikoshia wrote: Thanks for the explanation and suggestion. Since there is almost the same code in copyfrom.c, attached 0003 patch for refactoring both. Thanks for updating the patches! Regarding 0002.pat

Re: not null constraints, again

2024-09-26 Thread jian he
+-- a PK in parent must have a not-null in child that it can mark inherited +create table inh_parent (a int primary key); +create table inh_child (a int primary key); +alter table inh_child inherit inh_parent; -- nope +alter table inh_child alter a set not null; +alter table inh_child inherit inh_p

RE: long-standing data loss bug in initial sync of logical replication

2024-09-26 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, > Hi, > > I tried to add changes to selectively invalidate the cache to reduce > the performance degradation during the distribution of invalidations. Thanks for improving the patch! >... > > Solution: > 1. When we alter a publication using commands like ‘ALTER PUBLICATION > pub_na

Re: Documentation to upgrade logical replication cluster

2024-09-26 Thread Amit Kapila
On Wed, Sep 25, 2024 at 6:07 PM vignesh C wrote: > > Yes, users can upgrade either the publisher first and then the > subscriber, or the subscriber first and then the publisher. I felt > this note is necessary only for the "Steps to upgrade a two-node > logical replication cluster," as it may conf

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2024-09-26 Thread Alexander Korotkov
Hi, Florents! On Wed, Sep 25, 2024 at 9:18 PM Florents Tselai wrote: > This patch is a follow-up and generalization to [0]. > > It adds the following jsonpath methods: lower, upper, initcap, l/r/btrim, > replace, split_part. > > It makes jsonpath able to support expressions like these: > > sele

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2024-09-26 Thread Alexander Korotkov
On Thu, Sep 26, 2024 at 12:04 AM Tom Lane wrote: > Florents Tselai writes: > > This patch is a follow-up and generalization to [0]. > > It adds the following jsonpath methods: lower, upper, initcap, l/r/btrim, > > replace, split_part. > > How are you going to deal with the fact that this makes j

Re: Add has_large_object_privilege function

2024-09-26 Thread Fujii Masao
On 2024/09/26 17:16, Michael Paquier wrote: On Fri, Sep 13, 2024 at 03:56:11PM +0900, Yugo Nagata wrote: I confirmed the patches are committed in the master branch. Thank you! I've updated the commitfest status to "committed". This patch has been committed as of 4eada203a5a8, and introduce

Re: meson and check-tests

2024-09-26 Thread Nazir Bilal Yavuz
Hi, On Thu, 26 Sept 2024 at 08:45, Ashutosh Bapat wrote: > > On Wed, Sep 25, 2024 at 8:24 PM Nazir Bilal Yavuz wrote: > > > > Additionally, the patch I shared earlier was only for regress/regress > > tests. From what I understand from here [1], only regress/regress > > tests support 'make check-

Re: First draft of PG 17 release notes

2024-09-26 Thread Amit Kapila
On Sat, Sep 21, 2024 at 1:50 AM Bruce Momjian wrote: > > On Fri, Sep 20, 2024 at 04:05:11PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > Patch applied to PG 17. > > > > I don't see a push? > > Push was delayed because my test script found some uncommitted files due > to earlier testing.

Re: [PATCH] Support Int64 GUCs

2024-09-26 Thread wenhui qiu
Hi Alexander I think we need int64 GUCs, due to these parameters( autovacuum_freeze_table_age, autovacuum_freeze_max_age,When a table age is greater than any of these parameters an aggressive vacuum will be performed, When we implementing xid64, is it still necessary to be in the int range?

Re: Conflict Detection and Resolution

2024-09-26 Thread shveta malik
On Fri, Sep 20, 2024 at 8:40 AM Nisha Moond wrote: > > Thanks for the review. > Here is the v14 patch-set fixing review comments in [1] and [2]. > Thanks for the patches. I am reviewing patch001, it is WIP, but please find initial set of comments: 1) Please see these 2 errors: postgres=# create

Re: Add support to TLS 1.3 cipher suites and curves lists

2024-09-26 Thread Daniel Gustafsson
Attached is a v7 which address a test failure in the CI. It turns out that the test_misc module gather GUC names using the :alpha: character class which only allows alphabetic whereas GUC names can have digits in them. The 0001 patch fixes this by instead using the :alnum: character class which a

Re: Clock-skew management in logical replication

2024-09-26 Thread Amit Kapila
On Wed, Sep 25, 2024 at 3:09 PM Hayato Kuroda (Fujitsu) wrote: > > > Though this provides a way for users to control values required for > > conflict resolution, I prefer a simple approach at least for the first > > version which is to document that users should ensure time > > synchronization via

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-09-26 Thread Jehan-Guillaume de Rorthais
On Wed, 25 Sep 2024 16:14:07 +0200 Jehan-Guillaume de Rorthais wrote: > On Wed, 25 Sep 2024 14:42:40 +0200 > Jehan-Guillaume de Rorthais wrote: > > > On Thu, 5 Sep 2024 00:57:28 +0200 > > Jehan-Guillaume de Rorthais wrote: > […] > > > > > > Please, find in attachment a patch implementing th

Re: Add has_large_object_privilege function

2024-09-26 Thread Michael Paquier
On Fri, Sep 13, 2024 at 03:56:11PM +0900, Yugo Nagata wrote: > I confirmed the patches are committed in the master branch. > Thank you! > > I've updated the commitfest status to "committed". This patch has been committed as of 4eada203a5a8, and introduced this block in pg_proc.dat: { oid => '455

Re: Add system column support to the USING clause

2024-09-26 Thread Denis Garsh
Hello, I'm still hoping for an answer. -- Best regards, Denis Garsh

Re: not null constraints, again

2024-09-26 Thread jian he
Please check the attached minor doc changes. make the create_foreign_table.sgml, alter_foreign_table.sgml not-null description consistent with normal tables. change doc/src/sgml/ref/create_table.sgml Parameters section from NOT NULL to NOT NULL [ NO INHERIT ] . in doc/src/sgml/ref/alter_table.

Re: CREATE INDEX regression in 17 RC1 or expected behavior?

2024-09-26 Thread Tom Dunstan
On Thu, 26 Sept 2024 at 13:21, Yugo Nagata wrote: > By the way, this is not mentioned in CREATE MATERIALIZED VIEW > documentation, although > we can find in REFRESH MATERIALIZED VIEW doc. So, I sent the doc patch in > [1], > and create a commitfest entry [2]. > Thanks. I suggest adding CREATE I

Re: CREATE INDEX regression in 17 RC1 or expected behavior?

2024-09-26 Thread Tom Dunstan
On Thu, 26 Sept 2024 at 12:22, Tom Dunstan wrote: > I presume that this is related to the work in 17 around using restricted > search paths in more places, but it's just a guess. CREATE INDEX isn't > mentioned in the release notes. > Reading a bit closer yields: > Functions used by expression i

Re: Psql meta-command conninfo+

2024-09-26 Thread Hunaid Sohail
Hi, This patch renames "Current User" to "Authenticated User" as suggested by me in my last email. I have also updated the documentation accordingly. On Tue, Sep 17, 2024 at 4:53 PM Hunaid Sohail wrote: > We can update the docs as follows: > Authenticated User: The name of the user returned by