RFC: Packing the buffer lookup table

2025-01-29 Thread Matthias van de Meent
Hi, Some time ago I noticed that every buffer table entry is quite large at 40 bytes (+8): 16 bytes of HASHELEMENT header (of which the last 4 bytes are padding), 20 bytes of BufferTag, and 4 bytes for the offset into the shared buffers array, with generally 8 more bytes used for the bucket pointe

Re: Show WAL write and fsync stats in pg_stat_io

2025-01-29 Thread Michael Paquier
On Wed, Jan 29, 2025 at 02:57:21PM +0300, Nazir Bilal Yavuz wrote: > On Tue, 28 Jan 2025 at 07:23, Michael Paquier wrote: >> What you doing in 0001 is a first good step towards this goal, as this >> also plugs in a few things for backend statistics with the calls to >> pgstat_count_io_op[_time]().

Re: Feature Request: Add AES-128-CFB Mode Support to pgcrypto

2025-01-29 Thread Vladyslav Nebozhyn
Dear Umar, I sincerely apologize for missing your email earlier. I truly appreciate the time and effort you put into creating the patch—it looks great! Thank you for your work on this and for contributing to the solution so quickly. I’m really glad to see this enhancement being added to pgcrypto,

Confusing variable naming in LWLockRelease

2025-01-29 Thread Jacob Brazeal
Hello all, In the LWLockRelease function, we have the following snippet: */** * * Release my hold on lock, after that it can immediately be acquired by * others, even if we still have to wakeup other waiters. */ if (mode == LW_EXCLUSIVE) oldstate = pg_atomic_sub_fetch_u32(&lock->state, LW_V

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-29 Thread Peter Smith
On Tue, Jan 28, 2025 at 9:26 PM Masahiko Sawada wrote: > > On Mon, Jan 27, 2025 at 7:01 PM Peter Smith wrote: > > ... > > To be honest, I didn't understand the "CLEAR" part of that name. It > > seems more like it should've been called something like > > RBTXN_IS_SERIALIZED_ALREADY or RBTXN_IS_SE

RE: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Hayato Kuroda (Fujitsu)
Dear Nisha, Thanks for creating a patch! > Removed patch v1-0001. Please find the attached version 2 of 0002, > which is now v2-0001. ISMT error_if_invalid is set to true when the slot is using and set to false when dropping. One exception is the slot_sync, but it has already had mechanism to h

Re: An improvement of ProcessTwoPhaseBuffer logic

2025-01-29 Thread Michael Paquier
On Thu, Jan 30, 2025 at 08:57:23AM +0900, Michael Paquier wrote: > So the situation is a bit of a mess in all the branches, a bit worse > in 17~ due to the fact that epochs are poorly integrated, but I'm > getting there with a set of patches mostly ready to be sent, and I > think that this would be

Re: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Nisha Moond
On Thu, Jan 30, 2025 at 9:56 AM Amit Kapila wrote: > > On Thu, Jan 30, 2025 at 5:23 AM Peter Smith wrote: > > > > My understanding was that the purpose of this patch was not anything > > to do with "optimisations" per se, but rather it was (like the > > $SUBJECT says) to ensure the *same* 'active

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-01-29 Thread Amit Kapila
On Thu, Jan 30, 2025 at 6:21 AM Peter Smith wrote: > > On Wed, Jan 29, 2025 at 4:44 PM Amit Kapila wrote: > > > > On Tue, Jan 28, 2025 at 12:01 PM Ashutosh Bapat > > wrote: > > > > > > If we want to stick to --database= supporting a pattern looks better > > > than just a single special pattern *

Error in StrategySyncStart() prologue

2025-01-29 Thread Ashutosh Bapat
Hi, The prologue of StrategySyncStart() mentions BufferSync(), but the latter function does not call the first function. Instead StrategySyncStart() is called by BgBufferSync() which uses the buffer id provided by the first function to decide the buffer from where to start syncing as mentioned in t

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-29 Thread Peter Smith
Some comments for patch v17-0001. == Commit message. 1. typo /noticeble/noticeable/ == .../replication/logical/reorderbuffer.c ReorderBufferCheckAndTruncateAbortedTXN: 2. It seemed tricky that the only place that is setting the RBTXN_IS_COMMITTED flag is the function ReorderBufferCheck

Re: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Amit Kapila
On Thu, Jan 30, 2025 at 5:23 AM Peter Smith wrote: > > My understanding was that the purpose of this patch was not anything > to do with "optimisations" per se, but rather it was (like the > $SUBJECT says) to ensure the *same* 'active_since' timestamp value > gets assigned. > > E.g the change to R

Re: Index AM API cleanup

2025-01-29 Thread Mark Dilger
> On Jan 24, 2025, at 11:18 PM, Peter Eisentraut wrote: > > I've been working on integrating Mark's "Index AM API cleanup" patch set with > the existing gist strategy number mapping from Paul's application time patch > set. Here is what I've come up with. Thank you. > The previously commi

Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.

2025-01-29 Thread Tom Lane
Heikki Linnakangas writes: > Huge +1 for cleaning up this abuse of caseValue_datum/domainValue_datum. > While correct and sensible if we continue the abuse, these patches feel > like putting lipstick on a pig. Agreed. I spent some time trying to do it better, with results shown at [1]. If we

Getting rid of CaseTestExpr (well, partially)

2025-01-29 Thread Tom Lane
We've wanted to refactor or get rid of CaseTestExpr for quite awhile, as a consequence of bugs caused by the loose connection between CaseTestExpr and the node supplying its value. The increasing use of it for random purposes like JsonExpr hasn't made things any safer. While this has been in the b

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-01-29 Thread Peter Smith
On Wed, Jan 29, 2025 at 4:44 PM Amit Kapila wrote: > > On Tue, Jan 28, 2025 at 12:01 PM Ashutosh Bapat > wrote: > > > > If we want to stick to --database= supporting a pattern looks better > > than just a single special pattern *. > > > > This sounds reasonable to me as well. Note that the intera

Re: An improvement of ProcessTwoPhaseBuffer logic

2025-01-29 Thread Michael Paquier
On Wed, Jan 29, 2025 at 03:00:54PM +0300, Vitaly Davydov wrote: > It seems, there are much deeper problems with twophase transactions > as I thought. I'm interested in fixing twophase transactions, > because I support a solution which actively uses twophase > transactions. I'm interested to get mor

Re: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Peter Smith
On Wed, Jan 29, 2025 at 7:56 PM Amit Kapila wrote: > > On Wed, Jan 29, 2025 at 7:50 AM Peter Smith wrote: > > > > Some review comments for patch v1-0001. > > > > == > > src/backend/replication/logical/slotsync.c > > > > ReplSlotSyncWorkerMain: > > > > 1. > > + /* Use same inactive_since time

Re: Pgoutput not capturing the generated columns

2025-01-29 Thread Peter Smith
On Wed, Jan 29, 2025 at 2:48 PM Amit Kapila wrote: > > On Wed, Jan 29, 2025 at 6:03 AM Peter Smith wrote: > > > > On Tue, Jan 28, 2025 at 7:59 PM Amit Kapila wrote: > > > > > > On Thu, Jan 23, 2025 at 9:58 AM vignesh C wrote: > > > > > > > > > > I have pushed the remaining part of this patch. N

Re: Sample rate added to pg_stat_statements

2025-01-29 Thread Sami Imseih
> and we've been trying to solve a non-existent problem? Anecdotally speaking, Most users will encounter bottlenecks due to exclusive locks on pgss hash ( dealloc and garbage collection ) more often than they will on the spinlock. The spinlock will likely become more of an issue when you are not s

pg_rewind with --write-recovery-conf option doesn't write dbname to primary_conninfo value.

2025-01-29 Thread Masahiko Sawada
Hi, I found that pg_rewind with --write-recovery-conf option doesn't write the dbname to an auto-generated primary_conninfo value. Therefore, after a failover, the old primary cannot start if it's rewound by pg_rewind with --write-recovery-conf option if sync_replication_slots is on. Is it an over

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-01-29 Thread Melanie Plageman
On Wed, Jan 22, 2025 at 4:24 PM Melanie Plageman wrote: > > On Mon, Dec 9, 2024 at 1:22 AM Dilip Kumar wrote: > > > > Are we planning to commit this refactoring? I think this refactoring > > makes the overall code of BitmapHeapNext() quite clean and readable. > > I haven't read all patches but 00

Re: preptlist.c can insert unprocessed expression trees

2025-01-29 Thread Sami Imseih
> to a varchar length-checking function and then to CoerceToDomain. > Of course they really ought to look the same. +1. I confirmed this as well with the supplied test case. > In the attached 0001 patch I called it > coerce_null_to_domain and put it in parse_coerce.c. I do think the name of the

Re: Optimization for lower(), upper(), casefold() functions.

2025-01-29 Thread Alexander Borisov
Sorry, I made a mistake in the code. It's not worth watching this patch yet. 29.01.2025 23:23, Alexander Borisov пишет: Hi, hackers! I propose to consider a simple optimization for Unicode case tables. The main changes affect the generate-unicode_case_table.pl file. Because of the modified app

Re: Extended Statistics set/restore/clear functions.

2025-01-29 Thread Corey Huinker
On Wed, Jan 29, 2025 at 2:50 AM jian he wrote: > hi. > > select '{"1, 0B100101":"NaN"}'::pg_ndistinct; > pg_ndistinct > > {"1, 37": -2147483648} > (1 row) > I think my initial reaction is to just refuse those special values, but I'll look into the parsing code to

Re: Extended Statistics set/restore/clear functions.

2025-01-29 Thread Corey Huinker
On Tue, Jan 28, 2025 at 11:25 AM jian he wrote: > hi. > I reviewed 0001 only. > > in src/backend/statistics/mvdistinct.c > > no need #include "nodes/pg_list.h" since > src/include/statistics/statistics.h sub level include "nodes/pg_list.h" > > no need #include "utils/palloc.h" > sicne #include "p

Idea: lock_timeout scoped by lock types

2025-01-29 Thread James Coleman
Hello, We've put a lot of effort (as I know many others have) into ensuring any DDL we run in production doesn't block (or, at least, doesn't block for more than a very short amount of time). That includes the obvious: e.g., don't do operations that require rewriting or scanning a large table unde

Re: Eagerly scan all-visible pages to amortize aggressive vacuum

2025-01-29 Thread Melanie Plageman
On Wed, Jan 29, 2025 at 12:59 PM Masahiko Sawada wrote: > > I missed to mention; it's about the tab completion for > vacuum_max_easter_freeze_failure storage parameter. We still need to > update the tab-complete.in.c file (I mentioned the wrong file > previously) for that. Ah, thanks! I didn't re

Re: Should heapam_estimate_rel_size consider fillfactor?

2025-01-29 Thread Heikki Linnakangas
On 03/07/2023 20:54, Tomas Vondra wrote: Pushed, using the formula with two divisions (as in the original patch). I ran into an issue with this, in the case of a small fillfactor and wide tuple width: On v16: postgres=# create table t (data char(900)) with (fillfactor = 10, autovacuum_enab

Re: Sample rate added to pg_stat_statements

2025-01-29 Thread Ilia Evdokimov
On 28.01.2025 23:50, Ilia Evdokimov wrote: If anyone has the capability to run this benchmark on machines with more CPUs or with different queries, it would be nice. I’d appreciate any suggestions or feedback. I wanted to share some additional benchmarks I ran as well on a r8g.48xlarge (

Re: Fwd: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?

2025-01-29 Thread Tom Lane
Srinath Reddy writes: > as suggested did not change the BufferIsExclusiveLocked's signature and > here's the patch for the same. Yeah, that's better. The whole point of changing these is to make them do what extensions could reasonably expect, so a new API does not seem like what's wanted. If w

Re: Eagerly scan all-visible pages to amortize aggressive vacuum

2025-01-29 Thread Masahiko Sawada
On Wed, Jan 29, 2025 at 6:08 AM Melanie Plageman wrote: > > On Tue, Jan 28, 2025 at 4:38 PM Masahiko Sawada wrote: > > > > > > Thank you for updating the patch! These updates look good to me. > > Thanks for taking another look! > > > BTW I realized that we need to update tab-complete.c too to sup

Re: Proposal: Progressive explain

2025-01-29 Thread Rafael Thofehrn Castro
Hi, Thanks for the valuable feedback Tomas. I am sending a new version of the patch that includes: - Changed instrumented plan printing based on timeouts instead of sampling. This works perfectly and benchmarks are promising. So new GUC progressive_explain_sampe_rate is removed. - Removed all par

Re: Back patch of Remove durable_rename_excl()

2025-01-29 Thread Nitin Jadhav
Thank you for providing the details. I agree to the concern about breaking extensions that depend on the function. Gradually phasing it out as versions become unsupported seems like a sensible approach. Best Regards, Nitin Jadhav Azure Database for PostgreSQL Microsoft On Mon, Jan 27, 2025 at 8:4

Re: Windows CFBot is broken because ecpg dec_test.c error

2025-01-29 Thread Andres Freund
Hi, On 2025-01-29 18:24:45 +0300, Nazir Bilal Yavuz wrote: > On Tue, 28 Jan 2025 at 17:02, Andres Freund wrote: > > > > Hi, > > > > On January 28, 2025 7:13:16 AM EST, Jelte Fennema-Nio > > wrote: > > >Since about ~11 hours ago the ecpg test is consistently failing on > > >Window with this erro

Re: Logging parallel worker draught

2025-01-29 Thread Benoit Lobréau
On 1/29/25 12:41 AM, Sami Imseih wrote: There will both be an INFO ( existing behavior ) and LOG ( new behavior ). This seems wrong to me and there should only really be one mechanism to log parallel workers for utility statements. Others may have different opinions. In the use case you describ

Re: Eagerly scan all-visible pages to amortize aggressive vacuum

2025-01-29 Thread Melanie Plageman
On Fri, Jan 24, 2025 at 11:20 AM Robert Haas wrote: > > On Fri, Jan 24, 2025 at 9:15 AM Melanie Plageman > wrote: > > So, in this case, there is only one table in question, so 1 autovacuum > > worker (and up to 2 maintenance parallel workers for index vacuuming). > > The duration I provided is ju

getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote

2025-01-29 Thread Mahendra Singh Thalor
Hi, While doing some testing with pg_dumpall, I noticed one weird behaviour. While we create the database, we are allowing the database name with a new line (if name is in double quote). *For example*: > postgres=# create database "dbstr1; > dbstr 2"; > CREATE DATABASE > postgres=# Here, the dat

Re: Windows CFBot is broken because ecpg dec_test.c error

2025-01-29 Thread Nazir Bilal Yavuz
Hi, On Tue, 28 Jan 2025 at 17:02, Andres Freund wrote: > > Hi, > > On January 28, 2025 7:13:16 AM EST, Jelte Fennema-Nio > wrote: > >Since about ~11 hours ago the ecpg test is consistently failing on > >Window with this error[1]: > > > >> Could not open file > >> C:/cirrus/build/src/interfaces

Re: Show WAL write and fsync stats in pg_stat_io

2025-01-29 Thread Bertrand Drouvot
Hi, On Wed, Jan 29, 2025 at 02:57:21PM +0300, Nazir Bilal Yavuz wrote: > I agree with you but it was discussed before in this thread [2]. It > was decided to use both track_wal_io_timing and track_io_timing > because of the overhead that track_wal_io_timing creates but we can > still re-discuss it

Re: EDB Installer initcluster script changes - review requested

2025-01-29 Thread Manika Singhal
On Tue, Jan 28, 2025 at 11:52 PM Vladlen Popolitov < v.popoli...@postgrespro.ru> wrote: > Manika Singhal писал(а) 2025-01-28 16:42: > > Hi, > > > > "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" > >> "C:\Program Files\PostgreSQL\17" "C:\Program > >> Files\PostgreSQL\

Re: Show WAL write and fsync stats in pg_stat_io

2025-01-29 Thread Bertrand Drouvot
Hi, On Wed, Jan 29, 2025 at 01:49:20PM +0300, Nazir Bilal Yavuz wrote: > Sorry for replying late. No problem at all! > It turns out that the difference is expected. > It is because pg_stat_wal.wal_bytes tracks the total amount of WAL > generated, while pg_stat_io tracks the I/Os that are written

Re: SQLFunctionCache and generic plans

2025-01-29 Thread Alexander Pyhalov
Tom Lane писал(а) 2025-01-17 21:27: Alexander Pyhalov writes: I've rebased patch on master. Tests pass here. The cfbot still doesn't like it; my guess is that you built without --with-libxml and so didn't notice the effects on xml.out. Hi. Thank you for review. I've updated patch. I've l

Re: Eagerly scan all-visible pages to amortize aggressive vacuum

2025-01-29 Thread Melanie Plageman
version 13 attached. On Tue, Jan 28, 2025 at 1:49 PM Robert Treat wrote: > > On Mon, Jan 27, 2025 at 12:45 PM Melanie Plageman > wrote: > > > > On Fri, Jan 24, 2025 at 3:43 PM Robert Haas wrote: > > > > > > On Fri, Jan 24, 2025 at 3:02 PM Melanie Plageman > > > wrote: > > attached v11 uses a f

Re: Eagerly scan all-visible pages to amortize aggressive vacuum

2025-01-29 Thread Melanie Plageman
On Tue, Jan 28, 2025 at 4:38 PM Masahiko Sawada wrote: > > > Thank you for updating the patch! These updates look good to me. Thanks for taking another look! > BTW I realized that we need to update tab-complete.c too to support > the tab-completion for vacuum_max_eager_freeze_failure_rate. I'm

Re: Restrict publishing of partitioned table with a foreign table as partition

2025-01-29 Thread Sergey Tatarintsev
29.01.2025 12:16, Shlok Kyal пишет: Hi, As part of a discussion in [1], I am starting this thread to address the issue reported for foreign tables. Logical replication of foreign tables is not supported, and we throw an error in this case. But when we create a publication on a partitioned tabl

Re: per backend WAL statistics

2025-01-29 Thread Bertrand Drouvot
Hi, On Wed, Jan 29, 2025 at 01:14:09PM +0530, Rahila Syed wrote: > Hi, > > Thank you for the patchset. Having per-backend WAL statistics, > in addition to cluster-wide ones, is useful. Thanks for looking at it! > I had a few comments while looking at v6-0003-* patch. > > + /* > + * This could

Re: Enhancing Memory Context Statistics Reporting

2025-01-29 Thread Rahila Syed
Hi, On Sat, Jan 25, 2025 at 3:50 AM Tomas Vondra wrote: > > > On 1/24/25 14:47, Rahila Syed wrote: > > > > Hi, > > > > > > Just idea; as an another option, how about blocking new requests to > > the target process (e.g., causing them to fail with an error or > > returning NULL with a

Re: create subscription with (origin = none, copy_data = on)

2025-01-29 Thread Shlok Kyal
On Wed, 29 Jan 2025 at 15:58, vignesh C wrote: > > On Fri, 24 Jan 2025 at 09:52, Shlok Kyal wrote: > > > > I have added the test in the latest patch. > > Few comments: > 1) Let's rearrange this query slightly so that the "PT.pubname IN > ()" appears at the end, the reason being that it

Re: An improvement of ProcessTwoPhaseBuffer logic

2025-01-29 Thread Vitaly Davydov
It seems, there are much deeper problems with twophase transactions as I thought. I'm interested in fixing twophase transactions, because I support a solution which actively uses twophase transactions. I'm interested to get more deeply into the twophase functionality. Below, I just want to clari

Re: Show WAL write and fsync stats in pg_stat_io

2025-01-29 Thread Nazir Bilal Yavuz
Hi, On Tue, 28 Jan 2025 at 07:23, Michael Paquier wrote: > > On Mon, Jan 27, 2025 at 05:13:39PM +0300, Nazir Bilal Yavuz wrote: > > On Mon, 27 Jan 2025 at 16:59, Nazir Bilal Yavuz wrote: > >> > >> On Mon, 27 Jan 2025 at 03:52, Michael Paquier wrote: > >> We use PendingWalStats.wal_[ write | syn

Re: further #include cleanup (IWYU)

2025-01-29 Thread Peter Eisentraut
On 27.01.25 15:10, Matthias van de Meent wrote: On Wed, 6 Nov 2024 at 11:50, Peter Eisentraut wrote: Seeing no further comments (or any easy alternatives), I have committed this last patch as is. I just noticed that the #define for MaxArraySize in utils/array.h uses MaxAllocSize without incl

Re: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Amit Kapila
On Wed, Jan 29, 2025 at 3:48 PM Amit Kapila wrote: > + ereport(ERROR, + errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("can no longer get changes from replication slot \"%s\"", +NameStr(slot->data.name)), + errdetail_internal("%s", err_detail->data)); ERROR message appears to be

Re: Show WAL write and fsync stats in pg_stat_io

2025-01-29 Thread Nazir Bilal Yavuz
Hi, On Mon, 27 Jan 2025 at 10:45, Bertrand Drouvot wrote: > > Hi, > > On Fri, Jan 24, 2025 at 06:29:46PM +0300, Nazir Bilal Yavuz wrote: > > Hi, > > > > Thanks for looking into this! > > > > On Fri, 24 Jan 2025 at 17:20, Bertrand Drouvot > > wrote: > > > > > > I did not look at the code yet but

Re: create subscription with (origin = none, copy_data = on)

2025-01-29 Thread vignesh C
On Fri, 24 Jan 2025 at 09:52, Shlok Kyal wrote: > > I have added the test in the latest patch. Few comments: 1) Let's rearrange this query slightly so that the "PT.pubname IN ()" appears at the end, the reason being that it will be easy to copy/paste and edit it to include the publicat

Re: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Amit Kapila
On Wed, Jan 29, 2025 at 8:55 AM Peter Smith wrote: > > == > src/backend/replication/slot.c > > 1. > + > +/* > + * Raise an error based on the slot's invalidation cause. > + */ > +static void > +RaiseSlotInvalidationError(ReplicationSlot *slot) > +{ > + StringInfo err_detail = makeStringInfo();

Re: Reorder shutdown sequence, to flush pgstats later

2025-01-29 Thread Bertrand Drouvot
Hi, On Mon, Jan 27, 2025 at 03:07:01PM +, Bertrand Drouvot wrote: > On Fri, Jan 24, 2025 at 03:06:17PM -0500, Andres Freund wrote: > > but in case of an immediate *restart* (via pg_ctl restart -m immediate) > > we'll > > not have such hint. postmaster.c doesn't know it's an immediate restart,

Re: Feature Request: Add AES-128-CFB Mode Support to pgcrypto

2025-01-29 Thread Vladyslav Nebozhyn
Dear Daniel Gustafsson, Thank you for your response and for offering to review the patch. I really appreciate your time and willingness to assist with this! I've prepared a patch to add AES-CFB support to pgcrypto, following the existing structure used for other AES modes. Integrating it for AES

Re: Feature Request: Add AES-128-CFB Mode Support to pgcrypto

2025-01-29 Thread Umar Hayat
Hi Daniel Gustafsson and Vladyslav Nebozhyn, I created a patch for CFB mode for AES encryption. Please have a look and let me know what you think. Patch covers implementation, tests and documentation changes. OpenSSL profives aes-cfb1, aes-cfb8 and aes-cfb128 modes where aes-cfb defaults to aes-cf

Re: postgres_fdw could deparse ArrayCoerceExpr

2025-01-29 Thread Maxim Orlov
One important note here. This patch will change cast behaviour in case of local and foreign types are mismatched. The problem is if we cannot convert types locally, this does not mean that it is also true for a foreign wrapped data. In any case, it's up to the committer to decide whether this chang

[fixed] Trigger test

2025-01-29 Thread Dmitrii Bondar
Hi, Hackers! I was testing a connection pooler with `make installcheck` and noticed that `check_foreign_key()` from the `refint` library reuses the same cached plan for cascade `UPDATE`/`DELETE` operations. As a result, a cascade `DELETE` is applied after an `UPDATE` command on the primary key

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-01-29 Thread Shubham Khanna
On Wed, Jan 29, 2025 at 10:42 AM Hayato Kuroda (Fujitsu) wrote: > > Dear Shubham, > > > I propose adding the --clean-publisher-objects option to the > > pg_createsubscriber utility. As discussed in [1], this feature ensures > > a clean and streamlined setup of logical replication by removing stale

Re: Non-text mode for pg_dumpall

2025-01-29 Thread jian he
hi. we need to escape the semicolon within the single quotes or double quotes. I think my patch in [1] is correct. we can have "ERROR: role "z" already exists but error message like pg_restore: error: could not execute query: "ERROR: unterminated quoted string at or near "'; should not be accep

Re: CREATE PUBLICATION and foreign partitions

2025-01-29 Thread vignesh C
On Wed, 29 Jan 2025 at 11:49, Sergey Tatarintsev wrote: > > Hello all! > > Currently, according to logical replication restriction sections at [1], > "Attempts to replicate ... foreign tables, will result in an error." > > But we don't care about partitioned tables with foreign partitions. > > As

Re: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

2025-01-29 Thread Amit Kapila
On Wed, Jan 29, 2025 at 7:50 AM Peter Smith wrote: > > Some review comments for patch v1-0001. > > == > src/backend/replication/logical/slotsync.c > > ReplSlotSyncWorkerMain: > > 1. > + /* Use same inactive_since time for all slots */ > + now = GetCurrentTimestamp(); > + > LWLockAcquire(Repl

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

2025-01-29 Thread Amit Kapila
On Wed, Jan 29, 2025 at 12:44 PM vignesh C wrote: > > On Tue, 28 Jan 2025 at 17:28, Nisha Moond wrote: > > > > Please find the attached v64 patches. The changes in this version > > w.r.t. older patch v63 are as - > > - The changes from the v63-0001 patch have been moved to a separate thread > >