Re: Possibility to disable `ALTER SYSTEM`

2024-03-20 Thread Greg Sabino Mullane
> > As a bonus, if that GUC is set, we could even check at server startup that > all the configuration files are not writable by the postgres user, > and print a warning or refuse to start up if they are. > Ugh, please let's not do this. This was bouncing around in my head last night, and this is

Test 031_recovery_conflict.pl is not immune to autovacuum

2024-03-20 Thread Alexander Lakhin
Hello hackers, Among many recoveryCheck (more concretely, 027_stream_regress) failures occurred on a number of buildfarm animals after switching to meson, which can be explained by timeouts, I saw a different failure on adder:

Re: Reducing output size of nodeToString

2024-03-20 Thread Matthias van de Meent
On Wed, 20 Mar 2024 at 12:49, Peter Eisentraut wrote: > > On 19.03.24 17:13, Peter Eisentraut wrote: > > On 11.03.24 21:52, Matthias van de Meent wrote: > >>> * v7-0003-gen_node_support.pl-Mark-location-fields-as-type-.patch > >>> > >>> This looks sensible, but maybe making Location a global type

Re: DOCS: add helpful partitioning links

2024-03-20 Thread Ashutosh Bapat
On Tue, Mar 19, 2024 at 6:38 PM Robert Treat wrote: > > I've put it in the next commitfest with target version of 17, and I've > added you as a reviewer :-) > > Thanks. > Also, attached is an updated patch with your change above which should > apply cleanly to the current git master. > It did

Re: Reducing output size of nodeToString

2024-03-20 Thread Peter Eisentraut
On 19.03.24 17:13, Peter Eisentraut wrote: On 11.03.24 21:52, Matthias van de Meent wrote: * v7-0003-gen_node_support.pl-Mark-location-fields-as-type-.patch This looks sensible, but maybe making Location a global type is a bit much?  Maybe something more specific like ParseLocation, or

Re: remaining sql/json patches

2024-03-20 Thread jian he
looking at documentation again. one very minor question (issue) + +The ON EMPTY clause specifies the behavior if the +path_expression yields no value at all; the +default when ON EMPTY is not specified is to return +a null value. + I think it should

Re: Have pg_basebackup write "dbname" in "primary_conninfo"?

2024-03-20 Thread Amit Kapila
On Tue, Mar 19, 2024 at 5:18 PM Hayato Kuroda (Fujitsu) wrote: > > Thanks for giving comments! > > > This behavior makes sense to me. But do we want to handle the case of > > using environment variables too? > > Yeah, v5 does not consider which libpq parameters are specified by environment >

Re: Catalog domain not-null constraints

2024-03-20 Thread Dean Rasheed
On Wed, 20 Mar 2024 at 09:43, Peter Eisentraut wrote: > > On 19.03.24 10:57, jian he wrote: > > this new syntax need to be added into the alter_domain.sgml's synopsis and > > also > > need an explanation varlistentry? > > The ALTER DOMAIN reference page refers to CREATE DOMAIN about the >

Re: SQL:2011 application time

2024-03-20 Thread jian he
hi. minor cosmetic issues, other than that, looks good. *pk_period = (indexStruct->indisexclusion); to *pk_period = indexStruct->indisexclusion; if (with_period) { if (!fkconstraint->fk_with_period) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), errmsg("foreign key uses PERIOD on the

Re: Why is parula failing?

2024-03-20 Thread Matthias van de Meent
On Tue, 19 Mar 2024 at 20:58, Tom Lane wrote: > > For the last few days, buildfarm member parula has been intermittently > failing the partition_prune regression test, due to unexpected plan > changes [1][2][3][4]. The symptoms can be reproduced exactly by > inserting a "vacuum" of one or

Re: Catalog domain not-null constraints

2024-03-20 Thread Peter Eisentraut
On 19.03.24 10:57, jian he wrote: this new syntax need to be added into the alter_domain.sgml's synopsis and also need an explanation varlistentry? The ALTER DOMAIN reference page refers to CREATE DOMAIN about the details of the constraint syntax. I believe this is still accurate. We could

Re: Catalog domain not-null constraints

2024-03-20 Thread Peter Eisentraut
On 18.03.24 11:02, Aleksander Alekseev wrote: Hi, Anyway, in order to move this forward, here is an updated patch where the ADD CONSTRAINT ... NOT NULL behavior for domains matches the idempotent behavior of tables. This uses the patch that Jian He posted. I tested the patch on Raspberry Pi

Re: Possibility to disable `ALTER SYSTEM`

2024-03-20 Thread Michael Banck
Hi, On Tue, Mar 19, 2024 at 10:51:50AM -0400, Tom Lane wrote: > Heikki Linnakangas writes: > > Perhaps we could make that even better with a GUC though. I propose a > > GUC called 'configuration_managed_externally = true / false". If you set > > it to true, we prevent ALTER SYSTEM and make the

Re: REVOKE FROM warning on grantor

2024-03-20 Thread Peter Eisentraut
On 18.03.24 22:30, Tom Lane wrote: regression=# revoke foo from joe; WARNING: role "joe" has not been granted membership in role "foo" by role "postgres" REVOKE ROLE What the OP is on about is that that last case issues WARNING not ERROR. Another point is that granting a role that has

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-20 Thread Alexander Korotkov
On Wed, Mar 20, 2024 at 12:34 AM Kartyshov Ivan wrote: > > 4.2 With an unreasonably high future LSN, BEGIN command waits > > unboundedly, shouldn't we check if the specified LSN is more than > > pg_last_wal_receive_lsn() error out? I think limiting wait lsn by current received lsn would destroy

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

2024-03-20 Thread Bertrand Drouvot
Hi, On Wed, Mar 20, 2024 at 12:48:55AM +0530, Bharath Rupireddy wrote: > On Mon, Mar 18, 2024 at 3:02 PM Bertrand Drouvot > wrote: > > > > > > Hm. Are you suggesting inactive_timeout to be a slot level parameter > > > > similar to 'failover' property added recently by > > > >

Re: Proposal to include --exclude-extension Flag in pg_dump

2024-03-20 Thread Dean Rasheed
On Tue, 19 Mar 2024 at 19:17, Ayush Vatsa wrote: > > > I'm marking this ready-for-commit (which I'll probably do myself in a > > day or two, unless anyone else claims it first). > > Thank you very much, this marks my first contribution to the open-source > community, and I'm enthusiastic about

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

2024-03-20 Thread Bertrand Drouvot
Hi, On Wed, Mar 20, 2024 at 08:58:05AM +0530, Amit Kapila wrote: > On Wed, Mar 20, 2024 at 12:49 AM Bharath Rupireddy > wrote: > > > > > > Following are some open points: > > > > 1. Where to do inactive_timeout invalidation exactly if not the > > checkpointer. > > > > I have suggested to do it

Re: Change GUC hashtable to use simplehash?

2024-03-20 Thread John Naylor
On Tue, Mar 5, 2024 at 5:30 PM John Naylor wrote: > > On Tue, Jan 30, 2024 at 5:04 PM John Naylor wrote: > > > > On Tue, Jan 30, 2024 at 4:13 AM Ants Aasma wrote: > > > But given that we know the data length and we have it in a register > > > already, it's easy enough to just mask out data past

Re: WIP Incremental JSON Parser

2024-03-20 Thread Andrew Dunstan
On Tue, Mar 19, 2024 at 6:07 PM Andrew Dunstan wrote: > > > > > It also removes the frontend exits I had. In the case of stack depth, we > follow the example of the RD parser and only check stack depth for backend > code. In the case of the check that the lexer is set up for incremental >

Re: Refactoring backend fork+exec code

2024-03-20 Thread Heikki Linnakangas
On 20/03/2024 07:37, Tom Lane wrote: A couple of buildfarm animals don't like these tests: Assert(child_type >= 0 && child_type < lengthof(child_process_kinds)); for example ayu | 2024-03-19 13:08:05 | launch_backend.c:211:39: warning: comparison of constant 16 with

Re: add AVX2 support to simd.h

2024-03-20 Thread John Naylor
On Tue, Mar 19, 2024 at 11:30 PM Nathan Bossart wrote: > > Sounds similar in principle, but it looks really complicated. I don't > > think the additional loops and branches are a good way to go, either > > for readability or for branch prediction. My sketch has one branch for > > which loop to

Re: remaining sql/json patches

2024-03-20 Thread jian he
minor issues I found while looking through it. other than these issues, looks good! /* * Convert the a given JsonbValue to its C string representation * * Returns the string as a Datum setting *resnull if the JsonbValue is a * a jbvNull. */ static char * ExecGetJsonValueItemString(JsonbValue

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

2024-03-20 Thread John Naylor
On Thu, Mar 14, 2024 at 12:06 PM Masahiko Sawada wrote: > > On Thu, Mar 14, 2024 at 1:29 PM John Naylor wrote: > > Locally (not CI), we should try big inputs to make sure we can > > actually go up to many GB -- it's easier and faster this way than > > having vacuum give us a large data set. > >

Re: What is a typical precision of gettimeofday()?

2024-03-20 Thread Peter Eisentraut
On 19.03.24 10:38, Aleksander Alekseev wrote: Considering the number of environments PostgreSQL can run in (OS + hardware + virtualization technologies) and the fact that hardware/software changes I doubt that it's realistic to expect any particular guarantees from gettimeofday() in the general

Re: speed up a logical replica setup

2024-03-20 Thread Shlok Kyal
> Hi, > > > I'm attaching a new version (v30) that adds: > > > > * 3 new options (--publication, --subscription, --replication-slot) to > > assign > > names to the objects. The --database option used to ignore duplicate > > names, > > however, since these new options rely on the number of

<    1   2