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

2024-12-10 Thread Masahiko Sawada
On Mon, Dec 9, 2024 at 10:27 PM Michael Paquier wrote: > > On Tue, Oct 08, 2024 at 03:21:38PM +0530, Shlok Kyal wrote: > > I have tested the scenario shared by you on the thread [1]. And I > > confirm that the latest patch [2] fixes this issue. > > > > [1] > > https://www.postgresql.org/message-i

Re: fix deprecation mention for age() and mxid_age()

2024-12-10 Thread Michael Paquier
On Wed, Dec 11, 2024 at 06:54:23AM +0700, John Naylor wrote: > Hi, there is a CF entry for this -- is it ready to mark committed? Oops. I've missed that there was an entry in CF 51. Updated that now. Thanks for the poke. -- Michael signature.asc Description: PGP signature

Re: Memory leak in WAL sender with pgoutput (v10~)

2024-12-10 Thread Masahiko Sawada
On Tue, Dec 10, 2024 at 6:13 PM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, December 11, 2024 2:14 AM Masahiko Sawada > wrote: > > > > On Tue, Dec 10, 2024 at 1:16 AM Amit Kapila > > wrote: > > > > > > On Tue, Dec 10, 2024 at 11:24 AM Amit Kapila > > wrote: > > > > > > > > On Tue, Dec 10, 20

Re: Make use of pg_memory_is_all_zeros() in more places

2024-12-10 Thread Michael Paquier
On Tue, Dec 10, 2024 at 02:18:33PM +, Bertrand Drouvot wrote: > While searching for memcmp() calls in "*stat*.c" files (due to [1]), it > appeared > that we could $SUBJECT. Please find attached a patch doing so. -SockAddrzero_clientaddr; -memset(&zero_clientaddr, 0

Re: attndims, typndims still not enforced, but make the value within a sane threshold

2024-12-10 Thread Michael Paquier
On Wed, Dec 11, 2024 at 12:15:51AM -0500, Tom Lane wrote: > Michael Paquier writes: > > FWIW, my first thought after reading this paragraph is that you sound > > too dramatic here, especially after looking at codesearch to note that > > the PHP core code stores attndims but does not actually use i

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-10 Thread vignesh C
On Tue, 10 Dec 2024 at 17:17, Shubham Khanna wrote: > > On Mon, Dec 9, 2024 at 7:43 PM vignesh C wrote: > > The attached Patch contains the required changes. Few comments: 1) This is not correct, currently enabling two_phase option using alter subscription is supported: Notably, the replication

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-10 Thread Shubham Khanna
On Wed, Dec 11, 2024 at 4:21 AM Peter Smith wrote: > > Hi Shubham, > > Here are some review comments for patch v2-0001. > > == > GENERAL - the new option name > > 1. > I am not sure if this new switch needed to be called > '--enable-two-phase'; probably just calling it '--two-phase' would > me

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-10 Thread Shubham Khanna
On Wed, Dec 11, 2024 at 10:59 AM vignesh C wrote: > > On Tue, 10 Dec 2024 at 17:17, Shubham Khanna > wrote: > > > > On Mon, Dec 9, 2024 at 7:43 PM vignesh C wrote: > > > > The attached Patch contains the required changes. > > Few comments: > 1) This is not correct, currently enabling two_phase o

Re: Fix comments related to pending statistics

2024-12-10 Thread Michael Paquier
On Tue, Dec 10, 2024 at 02:16:14PM +, Bertrand Drouvot wrote: > 1. One linked to PgStat_TableCounts pending stats, mentioning the use of > memcmp() against zeroes to detect whether there are any stats updates to > apply. > > This is not true anymore as of 07e9e28b56. Oops, you're right. The

RE: Memory leak in pg_logical_slot_{get,peek}_changes

2024-12-10 Thread Zhijie Hou (Fujitsu)
On Wednesday, December 11, 2024 12:28 PM vignesh C wrote: > Hi, > > I'm starting a new thread for one of the issues reported by Sawada-san at [1]. > > This is a memory leak on CacheMemoryContext when using pgoutput via SQL > APIs: > /* Map must live as long as the session does. */ > oldctx = Mem

Re: CREATE SCHEMA ... CREATE DOMAIN support

2024-12-10 Thread Kirill Reshke
Looks like this thread does not move forward. So I'm posting my thoughts to bump it. On Wed, 4 Dec 2024 at 01:07, Tom Lane wrote: > I'm totally willing to throw that possibility overboard > permanently in order to expand the set of creatable object types > without introducing a ton of restrictio

Re: Assert failure on running a completed portal again

2024-12-10 Thread Robert Haas
On Tue, Dec 10, 2024 at 2:53 PM Tom Lane wrote: > Robert Haas writes: > > Thanks for the research, and +1 if you feel like adding more commentary. > > I'm thinking about something like this: > > diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c > index 13f3fcdaee..7eb

Re: Add a warning message when using unencrypted passwords

2024-12-10 Thread Nathan Bossart
On Sat, Dec 07, 2024 at 03:39:55PM +0100, Guillaume Lelarge wrote: > I thought about it, and tried to write a patch. I've mostly copied the > "Deprecate MD5 passwords" patch/commit from Nathan Bossart. My patch works > on current HEAD. Documentation and tests are dealt with. I've been thinking abo

Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)

2024-12-10 Thread Kirill Reshke
On Tue, 10 Dec 2024 at 14:14, Kirill Reshke wrote: > CI fails due to bad naming in the regression test. > The change is deptestdb1 -> regressdeptestdb1 I'm very sorry for spam. PFAv4 regressdeptestdb1 -> regressiondeptestdb1 -- Best regards, Kirill Reshke v4-0001-When-making-dependency-cha

Suggestion to standardize comment format in pg_dump

2024-12-10 Thread Nohez Poonawala
Currently, the pg_dump tool outputs comments in different formats for primary/foreign keys and indexes. Below is the comment format. - for Primary key: -- Name: TABLENAME CONSTRAINTNAME; Type: CONSTRAINT; Schema: SCHEMA; Owner: OWNER - for Foreign key: -- Name: TABLENAME CONSTRAINTNAME; Type:

Re: Sort functions with specialized comparators

2024-12-10 Thread John Naylor
On Mon, Dec 9, 2024 at 8:02 PM Andrey M. Borodin wrote: > > > On 6 Dec 2024, at 08:49, John Naylor wrote: > > That's a good thing to raise right now -- intarray currently doesn't > > have one, and we haven't gotten complaints from people trying to sort > > large arrays and cancel the query. This

Re: Track the amount of time waiting due to cost_delay

2024-12-10 Thread Dilip Kumar
On Tue, Dec 10, 2024 at 11:25 PM Nathan Bossart wrote: > > On Mon, Dec 09, 2024 at 04:41:03PM +, Bertrand Drouvot wrote: > > + time_delayed bigint > > I think it's also worth considering names like total_delay and > cumulative_delay. +1, I vote for total_delay > > + Total amount

Re: Virtual generated columns

2024-12-10 Thread jian he
On Fri, Nov 29, 2024 at 6:01 PM Peter Eisentraut wrote: > The purpose of check_modified_virtual_generated() for trigger functions > written in C. The prevent someone from inserting real values into the > trigger tuples, because they would then be processed by the rest of the > system, which would

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-12-10 Thread vignesh C
On Tue, 10 Dec 2024 at 17:21, Nisha Moond wrote: > > On Fri, Dec 6, 2024 at 11:04 AM vignesh C wrote: > > > > > > Determining the correct time may be challenging for users, as it > > depends on when the active_since value is set, as well as when the > > checkpoint_timeout occurs and the subsequen

RE: Replace IN VALUES with ANY in WHERE clauses during optimization

2024-12-10 Thread postgresql_contributors
Hi Ivan, I tested the patch using the input provided in commands.sql and observed improvements in both planning and execution time. These optimizations are especially noticeable when working with a mulitple tables. Even when querying just a single table, there is a small improvement in planning

<    1   2