Re: Track in pg_replication_slots the reason why slots conflict?

2024-01-02 Thread Bertrand Drouvot
Hi, On Wed, Jan 03, 2024 at 08:53:44AM +0530, Amit Kapila wrote: > On Wed, Jan 3, 2024 at 7:10 AM Michael Paquier wrote: > > > > On Tue, Jan 02, 2024 at 02:07:58PM +, Bertrand Drouvot wrote: > > > + wal_level_insufficient means that the > > > +is insufficient on the

Re: speed up a logical replica setup

2024-01-02 Thread vignesh C
On Wed, 1 Nov 2023 at 19:28, Ashutosh Bapat wrote: > > At this stage the standby would have various replication objects like > publications, subscriptions, origins inherited from the upstream > server and possibly very much active. With failover slots, it might > inherit replication slots. Is it

Re: Transaction timeout

2024-01-02 Thread Andrey M. Borodin
On 1 Jan 2024, at 19:28, Andrey M. Borodin wrote: 3. Check that timeout is not rescheduled by new queries (Nik's case)The test of Nik's case was not stable enough together with COMMIT AND CHAIN. So I've separated these cases into different permutations.Looking through CI

Re: pg_upgrade and logical replication

2024-01-02 Thread Michael Paquier
On Wed, Jan 03, 2024 at 11:24:50AM +0530, Amit Kapila wrote: > I think the next possible step here is to document how to upgrade the > logical replication nodes as previously discussed in this thread [1]. > IIRC, there were a few issues with the steps mentioned but if we want > to document those

Re: Assorted typo fixes

2024-01-02 Thread Tom Lane
Michael Paquier writes: > 0010 is indeed the "correct" plural form for vertex I've known but > "vertexes" is not wrong either. Perhaps that's worth changing on > consistency grounds? Yeah. A quick grep shows that we have 16 uses of "vertices" and only this one of "vertexes". It's not really

Re: pg_upgrade and logical replication

2024-01-02 Thread Amit Kapila
On Wed, Jan 3, 2024 at 6:21 AM Michael Paquier wrote: > > On Tue, Jan 02, 2024 at 03:58:25PM +0530, Amit Kapila wrote: > > On Fri, Dec 29, 2023 at 2:26 PM vignesh C wrote: > >> Thanks, the changes look good. > > > > Pushed. > > Yeah! Thanks Amit and everybody involved here! Thanks also to

Re: Assorted typo fixes

2024-01-02 Thread Michael Paquier
On Tue, Jan 02, 2024 at 12:34:20PM -0500, Robert Haas wrote: > 0002-0005 look OK to me, so I committed those as well. Cool, thanks. > With regard to 0006, we typically use indexes rather than indices as > the plural of "index", although exceptions exist. > > I haven't looked at the rest. I got

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-02 Thread Nathan Bossart
I'd like to spend some more time reviewing this one, but here are a couple of comments. On Tue, Dec 12, 2023 at 11:44:57AM +0100, Michael Paquier wrote: > +/* > + * Allocate shmem space for dynamic shared hash. > + */ > +void > +InjectionPointShmemInit(void) > +{ > +#ifdef USE_INJECTION_POINTS >

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-02 Thread Dilip Kumar
On Tue, Jan 2, 2024 at 7:53 PM Robert Haas wrote: > > On Fri, Dec 22, 2023 at 8:14 AM Andrey M. Borodin > wrote: > > Just a side node. > > It seems like commit log is kind of antipattern of data contention. Even > > when we build a super-optimized SLRU. Nearby **bits** are written by > >

LLVM 18

2024-01-02 Thread Thomas Munro
LLVM 16 provided a new function name[1], and LLVM 18 (not shipped yet) has started complaining[2] about the old spelling. Here's a patch. [1] https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242 [2]

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 4:45 PM Nathan Bossart wrote: > That seems to date back to commit 14a9101. I can agree that the suffix is > somewhat redundant since these are already marked as type "LWLock", but > I'll admit I've been surprised by this before, too. IMHO it makes this > proposed test

Re: Track in pg_replication_slots the reason why slots conflict?

2024-01-02 Thread Amit Kapila
On Wed, Jan 3, 2024 at 7:10 AM Michael Paquier wrote: > > On Tue, Jan 02, 2024 at 02:07:58PM +, Bertrand Drouvot wrote: > > + wal_level_insufficient means that the > > +is insufficient on the primary > > + server. > > > > I'd prefer "primary_wal_level" instead

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Michael Paquier
On Tue, Jan 02, 2024 at 11:31:20AM -0600, Nathan Bossart wrote: > +# Find the location of lwlocknames.h. > +my $include_dir = $node->config_data('--includedir'); > +my $lwlocknames_file = "$include_dir/server/storage/lwlocknames.h"; I am afraid that this is incorrect because an installation could

Re: Reducing output size of nodeToString

2024-01-02 Thread David Rowley
On Thu, 14 Dec 2023 at 19:21, Matthias van de Meent wrote: > > On Thu, 7 Dec 2023 at 13:09, David Rowley wrote: > > We could also easily serialize plans to binary format for copying to > > parallel workers rather than converting them to a text-based > > serialized format. It would also allow us

Re: Track in pg_replication_slots the reason why slots conflict?

2024-01-02 Thread Michael Paquier
On Tue, Jan 02, 2024 at 02:07:58PM +, Bertrand Drouvot wrote: > + wal_level_insufficient means that the > +is insufficient on the primary > + server. > > I'd prefer "primary_wal_level" instead of "wal_level_insufficient". I think > it's > better to directly

Re: Remove unneeded PGDATABASE setting from TAP tests

2024-01-02 Thread Michael Paquier
On Mon, Jan 01, 2024 at 01:52:10PM +0530, Bharath Rupireddy wrote: > Oh, yeah. We can remove that too, after all, PGDATABASE is being set > to postgres the default database which PostgreSQL::Test::Cluster does > set for us. I was earlier swayed by the comment atop the PGDATABASE > setting in

Re: pg_upgrade and logical replication

2024-01-02 Thread Michael Paquier
On Tue, Jan 02, 2024 at 03:58:25PM +0530, Amit Kapila wrote: > On Fri, Dec 29, 2023 at 2:26 PM vignesh C wrote: >> Thanks, the changes look good. > > Pushed. Yeah! Thanks Amit and everybody involved here! Thanks also to Julien for raising the thread and the problem, to start with. -- Michael

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-01-02 Thread Jacob Burroughs
What if we created a new guc flag `GUC_PROTOCOL_EXTENSION` (or a better name), used that for any of the GUCs options that should *only* be set via a `ParameterSet` protocol message, and then prevent changing those through SET/RESET/RESET ALL (but I don't see a reason to prevent reading them

Re: Re: UUID v7

2024-01-02 Thread Przemysław Sztoch
Dear Andrey, 1. Is it possible to add a function that returns the version of the generated uuid? It will be very useful. I don't know if it's possible, but I think there are bits in the UUID that inform about the version. 2. If there is any doubt about adding the function to the main

Re: Things I don't like about \du's "Attributes" column

2024-01-02 Thread Jim Nasby
On 1/2/24 1:38 PM, Robert Haas wrote: But to try to apply that concept here means that we suppose the user knows whether the default is INHERIT or NOINHERIT, whether the default is BYPASSRLS or NOBYPASSRLS, etc. And I'm just a little bit skeptical of that assumption.

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-01-02 Thread Jelte Fennema-Nio
On Tue, 2 Jan 2024 at 18:51, Robert Haas wrote: > > On the whole, this feels like you are trying to force some things > > into the GUC model that should not be there. I do perceive that > > there are things that could be protocol-level variables, but > > trying to say they are a kind of GUC

Re: Next step towards 64bit XIDs: Switch to FullTransactionId for PGPROC->xid and XLogRecord->xl_xid

2024-01-02 Thread Jim Nasby
On 1/2/24 1:58 PM, Robert Haas wrote: Maybe this analysis I've just given isn't quite right, but my point is that we should try to think hard about where in the system 32-bit XIDs suck and for what reason, and use that as a guide to what to change first. Very

Re: SET ROLE x NO RESET

2024-01-02 Thread Jim Nasby
On 12/31/23 1:19 PM, Joe Conway wrote: On 12/30/23 17:19, Michał Kłeczek wrote: On 30 Dec 2023, at 17:16, Eric Hanson wrote: What do you think of adding a NO RESET option to the SET ROLE

Re: introduce dynamic shared memory registry

2024-01-02 Thread Nathan Bossart
Here's a new version of the patch set with Bharath's feedback addressed. On Tue, Jan 02, 2024 at 11:31:14AM -0500, Robert Haas wrote: > On Tue, Jan 2, 2024 at 11:21 AM Nathan Bossart > wrote: >> > Are we expecting, for instance, a 128-bit UUID being used as a key and >> > hence limiting it to a

Re: SET ROLE x NO RESET

2024-01-02 Thread Michał Kłeczek
> On 2 Jan 2024, at 18:36, Robert Haas wrote: > > On Sun, Dec 31, 2023 at 2:20 PM Joe Conway wrote: >> On 12/30/23 17:19, Michał Kłeczek wrote: On 30 Dec 2023, at 17:16, Eric Hanson wrote: What do you think of adding a NO RESET option to the SET ROLE command? >>> >>> What I

Re: add AVX2 support to simd.h

2024-01-02 Thread Nathan Bossart
On Tue, Jan 02, 2024 at 12:50:04PM -0500, Tom Lane wrote: > The patch needs better comments (as in, more than "none whatsoever"). Yes, will do. > Also, do you really want to structure the header so that USE_SSE2 > doesn't get defined? In that case you are committing to provide > an AVX2

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Nathan Bossart
On Tue, Jan 02, 2024 at 01:13:16PM -0500, Robert Haas wrote: > On Tue, Jan 2, 2024 at 12:31 PM Nathan Bossart > wrote: >> I think we're supposed to omit the "Lock" suffix in wait_event_names.txt. > > Ugh, sorry. But also, why in the world? That seems to date back to commit 14a9101. I can

Re: Next step towards 64bit XIDs: Switch to FullTransactionId for PGPROC->xid and XLogRecord->xl_xid

2024-01-02 Thread Robert Haas
On Mon, Jan 1, 2024 at 1:15 AM Maxim Orlov wrote: > Yeah, obviously, this is patch make WAL bigger. I'll try to look into the > idea of fxid calculation, as mentioned above. > It might in part be a "chicken and the egg" situation. It is very hard to > split overall 64xid patch into smaller

Re: Things I don't like about \du's "Attributes" column

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 1:46 PM Tom Lane wrote: > True, although if you aren't happy with the current state then what > you actually need to construct is a SQL command to set a *different* > state from what \du is saying. Going from LOGIN to NOLOGIN or vice > versa can also be non-obvious. So

Re: Minor cleanup for search path cache

2024-01-02 Thread Tom Lane
Jeff Davis writes: > Looks good to me. Thanks for reviewing, will push shortly. regards, tom lane

Re: Minor cleanup for search path cache

2024-01-02 Thread Jeff Davis
On Mon, 2024-01-01 at 16:38 -0500, Tom Lane wrote: > I happened to notice that there is a not-quite-theoretical crash > hazard in spcache_init().  If we see that SPCACHE_RESET_THRESHOLD > is exceeded and decide to reset the cache, but then nsphash_create > fails for some reason (perhaps OOM), an

Re: Eager page freeze criteria clarification

2024-01-02 Thread Melanie Plageman
On Thu, Dec 21, 2023 at 3:58 PM Melanie Plageman wrote: > > On Wed, Dec 13, 2023 at 12:24 PM Robert Haas wrote: > > On Sat, Dec 9, 2023 at 5:12 AM Melanie Plageman > > wrote: > > > The goal is to keep pages frozen for at least target_freeze_duration. > > > target_freeze_duration is in seconds

Re: Things I don't like about \du's "Attributes" column

2024-01-02 Thread Tom Lane
Robert Haas writes: > My thought was that such people probably need to interpret LOGIN and > NOLOGIN into their preferred language either way, but if \du displays > something else, then they also need to mentally construct a reverse > mapping, from whatever string is showing up there to the

Re: Things I don't like about \du's "Attributes" column

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 1:17 PM Tom Lane wrote: > Mmm ... maybe. I think those of us who are native English speakers > may overrate the intelligibility of SQL keywords to those who aren't. > So I'm inclined to feel that preserving translatability of the > role property descriptions is a good

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 1:10 PM Andrey M. Borodin wrote: > > On 2 Jan 2024, at 19:23, Robert Haas wrote: > >> And it would be even better if page for transaction statuses would be > >> determined by backend id somehow. Or at least cache line. Can we allocate > >> a range (sizeof(cacheline)) of

Re: UUID v7

2024-01-02 Thread Andrey M. Borodin
On 2 Jan 2024, at 14:17, Andrey M. Borodin wrote:Tests verify that get_uuid_v7_time(gen_uuid_v7()) differs no more than 1ms from now(). Maybe we should allow more tolerant values for slow test machines.Indeed, CFbot complained about flaky tests. I've increased test tolerance

Re: Things I don't like about \du's "Attributes" column

2024-01-02 Thread Tom Lane
Robert Haas writes: > I wonder if we shouldn't try to display the roles's properties using > SQL keywords rather than narrating. Someone can be confused by "No > connections" but "CONNECTION LIMIT 0" is pretty hard to mistake; > likewise "LOGIN" or "NOLOGIN" seems clear enough. Mmm ... maybe. I

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 12:31 PM Nathan Bossart wrote: > I think we're supposed to omit the "Lock" suffix in wait_event_names.txt. Ugh, sorry. But also, why in the world? > > It seems like it would be good if there were an automated cross-check > > between lwlocknames.txt and

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-02 Thread Andrey M. Borodin
> On 2 Jan 2024, at 19:23, Robert Haas wrote: > >> >> And it would be even better if page for transaction statuses would be >> determined by backend id somehow. Or at least cache line. Can we allocate a >> range (sizeof(cacheline)) of xids\subxids\multixacts\whatever for each >> backend?

Re: pg_upgrade failing for 200+ million Large Objects

2024-01-02 Thread Tom Lane
"Kumar, Sachin" writes: >> On 11/12/2023, 01:43, "Tom Lane" > > wrote: >> ... Maybe that >> could be improved in future, but it seems like it'd add a >> lot more complexity, and it wouldn't make life any better for >> pg_upgrade (which doesn't use parallel pg_restore,

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-01-02 Thread Robert Haas
On Fri, Dec 29, 2023 at 1:38 PM Tom Lane wrote: > Jelte Fennema-Nio writes: > > 1. Protocol messages are much easier to inspect for connection poolers > > than queries > > Unless you somehow forbid clients from setting GUCs in the old way, > exactly how will that help a pooler? I agree that for

Re: add AVX2 support to simd.h

2024-01-02 Thread Tom Lane
Nathan Bossart writes: > I'm tempted to propose that we move forward with this patch as-is after > adding a buildfarm machine that compiles with -mavx2 or -march=x86-64-v3. > There is likely still follow-up work to make these improvements more > accessible, but I'm not sure that is a strict

Re: Build versionless .so for Android

2024-01-02 Thread Robert Haas
On Sun, Dec 31, 2023 at 1:24 AM Michael Paquier wrote: > FWIW, I have mixed feelings about patching the code to treat > android-linux as an exception while changing nothing in the > documentation to explain why this is required. A custom patch may > serve you better here, and note that you did

Re: SET ROLE x NO RESET

2024-01-02 Thread Robert Haas
On Sun, Dec 31, 2023 at 2:20 PM Joe Conway wrote: > On 12/30/23 17:19, Michał Kłeczek wrote: > >> On 30 Dec 2023, at 17:16, Eric Hanson wrote: > >> > >> What do you think of adding a NO RESET option to the SET ROLE command? > > > > What I proposed some time ago is SET ROLE … GUARDED BY

Re: Confine vacuum skip logic to lazy_scan_skip

2024-01-02 Thread Melanie Plageman
On Sun, Dec 31, 2023 at 1:28 PM Melanie Plageman wrote: > > There are a few comments that still need to be updated. I also noticed I > needed to reorder and combine a couple of the commits. I wanted to > register this for the january commitfest, so I didn't quite have time > for the finishing

Re: Assorted typo fixes

2024-01-02 Thread Robert Haas
On Mon, Jan 1, 2024 at 6:05 PM Dagfinn Ilmari Mannsåker wrote: > Thanks. I've fixed the commit message (and elaborated it a bit more why > I think it's a valid and safe fix). Regarding 0001: - AIUI, check_decls.m4 is copied from an upstream project, so I don't think we should tinker with it. -

Re: pg_upgrade failing for 200+ million Large Objects

2024-01-02 Thread Kumar, Sachin
> On 11/12/2023, 01:43, "Tom Lane" > wrote: > I had initially supposed that in a parallel restore we could > have child workers also commit after every N TOC items, but was > soon disabused of that idea. After a worker processes a TOC > item, any dependent items (such

verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Nathan Bossart
(new thread) On Tue, Jan 02, 2024 at 10:34:11AM -0500, Robert Haas wrote: > On Wed, Dec 27, 2023 at 10:36 AM Nathan Bossart > wrote: >> Thanks! I also noticed that WALSummarizerLock probably needs a mention in >> wait_event_names.txt. > > Fixed. I think we're supposed to omit the "Lock"

Re: The presence of a NULL "defaclacl" value in pg_default_acl prevents the dropping of a role.

2024-01-02 Thread Tom Lane
"=?UTF-8?B?5p2o5Lyv5a6HKOmVv+Wggik=?=" writes: > postgres=# create user adminuser; > CREATE ROLE > postgres=# create user normaluser; > CREATE ROLE > postgres=# alter default privileges for role adminuser grant all on tables to > normaluser; > ALTER DEFAULT PRIVILEGES > postgres=# alter default

Re: introduce dynamic shared memory registry

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 11:21 AM Nathan Bossart wrote: > > Are we expecting, for instance, a 128-bit UUID being used as a key and > > hence limiting it to a higher value 256 instead of just NAMEDATALEN? > > My thoughts were around saving a few bytes of shared memory space that > > can get higher

Re: introduce dynamic shared memory registry

2024-01-02 Thread Nathan Bossart
On Fri, Dec 29, 2023 at 08:53:54PM +0530, Bharath Rupireddy wrote: > With the use of dsm registry for pg_prewarm, do we need this > test_dsm_registry module at all? Because 0002 patch pretty much > demonstrates how to use the DSM registry. With this comment and my > earlier comment on

Re: add AVX2 support to simd.h

2024-01-02 Thread Nathan Bossart
On Mon, Jan 01, 2024 at 07:12:26PM +0700, John Naylor wrote: > On Thu, Nov 30, 2023 at 12:15 AM Nathan Bossart > wrote: >> I don't intend for this patch to be >> seriously considered until we have better support for detecting/compiling >> AVX2 instructions and a buildfarm machine that uses them.

Re: trying again to get incremental backup

2024-01-02 Thread Robert Haas
On Wed, Dec 27, 2023 at 10:36 AM Nathan Bossart wrote: > On Wed, Dec 27, 2023 at 09:11:02AM -0500, Robert Haas wrote: > > Thanks. I don't think there's a real bug, but I pushed a fix, same as > > what you had. > > Thanks! I also noticed that WALSummarizerLock probably needs a mention in >

Re: WIP Incremental JSON Parser

2024-01-02 Thread Robert Haas
On Tue, Dec 26, 2023 at 11:49 AM Andrew Dunstan wrote: > Quite a long time ago Robert asked me about the possibility of an > incremental JSON parser. I wrote one, and I've tweaked it a bit, but the > performance is significantly worse that that of the current Recursive > Descent parser.

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

2024-01-02 Thread Daniel Verite
Hi, PFA a rebased version. Best regards, -- Daniel Vérité https://postgresql.verite.pro/ Twitter: @DanielVerite From cd0fe1d517a0e31e031fbbea1e603a715c77ea97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20V=C3=A9rit=C3=A9?= Date: Tue, 2 Jan 2024 14:15:48 +0100 Subject: [PATCH v5 1/2]

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2024-01-02 Thread Jelte Fennema-Nio
On Sat, 30 Dec 2023 at 00:07, Jelte Fennema-Nio wrote: > > On Fri, 29 Dec 2023 at 19:32, Jeff Davis wrote: > > That is my biggest concern right now: what will new clients connecting > > to old servers do? > > This is not that big of a deal. Since it's only an addition of a new > message type,

Re: Things I don't like about \du's "Attributes" column

2024-01-02 Thread Robert Haas
On Thu, Jun 22, 2023 at 8:50 PM Tom Lane wrote: > * It seems weird that some attributes are described in the negative > ("Cannot login", "No inheritance"). I realize that this corresponds > to the defaults, so that a user created by CREATE USER with no options > shows nothing in the Attributes

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-02 Thread Robert Haas
On Fri, Dec 22, 2023 at 8:14 AM Andrey M. Borodin wrote: > Just a side node. > It seems like commit log is kind of antipattern of data contention. Even when > we build a super-optimized SLRU. Nearby **bits** are written by different > CPUs. > I think that banks and locks are good thing. But

Re: Track in pg_replication_slots the reason why slots conflict?

2024-01-02 Thread Bertrand Drouvot
Hi, On Tue, Jan 02, 2024 at 10:35:59AM +0530, Amit Kapila wrote: > On Mon, Jan 1, 2024 at 5:24 PM shveta malik wrote: > > > > Please ignore the previous patch and PFA new v4 (v4_2). The only > > change from the earlier v4 is the subject correction in commit msg. > > Thanks for the patch! > The

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

2024-01-02 Thread Masahiko Sawada
On Wed, Dec 27, 2023 at 12:08 PM John Naylor wrote: > > On Tue, Dec 26, 2023 at 12:43 PM Masahiko Sawada > wrote: > > > > On Thu, Dec 21, 2023 at 4:41 PM John Naylor wrote: > > > > +TidStoreSetBlockOffsets(TidStore *ts, BlockNumber blkno, OffsetNumber > > > *offsets, > > > + int num_offsets)

Re: Password leakage avoidance

2024-01-02 Thread Sehrope Sarkuni
Having worked on and just about wrapped up the JDBC driver patch for this, couple thoughts: 1. There's two sets of defaults, the client program's default and the server's default. Need to pick one for each implemented function. They don't need to be the same across the board. 2. Password encoding

Re: POC: Extension for adding distributed tracing - pg_tracing

2024-01-02 Thread Aleksander Alekseev
Hi, > Overall solution looks good for me except SQL Commenter - query > instrumentation > with SQL comments is often not possible on production systems. Instead > the very often requested feature is to enable tracing for a given single > query ID, > or several (very limited number of) queries

Re: Proposal to add page headers to SLRU pages

2024-01-02 Thread Aleksander Alekseev
Hi, > I have also added this thread to the current Commitfest and hope this patch > will be part of the 17 release. > > The commitfest link: > https://commitfest.postgresql.org/46/4709/ Thanks for the updated patch. cfbot seems to have some complaints regarding compiler warnings and also

Re: Reducing output size of nodeToString

2024-01-02 Thread Peter Eisentraut
On 06.12.23 22:08, Matthias van de Meent wrote: PFA a patch that reduces the output size of nodeToString by 50%+ in most cases (measured on pg_rewrite), which on my system reduces the total size of pg_rewrite by 33% to 472KiB. This does keep the textual pg_node_tree format alive, but reduces its

Re: pg_upgrade and logical replication

2024-01-02 Thread Amit Kapila
On Fri, Dec 29, 2023 at 2:26 PM vignesh C wrote: > > On Thu, 28 Dec 2023 at 15:59, Amit Kapila wrote: > > > > On Wed, Dec 13, 2023 at 12:09 PM vignesh C wrote: > > > > > > Thanks for the comments, the attached v25 version patch has the > > > changes for the same. > > > > > > > I have looked at

Re: Commitfest manager January 2024

2024-01-02 Thread vignesh C
On Tue, 2 Jan 2024 at 15:43, Magnus Hagander wrote: > > On Tue, Jan 2, 2024 at 3:45 AM vignesh C wrote: > > > > On Mon, 1 Jan 2024 at 21:01, Magnus Hagander wrote: > > > > > > On Mon, Jan 1, 2024 at 4:35 AM vignesh C wrote: > > > > > > > > On Sun, 24 Dec 2023 at 18:40, vignesh C wrote: > > >

The presence of a NULL "defaclacl" value in pg_default_acl prevents the dropping of a role.

2024-01-02 Thread 杨伯宇(长堂)
Hello postgres hackers: I recently came across a scenario involving system catalog "pg_default_acl" where a tuple contains a NULL value for the "defaclacl" attribute. This can cause confusion while dropping a role whose default ACL has been changed. Here is a way to reproduce that: ``` example

Re: Commitfest manager January 2024

2024-01-02 Thread Magnus Hagander
On Tue, Jan 2, 2024 at 3:45 AM vignesh C wrote: > > On Mon, 1 Jan 2024 at 21:01, Magnus Hagander wrote: > > > > On Mon, Jan 1, 2024 at 4:35 AM vignesh C wrote: > > > > > > On Sun, 24 Dec 2023 at 18:40, vignesh C wrote: > > > > > > > > On Sun, 24 Dec 2023 at 07:16, Michael Paquier > > > >

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-02 Thread Ashutosh Bapat
On Tue, Dec 12, 2023 at 4:15 PM Michael Paquier wrote: > > On Tue, Dec 12, 2023 at 10:27:09AM +0530, Dilip Kumar wrote: > > Oops, I only included the code changes where I am adding injection > > points and some comments to verify that, but missed the actual test > > file. Attaching it here. > > I

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-02 Thread Bharath Rupireddy
On Mon, Jan 1, 2024 at 12:29 AM Jeff Davis wrote: > > On Fri, 2023-12-29 at 15:22 -0800, Jeff Davis wrote: > > On Tue, 2023-09-05 at 12:08 -0700, Jeff Davis wrote: > > > OK, so we could have a built-in FDW called pg_connection that would > > > do > > > the right kinds of validation; and then also

Re: UUID v7

2024-01-02 Thread Andrey M. Borodin
> On 9 Oct 2023, at 23:46, Andrey Borodin wrote: Here's next iteration of the patch. I've added get_uuid_v7_time(). This function extracts timestamp from uuid, iff it is v7. Timestamp correctness only guaranteed if the timestamp was generated by the same implementation (6 bytes for

Re: Extract numeric filed in JSONB more effectively

2024-01-02 Thread jian he
hi. you don't need to change src/include/catalog/catversion.h as mentioned in https://wiki.postgresql.org/wiki/Committing_checklist Otherwise, cfbot will fail many times. +typedef enum JsonbValueTarget +{ + JsonbValue_AsJsonbValue, + JsonbValue_AsJsonb, + JsonbValue_AsText +} JsonbValueTarget;