Re: Add the ability to limit the amount of memory that can be allocated to backends.

2024-12-28 Thread Jim Nasby
On Dec 28, 2024, at 12:26 PM, Jeremy Schneider wrote: > > While I don't have a detailed design in mind, I'd like to add a strong > +1 on the general idea that work_mem is hard to effectively use because > queries can vary so widely in how many nodes might need work memory. > > I'd almost like to

Re: Re: proposal: schema variables

2024-12-28 Thread Pavel Stehule
Hi >> + { >> + /* the last field of list can be star too */ >> + Assert(IsA(field2, A_Star)); >> + >> + /* >> + * In this case, the field1 should be variable name. But >> + * direct unboxing of composite session variables is not >> + * supported now, and then we don't need to try lookup >> + * re

Re: Document NULL

2024-12-28 Thread jian he
hi. "SQL specification" should be "SQL standard"? + another null vale and unequal to all other values. typo. should be "another null value" other places using subsection, many places in doc/src/sgml/nullvalues.sgml using "sub-section". + Notice two important behaviors: first, even though we

Re: Re: proposal: schema variables

2024-12-28 Thread jian he
On Sun, Dec 29, 2024 at 5:50 AM Pavel Stehule wrote: > > Hi > > >> --<<>>>--- >> + else >> + { >> + /* the last field of list can be star too */ >> + Assert(IsA(field2, A_Star)); >> + >> + /* >> + * In this case, the field1 should be variable name. But >> + * direct unb

Re: Query regarding pg_prewarm extension

2024-12-28 Thread Bruce Momjian
On Fri, Dec 13, 2024 at 05:20:05PM -0800, Jeremy Schneider wrote: > On Fri, 13 Dec 2024 16:16:16 +0530 > Ayush Vatsa wrote: > > > How can I decide which range of pages to prewarm? > > I assume that it is related to hot pages in the relation, > > but how can I identify which pages are likely to be

Re: IANA timezone abbreviations versus timezone_abbreviations

2024-12-28 Thread Bruce Momjian
On Mon, Dec 16, 2024 at 02:57:59PM -0500, Tom Lane wrote: > Andreas Karlsson writes: > > On 12/13/24 12:33 AM, Tom Lane wrote: > >> What I think we should do about this is to teach timestamp > >> input to look into the current IANA time zone to see if it > >> knows the given abbreviation, and if s

Re: Connection limits/permissions, slotsync workers, etc

2024-12-28 Thread Tom Lane
"Zhijie Hou (Fujitsu)" writes: > On Saturday, December 28, 2024 1:31 AM Tom Lane wrote: >> Attached is an alternative proposal that groups the autovac launcher and >> slotsync worker into a new category of "special workers" (better name >> welcome). I chose to put them into the existing autovacF

Re: which wire protocol fields are signed int and which ones are unsigned

2024-12-28 Thread Bruce Momjian
On Tue, Dec 10, 2024 at 11:57:07AM +, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/17/protocol-message-formats.html > Description: > > I don't see it clearly stated which Int fields are signed and w

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2024-12-28 Thread Jeremy Schneider
On Sat, 28 Dec 2024 15:57:44 +0100 Tomas Vondra wrote: > > Not sure a simple memory limit like in the patch (which just adds > memory accounting + OOM after hitting the limit) can work as anything > but a the last safety measure. It seems to me the limit would have to > be set to a value that's m

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

2024-12-28 Thread Noah Misch
On Tue, Dec 17, 2024 at 10:00:10AM +0500, Kirill Reshke wrote: > PFA v5 Pushed as ff90ee6 with some cosmetic changes. Thanks.

Re: Re: proposal: schema variables

2024-12-28 Thread Pavel Stehule
Hi so 28. 12. 2024 v 11:35 odesílatel jian he napsal: > hi. > > src9=# select 'XLogRecPtr'::regtype; > ERROR: type "xlogrecptr" does not exist > LINE 1: select 'XLogRecPtr'::regtype; >^ > so > + varcreate_lsn XLogRecPtr > should be > varcreate_lsn pg_lsn > ? > done > > also >

Re: Re: proposal: schema variables

2024-12-28 Thread jian he
hi. + if (stmt->collClause) + collation = LookupCollation(pstate, + stmt->collClause->collname, + stmt->collClause->location); + else + collation = typcollation;; two semi-colon. should be only one. --<<>>>--- + /* locks the variable with an AccessShareLock */ + varid

Re: Document NULL

2024-12-28 Thread Marcos Pegoraro
The word below is commonly used on DOCs, but I didn't find it as a link. Wouldn't it be better to write what you are linking to, instead of the word below ? (See Null-Valued Operands for more explanation.) instead of (See below for more explanation.) Multi-Element Comparisons. instead of noted be

Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)

2024-12-28 Thread Shayon Mukherjee
On Fri, Dec 6, 2024 at 11:24 AM Shayon Mukherjee wrote: > The patch is also rebased against the latest master and passing in CI. > Would love to receive any further feedback on it. > > Rebased the last patch against the latest master from today as a v5. No other changes since last post. Shayon

Re: Re: proposal: schema variables

2024-12-28 Thread Pavel Stehule
Hi pá 27. 12. 2024 v 16:20 odesílatel jian he napsal: > hi. > > + if (!OidIsValid(varid)) > + AcceptInvalidationMessages(); > + else if (OidIsValid(varid)) > + LockDatabaseObject(VariableRelationId, varid, 0, AccessShareLock); > > we can change it to > + if (!OidIsValid(varid)) > + AcceptInvalid

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2024-12-28 Thread Tomas Vondra
On 12/28/24 13:36, Anton A. Melnikov wrote: > Hi! > > On 28.12.2024 04:48, Tomas Vondra wrote: >> On 12/27/24 20:14, James Hunter wrote: >>> Reviving this thread, because I am thinking about something related -- >>> please ignore the "On Fri, Dec 27, 2024" date, this seems to be an >>> artifact

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2024-12-28 Thread Anton A. Melnikov
Hi! On 28.12.2024 04:48, Tomas Vondra wrote: On 12/27/24 20:14, James Hunter wrote: Reviving this thread, because I am thinking about something related -- please ignore the "On Fri, Dec 27, 2024" date, this seems to be an artifact of me re-sending the message, from the list archive. The origina

Re: Re: proposal: schema variables

2024-12-28 Thread jian he
hi. src9=# select 'XLogRecPtr'::regtype; ERROR: type "xlogrecptr" does not exist LINE 1: select 'XLogRecPtr'::regtype; ^ so + varcreate_lsn XLogRecPtr should be varcreate_lsn pg_lsn ? also + + + varcreate_lsn XLogRecPtr + + + LSN of the transacti

Re: pg_attribute_noreturn(), MSVC, C11

2024-12-28 Thread Peter Eisentraut
On 14.12.24 18:18, Peter Eisentraut wrote: On 13.12.24 20:54, Andres Freund wrote: Another wrinkle: While __attribute__((noreturn)) works for function pointers (or function pointer typedefs) _Noreturn doesn't. Gah.  We only use it that way in two places, but still :( Yeah, I wrote an experim