Re: SPI_connect, SPI_connect_ext return type

2024-09-07 Thread Stepan Neretin
> So if we tell extension authors they don't need to check the result, it's unlikely > that that will cause any new code they write to get used with PG > versions where it would be wrong. Yes, I concur. > This combines portions of Stepan's > two patches with some additional work (mostly, that he'd

Re: Statistics Import and Export

2024-09-07 Thread jian he
On Fri, Sep 6, 2024 at 1:34 AM Corey Huinker wrote: >> >> >> this part elevel should always be ERROR? >> if so, we can just > > > I'm personally dis-inclined to error on any of these things, so I'll be > leaving it as is. I suspect that the proper balance lies between all-ERROR > and all-WARNING

Re: [PATCH] Add roman support for to_number function

2024-09-07 Thread Tom Lane
Maciek Sakrejda writes: > Tested again, and the patch looks good. It does not accept leading or > trailing whitespace, which seems reasonable, given the unclear behavior of > to_number with other format strings. It also rejects less common Roman > spellings like "". I don't feel strongly ab

Re: PostgreSQL 17 release announcement draft

2024-09-07 Thread David Rowley
On Sun, 8 Sept 2024 at 06:44, Jonathan S. Katz wrote: > I've attached the latest copy. Is "This release expands on functionality both for managing data in partitions" still relevant given the MERGE/SPLIT PARTITION was reverted [1]? David [1] https://git.postgresql.org/gitweb/?p=postgresql.git;

Re: pgstattuple: fix free space calculation

2024-09-07 Thread Tom Lane
I wrote: > Now alternatively you could argue that a "new" page isn't usable free > space yet and so we should count it as zero, just as we don't count > dead tuples as usable free space. You need VACUUM to turn either of > those things into real free space. But that'd be a bigger definitional > c

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2024-09-07 Thread Oliver Ford
On Sat, May 6, 2023 at 9:41 AM Oliver Ford wrote: > > > > On Sat, 6 May 2023, 04:57 Tatsuo Ishii, wrote: >> >> Attached is the patch to implement this (on top of your patch). >> >> test=# SELECT row_number() RESPECT NULLS OVER () FROM (SELECT 1) AS s; >> ERROR: window function row_number cannot

Re: Undocumented functions

2024-09-07 Thread Tom Lane
Marcos Pegoraro writes: > Example, elem_contained_by_range is not documented. I know I can use > select 2 <@ '[1,3]'::int4range > But why is that function not documented ? Functions that are primarily meant to implement operators are normally not documented separately: we feel it would bloat the

Re: pgstattuple: fix free space calculation

2024-09-07 Thread Tom Lane
Rafia Sabih writes: > On Thu, 29 Aug 2024 at 16:53, Frédéric Yhuel > wrote: >> So I think we should just use PageGetExactFreeSpace(). >> >> Here is a v3 patch. It's the same as v2, I only removed the last >> paragraph in the commit message. > Thanks for the new patch. LGTM. I looked at this pa

Re: Undocumented functions

2024-09-07 Thread Pavel Stehule
Hi so 7. 9. 2024 v 20:58 odesílatel Marcos Pegoraro napsal: > Some days ago Tom Lane said ... > > SELECT events & 4 != 0 AS can_upd, events & 8 != 0 AS can_ins, events & 16 > != 0 AS can_del FROM > pg_catalog.pg_relation_is_updatable('_pessoa'::regclass, false) t(events); > > Well, I didn't find

Undocumented functions

2024-09-07 Thread Marcos Pegoraro
Some days ago Tom Lane said ... SELECT events & 4 != 0 AS can_upd, events & 8 != 0 AS can_ins, events & 16 != 0 AS can_del FROM pg_catalog.pg_relation_is_updatable('_pessoa'::regclass, false) t(events); Well, I didn't find that function on DOCs and then I thought, are there other functions which

Re: [PATCH] Add roman support for to_number function

2024-09-07 Thread Maciek Sakrejda
Sorry, it looks like I failed to accurately log my review in the review app due to the current broken layout issues [1]. The summary should be: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested (not sure what the spec has to say

Re: [PATCH] Add roman support for to_number function

2024-09-07 Thread Maciek Sakrejda
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, failed Spec compliant: tested, failed Documentation:tested, passed Tested again, and the patch looks good. It does not accept le

Re: PostgreSQL 17 release announcement draft

2024-09-07 Thread Jonathan S. Katz
On 9/6/24 2:01 PM, Matthias van de Meent wrote: I think this needs some adjustment: IIUC the new feature in PG17's 295c36c0 is that we now also track (and show) timings for local blocks. I/O timings on shared and temp blocks were already tracked (and displayed with the BUFFERS option) when track

Re: Yet another way for pg_ctl stop to fail on Windows

2024-09-07 Thread Noah Misch
On Sat, Sep 07, 2024 at 03:00:00PM +0300, Alexander Lakhin wrote: > With extra logging added, I got: > ### Stopping node "CIC_2PC_test" using mode fast > # Running: pg_ctl -D > C:\src\postgresql\build/testrun/amcheck_3/003_cic_2pc\data/t_003_cic_2pc_CIC_2PC_test_data/pgdata > -m fast stop > waitin

Re: PostgreSQL 17 release announcement draft

2024-09-07 Thread Jonathan S. Katz
On 9/6/24 6:40 PM, Jelte Fennema-Nio wrote: On Fri, 6 Sept 2024 at 19:04, Jonathan S. Katz wrote: Please see v2 attached. As per original note, please provide feedback before Mon, Sep 9 @ 12:00 UTC so we can begin the translation process. The following sentence was part of the beta1 release a

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2024-09-07 Thread Tomas Vondra
Hi, I started looking at this patch today. The first thing I usually do for new patches is a stress test, so I did a simple script that generates random table and runs a random query with IN() clause with various configs (parallel query, index-only scans, ...). And it got stuck on a parallel query

Re: Detailed release notes

2024-09-07 Thread Marcos Pegoraro
Em sex., 6 de set. de 2024 às 23:13, jian he escreveu: > I didn't manually click each git commit url to test it though. Checked, all commit links are working and matching with their regards Marcos

Re: Create syscaches for pg_extension

2024-09-07 Thread Michael Paquier
On Fri, Sep 06, 2024 at 08:29:52AM +0900, Michael Paquier wrote: > Looks OK at quick glance. I'll take care of that as I've done the > other one. And done. -- Michael signature.asc Description: PGP signature

Yet another way for pg_ctl stop to fail on Windows

2024-09-07 Thread Alexander Lakhin
Hello hackers, While trying to reproduce a recent fairywren (a Windows animal) failure, I ran amcheck/amcheck/003_cic_2pc in parallel inside a slowed-down VM and came across another issue: ### Stopping node "CIC_2PC_test" using mode fast # Running: pg_ctl -D C:\src\postgresql\build/testrun/amchec

Re: First draft of PG 17 release notes

2024-09-07 Thread Alvaro Herrera
On 2024-Sep-05, Bruce Momjian wrote: > That seems more infrastructure/extension author stuff which isn't > normally mentioned in the release notes. I think such people really > need to look at all the commit messages. Are you saying all extension authors should be reading the complete git log fo

Re: [PATCH] Add roman support for to_number function

2024-09-07 Thread Hunaid Sohail
Hi, On Thu, Sep 5, 2024 at 2:41 PM Aleksander Alekseev > wrote: > >> >> While playing with the patch I noticed that to_char(..., 'RN') doesn't >> seem to be test-covered. I suggest adding the following test: >> >> ``` >> WITH rows AS ( >> SELECT i, to_char(i, 'FMRN') AS roman >> FROM gen

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-09-07 Thread Anton A. Melnikov
On 04.09.2024 11:09, Kyotaro Horiguchi wrote: Instead, I'd like to propose separating the file and path-related definitions from xlog_internal.h, as shown in the attached first patch. This change would allow some modules to include files without unnecessary details. The second file is your patc