Re: Non-decimal integer literals

2022-11-28 Thread David Rowley
On Sat, 26 Nov 2022 at 05:13, Peter Eisentraut wrote: > > On 24.11.22 10:13, David Rowley wrote: > > I > > remember many years ago and several jobs ago when working with SQL > > Server being able to speed up importing data using hexadecimal > > DATETIMEs. I can't think why else you might want to r

Re: Allow file inclusion in pg_hba and pg_ident files

2022-11-28 Thread Michael Paquier
On Mon, Nov 28, 2022 at 04:12:40PM +0900, Michael Paquier wrote: > Attached is a rebased patch of the rest. With everything we have > dealt with in this CF, perhaps it would be better to mark this entry > as committed and switch to a new thread where the negative TAP tests > could be discussed? F

Re: Fix comment in SnapBuildFindSnapshot

2022-11-28 Thread Michael Paquier
On Mon, Nov 28, 2022 at 04:46:44PM +0900, Michael Paquier wrote: > Hm, yes, that seems right. There are three "c) states" in these > paragraphs, they are incremental steps. Will apply if there are no > objections. And done. -- Michael signature.asc Description: PGP signature

Re: Add index scan progress to pg_stat_progress_vacuum

2022-11-28 Thread Imseih (AWS), Sami
> I think that indexes_total should be 0 also when INDEX_CLEANUP is off. Patch updated for handling of INDEX_CLEANUP = off, with an update to the documentation as well. >I think we don't need to reset it at the end of index vacuuming. There >is a small window before switching to the nex

Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

2022-11-28 Thread Michael Paquier
On Mon, Nov 28, 2022 at 05:31:50PM -0500, Tom Lane wrote: > After looking through this thread, I side with Robert: we should reject > the remainder of this patch. It gives up page layout flexibility that > we might want back someday. Moreover, I didn't see any hard evidence > offered that there's

Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

2022-11-28 Thread Tom Lane
Michael Paquier writes: > I am wondering if it would be worth adding an AssertMacro() like in > this one, though: > https://www.postgresql.org/message-id/ykap64jvztmgc...@paquier.xyz Kind of doubt it. It'd bloat debug builds with a lot of redundant checks, and probably never catch anything. For

Re: fixing CREATEROLE

2022-11-28 Thread Robert Haas
On Mon, Nov 28, 2022 at 6:32 PM David G. Johnston wrote: > Desirable follow-on patches include: > > 1) Automatically install an additional membership grant, with the CREATEROLE > user as the grantor, specifying INHERIT OR SET as TRUE (I personally favor > attaching these to ALTER ROLE, modifiabl

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-11-28 Thread Melanie Plageman
On Wed, Nov 23, 2022 at 12:43 AM Justin Pryzby wrote: > > Note that 001 fails to compile without 002: > > ../src/backend/storage/buffer/bufmgr.c:1257:43: error: ‘from_ring’ undeclared > (first use in this function) > 1257 | StrategyRejectBuffer(strategy, buf, from_ring)) Thanks! I fixed t

Re: Support logical replication of DDLs

2022-11-28 Thread rajesh singarapu
One question, I understand that we create/enable triggers on create publication command flow. I am wondering how this works in case of logical replication using slots. thanks Rajesh On Mon, Nov 28, 2022 at 10:17 AM Zheng Li wrote: > > > > > > > > > 1. CREATE TABLE LIKE > > > > I found that t

Re: PGDOCS - Logical replication GUCs - added some xrefs

2022-11-28 Thread Peter Smith
On Fri, Nov 25, 2022 at 9:23 PM Peter Eisentraut wrote: > > Your patch moves the description of the subscriber-related configuration > parameters from config.sgml to logical-replication.sgml. But > config.sgml is supposed to contain *all* configuration parameters. If > we're going to start split

Re: Collation version tracking for macOS

2022-11-28 Thread Jeff Davis
On Sat, 2022-11-26 at 18:27 +1300, Thomas Munro wrote: > Here's the first iteration. I will send a full review shortly, but I encountered an ICU bug along the way, which caused me some confusion for a bit. I'll skip past the various levels of confusion I had (burned a couple hours), and get right

Re: Collation version tracking for macOS

2022-11-28 Thread Robert Haas
On Mon, Nov 28, 2022 at 9:55 PM Jeff Davis wrote: > But did you notice that the version went backwards from 65.1 -> 66.1? > Well, actually, it didn't. The version of that collation in 66.1 went > from 153.97 -> 153.104. But there's a bug in versionToString() that > does the decimal output incorrec

Re: Collation version tracking for macOS

2022-11-28 Thread Jeff Davis
On Mon, 2022-11-28 at 21:57 -0500, Robert Haas wrote: > That is ... astonishingly bad. https://unicode-org.atlassian.net/browse/CLDR-16175 -- Jeff Davis PostgreSQL Contributor Team - AWS

Re: Avoid streaming the transaction which are skipped (in corner cases)

2022-11-28 Thread Dilip Kumar
On Mon, Nov 28, 2022 at 3:19 PM Dilip Kumar wrote: > > On Mon, Nov 28, 2022 at 1:46 PM shiy.f...@fujitsu.com > wrote: > > > > Thanks for your patch. > > > > I saw that the patch added a check when selecting largest transaction, but > > in > > addition to ReorderBufferCheckMemoryLimit(), the tran

Re: Support logical replication of DDLs

2022-11-28 Thread Ajin Cherian
On Tue, Nov 29, 2022 at 1:29 PM rajesh singarapu wrote: > > One question, > > I understand that we create/enable triggers on create publication command > flow. > I am wondering how this works in case of logical replication using slots. > > > thanks > Rajesh > Rajesh, The triggers functions when

Re: Collation version tracking for macOS

2022-11-28 Thread Thomas Munro
On Tue, Nov 29, 2022 at 3:55 PM Jeff Davis wrote: > =# select * from pg_icu_collation_versions('en_US') order by > icu_version; > icu_version | uca_version | collator_version > -+-+-- > 50.2| 6.2 | 58.0.6.50 > 51.3| 6.2 | 5

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

2022-11-28 Thread John Naylor
While creating a benchmark for inserting into node128-inner, I found a bug. If a caller deletes from a node128, the slot index is set to invalid, but the child pointer is still valid. Do that a few times, and every child pointer is valid, even if no slot index points to it. When the next inserter c

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

2022-11-28 Thread John Naylor
> The fix is easy enough -- set the child pointer to null upon deletion, but I'm somewhat astonished that the regression tests didn't hit this. I do still intend to replace this code with something faster, but before I do so the tests should probably exercise the deletion paths more. Since VACUUM

Re: Support logical replication of DDLs

2022-11-28 Thread rajesh singarapu
Thanks Ajin for the reply. We "Create/Install" these trigger function at the time of "Create publication", (CreatePublication()) but If I create a replication slot using something like "select * from pg_create_logical_replication_slot('test1', 'test_decoding')" we would not install these triggers

Re: Support logical replication of DDLs

2022-11-28 Thread Ajin Cherian
On Tue, Nov 29, 2022 at 3:39 PM rajesh singarapu wrote: > > Thanks Ajin for the reply. > > We "Create/Install" these trigger function at the time of "Create > publication", (CreatePublication()) > but If I create a replication slot using something like "select * from > pg_create_logical_replicatio

Re: Collation version tracking for macOS

2022-11-28 Thread Jeff Davis
On Mon, 2022-11-28 at 14:11 -0500, Robert Haas wrote: > I don't really understand #1 or #5 well enough to have an educated > opinion, but I do think that #1 seems a bit magical. It hopes that > the > combination of a collation name and a datcollversion will be > sufficient to find exactly one matci

Re: Support logical replication of DDLs

2022-11-28 Thread rajesh singarapu
Thanks Ajin for the clarification. This is really a helpful feature. On Tue, Nov 29, 2022 at 10:14 AM Ajin Cherian wrote: > > On Tue, Nov 29, 2022 at 3:39 PM rajesh singarapu > wrote: > > > > Thanks Ajin for the reply. > > > > We "Create/Install" these trigger function at the time of "Create >

RE: Perform streaming logical transactions by background workers and parallel apply

2022-11-28 Thread houzj.f...@fujitsu.com
On Mon, November 28, 2022 15:19 PM Peter Smith wrote: > Here are some review comments for patch v51-0002 Thanks for your comments! > == > > 1. > > GENERAL - terminology: spool/serialize and data/changes/message > > The terminology seems to be used at random. IMO it might be worthwhile >

Re: Support logical replication of DDLs

2022-11-28 Thread rajesh singarapu
Isn't it a good idea to move triggers to CreateReplicationSlot() ? as create publication also create replication slot, AFAIK. thanks Rajesh On Tue, Nov 29, 2022 at 10:35 AM rajesh singarapu wrote: > > Thanks Ajin for the clarification. > > This is really a helpful feature. > > On Tue, Nov 29, 20

Re: Fix comment in SnapBuildFindSnapshot

2022-11-28 Thread Masahiko Sawada
On Tue, Nov 29, 2022 at 8:54 AM Michael Paquier wrote: > > On Mon, Nov 28, 2022 at 04:46:44PM +0900, Michael Paquier wrote: > > Hm, yes, that seems right. There are three "c) states" in these > > paragraphs, they are incremental steps. Will apply if there are no > > objections. > > And done. Th

Re: Add LZ4 compression in pg_dump

2022-11-28 Thread Michael Paquier
On Mon, Nov 28, 2022 at 04:32:43PM +, gkokola...@pm.me wrote: > The focus of this version of this series is 0001 and 0002. > > Admittedly 0001 could be presented in a separate thread though given its size > and > proximity to the topic, I present it here. I don't mind. This was a hole in me

Re: Support logical replication of DDLs

2022-11-28 Thread Ajin Cherian
On Tue, Nov 29, 2022 at 4:22 PM rajesh singarapu wrote: > > Isn't it a good idea to move triggers to CreateReplicationSlot() ? as > create publication also create replication slot, AFAIK. > > thanks > Rajesh > Currently we're trying to get this work using "Create Publication", maybe in future we'l

Re: Failed Assert while pgstat_unlink_relation

2022-11-28 Thread Kyotaro Horiguchi
At Mon, 28 Nov 2022 14:01:30 +0530, vignesh C wrote in > Hi, > > While reviewing/testing one of the patches I found the following Assert: > #0 0x55c6312ba639 in pgstat_unlink_relation (rel=0x7fb73bcbac58) > at pgstat_relation.c:161 > #1 0x55c6312bbb5a in pgstat_relation_delete_pending_

Re: Collation version tracking for macOS

2022-11-28 Thread Jeff Davis
On Sat, 2022-11-26 at 18:27 +1300, Thomas Munro wrote: > On Thu, Nov 24, 2022 at 5:48 PM Thomas Munro > wrote: > > On Thu, Nov 24, 2022 at 3:07 PM Jeff Davis > > wrote: > > > I'd vote for 1 on the grounds that it's easier to document and > > > understand a single collation version, which comes st

RE: Avoid streaming the transaction which are skipped (in corner cases)

2022-11-28 Thread houzj.f...@fujitsu.com
On Tuesday, November 29, 2022 12:08 PM Dilip Kumar wrote: Hi, > > On Mon, Nov 28, 2022 at 3:19 PM Dilip Kumar wrote: > > > > On Mon, Nov 28, 2022 at 1:46 PM shiy.f...@fujitsu.com > > wrote: > > > > > > Thanks for your patch. > > > > > > I saw that the patch added a check when selecting large

Re: fixing CREATEROLE

2022-11-28 Thread walther
Mark Dilger: Isn't this just GRANT .. WITH SET FALSE, INHERIT FALSE, ADMIN TRUE? That should allow role administration, without actually granting membership in that role, yet, right? Can you clarify what you mean here? Are you inventing a new syntax? +GRANT bob TO alice WITH SET FALSE, INHE

Re: Add LZ4 compression in pg_dump

2022-11-28 Thread Michael Paquier
On Tue, Nov 29, 2022 at 03:19:17PM +0900, Michael Paquier wrote: > Attached is an alternative that does not sacrifice the pluggability of > the existing routines while allowing 0003~ to still use them (I don't > really want to move around the checks on the supported build options > now in parse_com

Re: fixing CREATEROLE

2022-11-28 Thread walther
Robert Haas: And the result is that I've got like five people, some of whom particulated in those discussions, showing up to say "hey, we don't need the ability to set defaults." Well, if that's the case, then why did we have hundreds and hundreds of emails within the last 12 months arguing about

Re: [DOCS] Stats views and functions not in order?

2022-11-28 Thread Peter Smith
On Sat, Nov 26, 2022 at 2:43 PM David G. Johnston wrote: > > On Wed, Nov 23, 2022 at 1:36 AM Peter Smith wrote: >> >> On Thu, Nov 17, 2022 at 8:46 AM David G. Johnston >> wrote: >> >> > Also, make it so each view ends up being its own separate page. >> > >> >> I did not do this. AFAIK those view

Re: Decouple last important WAL record LSN from WAL insert locks

2022-11-28 Thread Bharath Rupireddy
On Mon, Nov 28, 2022 at 11:55 PM Andres Freund wrote: > > > Is tracking lastImportantPos as pg_atomic_uint64 in XLogCtlInsert any > > better than an explicit spinlock? I think it's better on platforms > > where atomics are supported, however, it boils down to using a spin > > lock on the platforms

Re: fixing CREATEROLE

2022-11-28 Thread walther
Robert Haas: 1) Automatically install an additional membership grant, with the CREATEROLE user as the grantor, specifying INHERIT OR SET as TRUE (I personally favor attaching these to ALTER ROLE, modifiable only by oneself) Hmm, that's an interesting alternative to what I actually implemented

Re: Introduce a new view for checkpointer related stats

2022-11-28 Thread Bharath Rupireddy
On Mon, Nov 28, 2022 at 11:29 PM Robert Haas wrote: > > On Tue, Nov 22, 2022 at 3:53 PM Andres Freund wrote: > > I think we should consider deprecating the pg_stat_bgwriter columns but > > leaving them in place for a few years. New stuff should only be added to > > pg_stat_checkpointer, but we do

<    1   2