Re: Direct I/O

2023-04-11 Thread Thomas Munro
On Wed, Apr 12, 2023 at 3:04 PM Thomas Munro wrote: > On Wed, Apr 12, 2023 at 2:56 PM Christoph Berg wrote: > > I'm hitting a panic in t_004_io_direct. The build is running on > > overlayfs on tmpfs/ext4 (upper/lower) which is probably a weird > > combination but has worked well for building

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-11 Thread Peter Smith
FYI, here are some minor review comments for v4-0001 == src/bin/pg_dump/pg_backup.h 1. + int logical_slot_only; The field should be plural - "logical_slots_only" == src/bin/pg_dump/pg_dump.c 2. + appendPQExpBufferStr(query, + "SELECT r.slot_name, r.plugin, r.two_phase " + "FROM

Re: Minimal logical decoding on standbys

2023-04-11 Thread Noah Misch
On Tue, Apr 11, 2023 at 01:10:57PM -0700, Andres Freund wrote: > On 2023-04-11 11:04:50 +0200, Drouvot, Bertrand wrote: > > On 4/11/23 10:55 AM, Drouvot, Bertrand wrote: > > > I think we might want to add: > > > > > > $node_primary->wait_for_replay_catchup($node_standby); > > > > > > before

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-11 Thread Alexander Lakhin
12.04.2023 02:21, Andres Freund wrote: Hi, On 2023-04-11 22:00:00 +0300, Alexander Lakhin wrote: A few days later I've found a new defect introduced with 31966b151. That's the same issue that Tom also just reported, at https://postgr.es/m/392271.1681238924%40sss.pgh.pa.us Attached is my WIP

Re: Add index scan progress to pg_stat_progress_vacuum

2023-04-11 Thread Michael Paquier
On Mon, Apr 10, 2023 at 07:20:42PM +, Imseih (AWS), Sami wrote: > See v28 addressing the comments. This should be OK (also checked the code paths where the reports are added). Note that the patch needed a few adjustments for its indentation. -- Michael From

Re: SQL/JSON revisited (documentation)

2023-04-11 Thread Erik Rijkers
Hi, IS JSON is documented as: expression IS [ NOT ] JSON [ { VALUE | SCALAR | ARRAY | OBJECT } ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] which is fine but 'VALUE' is nowhere mentioned (except in the commit-message as: IS JSON [VALUE] ) Unless I'm mistaken 'VALUE' does indeed not change an

Re: Various typo fixes

2023-04-11 Thread Michael Paquier
On Tue, Apr 11, 2023 at 05:15:29PM -0500, Justin Pryzby wrote: > The first attachment fixes for typos in user-facing docs new in v16, > combining Thom's changes with the ones that I'd found. If that's > confusing, I'll resend my patches separately. > > The other four numbered patches could use

Re: longfin missing gssapi_ext.h

2023-04-11 Thread Tom Lane
Stephen Frost writes: > Understood. Please find attached the updated patch with changes to the > commit message to indicate that we now require MIT Kerberos, an > additional explicit check for gssapi_ext.h in configure.ac/configure, > along with updated documentation explicitly saying we require

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Wed, Apr 12, 2023 at 12:28:25PM +0900, Michael Paquier wrote: > On Tue, Apr 11, 2023 at 11:12:58PM +0200, Daniel Gustafsson wrote: > > > On 11 Apr 2023, at 16:53, Justin Pryzby wrote: > > > > > I think "logical" should be a here. > > > > Agree, it should in order to be consistent. > >

Re: Various typo fixes

2023-04-11 Thread Michael Paquier
On Tue, Apr 11, 2023 at 11:12:58PM +0200, Daniel Gustafsson wrote: > > On 11 Apr 2023, at 16:53, Justin Pryzby wrote: > > > I think "logical" should be a here. > > Agree, it should in order to be consistent. Indeed. + to the wal_level parameter change on the primary won't be decoded.

Re: Direct I/O

2023-04-11 Thread Thomas Munro
On Wed, Apr 12, 2023 at 2:56 PM Christoph Berg wrote: > I'm hitting a panic in t_004_io_direct. The build is running on > overlayfs on tmpfs/ext4 (upper/lower) which is probably a weird > combination but has worked well for building everything over the last > decade. On Debian unstable: > >

Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-11 Thread Kyotaro Horiguchi
At Wed, 12 Apr 2023 03:36:01 +0900, Fujii Masao wrote in > Attached patch fixes this issue. It ensures that postgres_fdw only > waits > for a reply if a cancel request is actually issued. Additionally, > it improves PQgetCancel() to set error messages in certain error > cases, > such as when

Re: Direct I/O

2023-04-11 Thread Christoph Berg
Hi, I'm hitting a panic in t_004_io_direct. The build is running on overlayfs on tmpfs/ext4 (upper/lower) which is probably a weird combination but has worked well for building everything over the last decade. On Debian unstable: PANIC: could not open file "pg_wal/00010001":

Re: Non-superuser subscription owners

2023-04-11 Thread Amit Kapila
On Tue, Apr 11, 2023 at 8:21 PM Robert Haas wrote: > > On Tue, Apr 11, 2023 at 5:53 AM Amit Kapila wrote: > > I think additionally, we should check that the new owner of the > > subscription is not a superuser, otherwise, anyway, this parameter is > > ignored. Please find the attached to add

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Justin Pryzby
On Wed, Apr 12, 2023 at 11:49:51AM +1200, Thomas Munro wrote: > On Wed, Apr 12, 2023 at 11:37 AM Justin Pryzby wrote: > > $ ls /dev/shm/ |grep 3696856876 || echo not found > > not found > > Oh, of course it would have restarted after it crashed and unlinked > that... So the remaining traces of

Re: Fix fseek() detection of unseekable files on WIN32

2023-04-11 Thread Michael Paquier
On Tue, Apr 11, 2023 at 02:43:25PM +0900, Michael Paquier wrote: > After going through the installation of a Windows setup with meson and > ninja under VS, I have checked that this is working correctly by > myself, so I am going to apply that. One of the tests I have done > involved feeding a

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-04-11 Thread Yurii Rashkovskii
Hi Robert, On Tue, Apr 11, 2023 at 12:54 AM Robert Haas wrote: > On Fri, Apr 7, 2023 at 5:34 PM Yurii Rashkovskii wrote: > > I'm trying to understand what's wrong with reading port from the pid > file (if Postgres writes information there, it's surely so that somebody > can read it, otherwise,

Re: Protecting allocator headers with Valgrind

2023-04-11 Thread Richard Guo
On Tue, Apr 11, 2023 at 9:28 PM David Rowley wrote: > Over on [1], Tom mentioned that we might want to rethink the decision > to not protect chunk headers with Valgrind. That thread fixed a bug > that was accessing array element -1, which effectively was reading the > MemoryChunk at the start

Re: pg_init_privs corruption.

2023-04-11 Thread Greg Stark
On Fri, 17 Feb 2023 at 15:38, Tom Lane wrote: > > Hmm, so Stephen was opining that the extension's objects shouldn't > have gotten these privs attached in the first place. I'm not > quite convinced about that one way or the other, but if you buy it > then maybe this situation is unreachable once

Re: longfin missing gssapi_ext.h

2023-04-11 Thread Stephen Frost
Greetings, * Stephen Frost (sfr...@snowman.net) wrote: > Greetings, > > * Justin Pryzby (pry...@telsasoft.com) wrote: > > > configure | 27 ++ > > > configure.ac | 2 + > > > > Does meson.build need the corresponding change

Re: Regarding Plan tree output(Index/Bitmap Scan)

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 06:09:41PM -0700, Ajay P S wrote: > I am trying to understand the Plan tree for select queries. Can you > please help me with the below queries? > > 1) Why is there a difference in plan tree for these two queries? User > table tidx1 has an index on column 'a' . Based on

Re: longfin missing gssapi_ext.h

2023-04-11 Thread Stephen Frost
Greetings, * Justin Pryzby (pry...@telsasoft.com) wrote: > > configure | 27 ++ > > configure.ac | 2 + > > Does meson.build need the corresponding change ? Ah, yes, presumably. Something like the attached? Thanks,

Re: longfin missing gssapi_ext.h

2023-04-11 Thread Justin Pryzby
> configure | 27 ++ > configure.ac | 2 + Does meson.build need the corresponding change ?

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Kyotaro Horiguchi
At Tue, 11 Apr 2023 18:16:40 -0400, Tom Lane wrote in > David Rowley writes: > > Thanks for chipping in on this. Can you confirm if you think this > > should apply to VACUUM options? We're not talking GUCs here. > > My druthers would be to treat them similarly to GUCs. IMHO I like this

Re: Add LZ4 compression in pg_dump

2023-04-11 Thread Justin Pryzby
On Wed, Apr 12, 2023 at 10:07:08AM +0900, Michael Paquier wrote: > On Tue, Apr 11, 2023 at 07:41:11PM -0500, Justin Pryzby wrote: > > Maybe I would write it as: "if zlib is unavailable, default to no > > compression". But I think that's best done in the leading comment, and > > not inside an

Re: longfin missing gssapi_ext.h

2023-04-11 Thread Stephen Frost
Greetings, * Jonathan S. Katz (jk...@postgresql.org) wrote: > On 4/10/23 11:37 AM, Tom Lane wrote: > > Stephen Frost writes: > > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > > > IOW, maybe it'd be okay to de-revert 3d4fa227b and add documentation > > > > saying that --with-gssapi requires MIT

Regarding Plan tree output(Index/Bitmap Scan)

2023-04-11 Thread Ajay P S
Hi, I am trying to understand the Plan tree for select queries. Can you please help me with the below queries? 1) Why is there a difference in plan tree for these two queries? User table tidx1 has an index on column 'a' . 2) Why do we do Index scan and not Bitmap Index Scan for catalog tables?

Re: Add LZ4 compression in pg_dump

2023-04-11 Thread Michael Paquier
On Tue, Apr 11, 2023 at 07:41:11PM -0500, Justin Pryzby wrote: > Maybe I would write it as: "if zlib is unavailable, default to no > compression". But I think that's best done in the leading comment, and > not inside an empty preprocessor #else. > > I was hoping Michael would comment on this.

Re: CI and test improvements

2023-04-11 Thread Justin Pryzby
On Wed, Mar 15, 2023 at 04:57:34PM +0100, Peter Eisentraut wrote: > On 15.03.23 15:56, Justin Pryzby wrote: > > I'm surprised if there's any question about the merits of making > > documentation easily available for review. Several people have agreed; > > one person mailed me privately

Re: Add LZ4 compression in pg_dump

2023-04-11 Thread Justin Pryzby
On Mon, Feb 27, 2023 at 02:33:04PM +, gkokola...@pm.me wrote: > > > - Finally, the "Nothing to do in the default case" comment comes from > > > Michael's commit 5e73a6048: > > > > > > + /* > > > + * Custom and directory formats are compressed by default with gzip when > > > + * available, not

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Thomas Munro
On Wed, Apr 12, 2023 at 11:37 AM Justin Pryzby wrote: > $ ls /dev/shm/ |grep 3696856876 || echo not found > not found Oh, of course it would have restarted after it crashed and unlinked that... So the remaining traces of that memory *might* be in the core file, depending (IIRC) on the core

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Justin Pryzby
On Wed, Apr 12, 2023 at 11:18:36AM +1200, Thomas Munro wrote: > Can you print *area->control? (gdb) p *area->control $1 = {segment_header = {magic = 216163848, usable_pages = 62, size = 1048576, prev = 1, next = 18446744073709551615, bin = 4, freed = false}, handle = 0, segment_handles = {0,

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 22:00:00 +0300, Alexander Lakhin wrote: > A few days later I've found a new defect introduced with 31966b151. That's the same issue that Tom also just reported, at https://postgr.es/m/392271.1681238924%40sss.pgh.pa.us Attached is my WIP fix, including a test. Greetings,

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Thomas Munro
On Wed, Apr 12, 2023 at 7:46 AM Justin Pryzby wrote: > Unfortunately: > (gdb) p area->control->handle > $3 = 0 > (gdb) p segment_map->header->magic > value has been optimized out > (gdb) p index > $4 = Hmm, well index I can find from parameters: > #2 0x00991470 in ExceptionalCondition

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 2:29 PM Melanie Plageman wrote: > > That doesn't seem great to me either. I don't like this ambiguity, > > because it seems like it makes the description hard to parse in a way > > that flies in the face of what we're trying to do here, in general. > > So it seems like it

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 19:44:20 +0200, Alvaro Herrera wrote: > On 2023-Apr-11, Michael Paquier wrote: > > > Getting a CI job able to do some validation for MSVC would be indeed > > nice. What's the plan in the buildfarm with this coverage? Would all > > the animals switch to meson (Chocolatey +

RE: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Regina Obe
> Personally I don't see the benefit of 1 big file vs. many 0-length files to justify > the cost (time and complexity) of a PostgreSQL change, with the > corresponding cost of making use of this new functionality based on > PostgreSQL version. > >From a packaging stand-point 1 big file is better

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Tom Lane
David Rowley writes: > Thanks for chipping in on this. Can you confirm if you think this > should apply to VACUUM options? We're not talking GUCs here. My druthers would be to treat them similarly to GUCs. I recognize that I might be in the minority, and that doing so would entail touching a

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 09:53:00AM -0500, Justin Pryzby wrote: > On Tue, Apr 11, 2023 at 03:43:12PM +0100, Thom Brown wrote: > > On Tue, 11 Apr 2023 at 15:39, Justin Pryzby wrote: > > > > > > On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > > > > I've attached a patch with a few typo

Re: Assertion being hit during WAL replay

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 16:54:53 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2023-04-11 14:48:44 -0400, Tom Lane wrote: > >> I have seen this failure a couple of times recently while > >> testing code that caused crashes and restarts: > > > Do you have a quick repro recipe? > > Here's

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-04-11 Thread David Rowley
On Wed, 12 Apr 2023 at 09:53, Tom Lane wrote: > > David Rowley writes: > > In preparation for when that's ticked off, I'd like to gather people's > > thoughts about if we should remove force_parallel_mode from v16? > > To clarify, you just mean removing that alias, right? +1. > I don't see a

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread David Rowley
(On Wed, 12 Apr 2023 at 01:58, Tom Lane wrote: > > David Rowley writes: > > Over in [1], Horiguchisan mentioned a few things about VACUUM's new > > BUFFER_USAGE_LIMIT option. > > > 1) buffer_usage_limit in the ERROR messages should be consistently in > > uppercase. > > FWIW, I think this is

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-04-11 Thread Tom Lane
David Rowley writes: > In preparation for when that's ticked off, I'd like to gather people's > thoughts about if we should remove force_parallel_mode from v16? To clarify, you just mean removing that alias, right? +1. I don't see a reason to wait longer once the buildfarm is on board.

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-04-11 Thread David Rowley
On Thu, 16 Feb 2023 at 00:05, David Rowley wrote: > I pushed the rename patch earlier. > > How should we go about making contact with the owners? After a quick round of making direct contact with the few remaining buildfarm machine owners which are still using force_parallel_mode, we're now down

Re: Documentation for building with meson

2023-04-11 Thread samay sharma
Hi, On Tue, Apr 11, 2023 at 10:18 AM Andres Freund wrote: > Hi, > > On 2023-03-28 12:27:26 -0700, samay sharma wrote: > > Subject: [PATCH v9 1/5] Make minor additions and corrections to meson > docs > > > > This commit makes a few corrections to the meson docs > > and adds a few instructions

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Melanie Plageman
On Tue, Apr 11, 2023 at 1:35 PM Peter Geoghegan wrote: > > On Tue, Apr 11, 2023 at 7:40 AM Melanie Plageman > wrote: > > Not the fault of this patch, but I also noticed that heap UPDATE and > > HOT_UPDATE records have xmax twice and don't differentiate between new > > and old. I think that was

Re: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Sandro Santilli
On Tue, Apr 11, 2023 at 04:36:04PM -0400, Regina Obe wrote: > > > Hey, best would be having support for wildcard wouldn't it ? > > I'm a woman of compromise. Sure 1 file would be ideal, but > I'd rather live with a big file listing all version upgrades > than 1000 files with the same

Re: When to drop src/tools/msvc support

2023-04-11 Thread Alvaro Herrera
On 2023-Apr-11, Michael Paquier wrote: > Getting a CI job able to do some validation for MSVC would be indeed > nice. What's the plan in the buildfarm with this coverage? Would all > the animals switch to meson (Chocolatey + StrawberryPerl, I assume) > for the job or will there still be some

Re: Various typo fixes

2023-04-11 Thread Daniel Gustafsson
> On 11 Apr 2023, at 16:53, Justin Pryzby wrote: > I think "logical" should be a here. Agree, it should in order to be consistent. -- Daniel Gustafsson

Re: infobits_set WAL record struct field is int8

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 1:48 PM Andres Freund wrote: > Makes sense. Looks like there never was a flag defined for the sign bit, > luckily. I assume you're just going to apply this for HEAD? Yes. I'm also going to rename the TransactionId field to "xmax", for consistency with nearby very similar

Re: Assertion being hit during WAL replay

2023-04-11 Thread Tom Lane
Andres Freund writes: > On 2023-04-11 14:48:44 -0400, Tom Lane wrote: >> I have seen this failure a couple of times recently while >> testing code that caused crashes and restarts: > Do you have a quick repro recipe? Here's something related to what I hit that time: diff --git

Re: infobits_set WAL record struct field is int8

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 13:13:49 -0700, Peter Geoghegan wrote: > Commit 0ac5ad5134 ("Improve concurrency of foreign key locking") added > infobits_set fields to certain WAL records. However, in the case of > xl_heap_lock, it made the data type int8 rather than uint8. > > I believe that this was a minor

Re: is_superuser is not documented

2023-04-11 Thread Joseph Koshakow
On Tue, Apr 11, 2023 at 9:37 AM Fujii Masao wrote: >> > Yes, this patch moves the descriptions of is_superuser to config.sgml >> > and changes its group to PRESET_OPTIONS. >> >> is_superuser feels a little out of place in this file. All of >> the options here apply to the

Re: Minimal logical decoding on standbys

2023-04-11 Thread Tom Lane
Andres Freund writes: > I think we should lower the log level, but perhaps wait for a few more cycles > in case there are random failures? Removing -log_min_messages = 'debug2' -log_error_verbosity = verbose not only reduces 035's log output volume from 1.6MB to 260kB, but also speeds it up

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 13:35:38 -0700, Andres Freund wrote: > On 2023-04-11 14:46:23 -0500, Justin Pryzby wrote: > > Yes, $SUBJECT is correct. > > > > On an old centos6 VM which I'd forgotten about and never removed from > > monitoring, I noticed that a process had recently crashed... > > > > Maybe

RE: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Regina Obe
> Packager might actually know better in that they could ONLY consider the > packages ever packaged by them. > I'm a special case packager cause I'm on the PostGIS project and I only package postgis related extensions, but even I find this painful. But for most packagers, I think they are

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 14:46:23 -0500, Justin Pryzby wrote: > Yes, $SUBJECT is correct. > > On an old centos6 VM which I'd forgotten about and never removed from > monitoring, I noticed that a process had recently crashed... > > Maybe this is an issue which was already fixed, but I looked and find no

infobits_set WAL record struct field is int8

2023-04-11 Thread Peter Geoghegan
Commit 0ac5ad5134 ("Improve concurrency of foreign key locking") added infobits_set fields to certain WAL records. However, in the case of xl_heap_lock, it made the data type int8 rather than uint8. I believe that this was a minor oversight. Attached patch fixes the issue. -- Peter Geoghegan

Re: Minimal logical decoding on standbys

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 11:04:50 +0200, Drouvot, Bertrand wrote: > On 4/11/23 10:55 AM, Drouvot, Bertrand wrote: > > Hi, > > > > I think we might want to add: > > > > $node_primary->wait_for_replay_catchup($node_standby); > > > > before calling the slot creation. > > > > It's done in the attached,

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Tom Lane
Aleksander Alekseev writes: >> I don't think we can protect against all possible user names. Wouldn't it be >> better to run the tests under an OS user with a different name, like >> "marmaduke"? ("user" is a truly terrible default user name). > 100% agree. The point is not to protect against

Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

2023-04-11 Thread Tom Lane
Justin Pryzby writes: > postgres=# SET force_parallel_mode =1; CREATE TABLE x (i int) PARTITION BY > RANGE (i); CREATE TABLE x1 PARTITION OF x DEFAULT ; > select * from pg_class, > lateral (select pg_catalog.bit_and(1) > from pg_class as sample_1 > where case when EXISTS ( >

Re: Assertion being hit during WAL replay

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 14:48:44 -0400, Tom Lane wrote: > I have seen this failure a couple of times recently while > testing code that caused crashes and restarts: Do you have a quick repro recipe? > #2 0x009987e3 in ExceptionalCondition ( > conditionName=conditionName@entry=0xb31bc8

v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Justin Pryzby
Yes, $SUBJECT is correct. On an old centos6 VM which I'd forgotten about and never removed from monitoring, I noticed that a process had recently crashed... Maybe this is an issue which was already fixed, but I looked and find no bug report nor patch about it. Feel free to dismiss the problem

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 11:48 AM Peter Geoghegan wrote: > Attached revision deals with this by spelling out the names in full > (e.g., "old_xmax" and "new_xmax"). It also reorders the output fields > to match the order from the physical UPDATE, HOT_UPDATE, and LOCK WAL > record types, on the

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Aleksander Alekseev
Hi Andrew, > I don't think we can protect against all possible user names. Wouldn't it be > better to run the tests under an OS user with a different name, like > "marmaduke"? ("user" is a truly terrible default user name). 100% agree. The point is not to protect against all possible user

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Andrew Dunstan
On 2023-04-11 Tu 14:25, Aleksander Alekseev wrote: Hi, While playing with a new single board computer (VisionFive 2) I discovered that postgresql:unsafe_tests suite fails like this: ``` --- /home/user/projects/postgresql/src/test/modules/unsafe_tests/expected/rolenames.out 2023-04-11

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-11 Thread Alexander Lakhin
Hi Andres, 07.04.2023 11:39, Andres Freund wrote: Hi, On 2023-04-06 18:15:14 -0700, Andres Freund wrote: I think it might be worth having a C test for some of the bufmgr.c API. Things like testing that retrying a failed relation extension works the second time round. A few hours after this I

Re: fairywren exiting in ecpg

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 07:10:20 -0400, Andrew Dunstan wrote: > The error hasn't been seen since I set this about a week ago. This issue really bothers me, but I am at my wits end how to debug it, given that we get a segfault only if we *disable* getting crash reports / core dumps in some form.

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
Andres Freund writes: > Except that we're planning to remove it anyway, the structure of the docs here > seems a bit off... Indeed. We'll have to migrate some of that info elsewhere when the time comes. regards, tom lane

Assertion being hit during WAL replay

2023-04-11 Thread Tom Lane
I have seen this failure a couple of times recently while testing code that caused crashes and restarts: #2 0x009987e3 in ExceptionalCondition ( conditionName=conditionName@entry=0xb31bc8 "mode == RBM_NORMAL || mode == RBM_ZERO_ON_ERROR || mode == RBM_ZERO_AND_LOCK",

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 10:34 AM Peter Geoghegan wrote: > > description | off: 119, xmax: 1105, flags: 0x00, old_infobits: > > [], new off: 100, xmax 0 > > That doesn't seem great to me either. I don't like this ambiguity, > because it seems like it makes the description hard to parse in a

Re: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Sandro Santilli
On Mon, Apr 10, 2023 at 11:09:40PM -0400, Regina Obe wrote: > > On Mon, Apr 03, 2023 at 09:26:25AM +0700, Yurii Rashkovskii wrote: > > > I want to chime in on the issue of lower-number releases that are > > > released after higher-number releases. The way I see this particular > > > problem is

Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-11 Thread Fujii Masao
Hi, When using postgres_fdw, in the event of a local transaction being aborted while a query is running on a remote server, postgres_fdw sends a cancel request to the remote server. However, if PQgetCancel() returned NULL and no cancel request was issued, I found that postgres_fdw could still

[PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Aleksander Alekseev
Hi, While playing with a new single board computer (VisionFive 2) I discovered that postgresql:unsafe_tests suite fails like this: ``` --- /home/user/projects/postgresql/src/test/modules/unsafe_tests/expected/rolenames.out 2023-04-11 14:58:57.844550612 + +++

Re: Should we remove vacuum_defer_cleanup_age?

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 11:33:01 -0500, Justin Pryzby wrote: > On Wed, Mar 22, 2023 at 10:00:48AM -0700, Andres Freund wrote: > > I don't know whether others think we should apply it this release, given the > > "late submission", but I tend to think it's not worth caring the > > complication > > of

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 13:30:15 -0400, Tom Lane wrote: > Andres Freund writes: > > Here's a draft docs change. > > > I added the in two places in install-windows.sgml so it's visible > > on both the generated pages in the chunked output. That does mean it's > > visible > > twice nearby in the

Re: Direct I/O

2023-04-11 Thread Andres Freund
Hi, On 2023-04-09 16:40:54 -0700, Noah Misch wrote: > On Sun, Apr 09, 2023 at 02:45:16PM -0700, Andres Freund wrote: > > It's not *just* that scenario. With a few concurrent connections you can get > > into problematic territory even with halfway reasonable shared buffers. > > I am not familiar

Re: Fix the miss consideration of tuple_fraction during add_paths_to_append_rel

2023-04-11 Thread Andy Fan
On Mon, Apr 10, 2023 at 9:56 PM Zhang Mingli wrote: > > There is spare indent at else if. > > - if (childrel->pathlist != NIL && > + if (cheapest_startup_path && cheapest_startup_path->param_info == NULL) > + accumulate_append_subpath(cheapest_startup_path, > + , NULL); > + else if

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 7:40 AM Melanie Plageman wrote: > static void > infobits_desc(StringInfo buf, uint8 infobits, const char *keyname) > { > appendStringInfo(buf, "%s: [", keyname); > > Why can we assume that there will be no space at the end here? I don't think that anybody is going to

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
Andres Freund writes: > Here's a draft docs change. > I added the in two places in install-windows.sgml so it's visible > on both the generated pages in the chunked output. That does mean it's visible > twice nearby in the single-page output, but I don't think that's commonly > used. I don't

Re: Documentation for building with meson

2023-04-11 Thread Andres Freund
Hi, On 2023-03-28 12:27:26 -0700, samay sharma wrote: > Subject: [PATCH v9 1/5] Make minor additions and corrections to meson docs > > This commit makes a few corrections to the meson docs > and adds a few instructions and links for better clarity. > --- > doc/src/sgml/installation.sgml | 24

Re: Memory leak from ExecutorState context?

2023-04-11 Thread Jehan-Guillaume de Rorthais
On Sat, 8 Apr 2023 02:01:19 +0200 Jehan-Guillaume de Rorthais wrote: > On Fri, 31 Mar 2023 14:06:11 +0200 > Jehan-Guillaume de Rorthais wrote: > > [...] > > After rebasing Tomas' memory balancing patch, I did some memory measures > to answer some of my questions. Please, find in attachment

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 10:44:09 -0400, Jonathan S. Katz wrote: > On 4/11/23 10:12 AM, Tom Lane wrote: > > "Jonathan S. Katz" writes: > > > On 4/11/23 9:49 AM, Tom Lane wrote: > > > > Sadly, I think we really have to ship both build systems in v16. > > > > > But maybe we can make it clear in the

Re: Should we remove vacuum_defer_cleanup_age?

2023-04-11 Thread Justin Pryzby
On Wed, Mar 22, 2023 at 10:00:48AM -0700, Andres Freund wrote: > I don't know whether others think we should apply it this release, given the > "late submission", but I tend to think it's not worth caring the complication > of vacuum_defer_cleanup_age forward. I don't see any utility in waiting;

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 09:05:31 +0100, Dave Page wrote: > Probably my main concern is that the Meson build can use the same version > of the VC++ compiler that we use (v14), which is carefully matched for > compatibility with all the various components, just in case anything passes > CRT pointers

[BUG #17888] Incorrect memory access in gist__int_ops for an input array with many elements

2023-04-11 Thread Ankit Kumar Pandey
Hi, I was looking at this issue: https://www.postgresql.org/message-id/flat/17888-f72930e6b5ce8c14%40postgresql.org pfree call on contrib/intarray/_int_gist.c:345 ```     if (in != (ArrayType *) DatumGetPointer(entry->key))    pfree(in); ``` leads to BogusFree function call and

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Melanie Plageman
On Tue, Apr 11, 2023 at 4:00 AM David Rowley wrote: > > Over in [1], Horiguchisan mentioned a few things about VACUUM's new > BUFFER_USAGE_LIMIT option. > > 1) buffer_usage_limit in the ERROR messages should be consistently in > uppercase. I did notice that all the other VACUUM options don't do

Re: running logical replication as the subscription owner

2023-04-11 Thread Robert Haas
On Mon, Apr 10, 2023 at 10:09 PM Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hi hackers, > Thank you for developing a great feature. > The following commit added a column to the pg_subscription catalog. > >

Re: Should vacuum process config file reload more often

2023-04-11 Thread Masahiko Sawada
On Fri, Apr 7, 2023 at 10:23 PM Daniel Gustafsson wrote: > > > On 7 Apr 2023, at 15:07, Melanie Plageman wrote: > > On Fri, Apr 7, 2023 at 2:53 AM Masahiko Sawada > > wrote: > > >> + /* Only log updates to cost-related variables */ > >> + if (vacuum_cost_delay ==

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 03:43:12PM +0100, Thom Brown wrote: > On Tue, 11 Apr 2023 at 15:39, Justin Pryzby wrote: > > > > On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > > > I've attached a patch with a few typo and grammatical fixes. > > > > I think you actually sent the "git-diff"

Re: Non-superuser subscription owners

2023-04-11 Thread Robert Haas
On Tue, Apr 11, 2023 at 5:53 AM Amit Kapila wrote: > I think additionally, we should check that the new owner of the > subscription is not a superuser, otherwise, anyway, this parameter is > ignored. Please find the attached to add this check. I don't see why we should check that. It makes this

Re: When to drop src/tools/msvc support

2023-04-11 Thread Jonathan S. Katz
On 4/11/23 10:12 AM, Tom Lane wrote: "Jonathan S. Katz" writes: On 4/11/23 9:49 AM, Tom Lane wrote: Sadly, I think we really have to ship both build systems in v16. But maybe we can make it clear in the release notes + docs that this is slated for deprecation and will be removed from v17?

Re: Various typo fixes

2023-04-11 Thread Thom Brown
On Tue, 11 Apr 2023 at 15:39, Justin Pryzby wrote: > > On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > > I've attached a patch with a few typo and grammatical fixes. > > I think you actually sent the "git-diff" manpage :( Oh dear, well that's a first. Thanks for pointing out.

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Melanie Plageman
Hi, static void infobits_desc(StringInfo buf, uint8 infobits, const char *keyname) { appendStringInfo(buf, "%s: [", keyname); Why can we assume that there will be no space at the end here? I know we need to be able to avoid doing the comma overwriting if no flags were set. In general, we

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > I've attached a patch with a few typo and grammatical fixes. I think you actually sent the "git-diff" manpage :( -- Justin

Various typo fixes

2023-04-11 Thread Thom Brown
Hi, I've attached a patch with a few typo and grammatical fixes. Regards Thom various_typos_and_grammar_fixes.patch Description: Binary data

v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

2023-04-11 Thread Justin Pryzby
Reduced from sqlsmith, this query fails under debug_parallel_query=1. The elog was added at: 55416b26a98fcf354af88cdd27fc2e045453b68a But (I'm not sure) the faulty commit may be 8edd0e7946 (Suppress Append and MergeAppend plan nodes that have a single child). postgres=# SET force_parallel_mode

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
"Jonathan S. Katz" writes: > On 4/11/23 9:49 AM, Tom Lane wrote: >> Sadly, I think we really have to ship both build systems in v16. > But maybe we can make it clear in the release notes + docs that this is > slated for deprecation and will be removed from v17? That way we can say > "we

Re: When to drop src/tools/msvc support

2023-04-11 Thread Jonathan S. Katz
On 4/11/23 9:49 AM, Tom Lane wrote: Dave Page writes: On Tue, 11 Apr 2023 at 13:52, Jonathan S. Katz wrote: Do you think we'll have enough info by end of this week to make a decision on whether we can drop MSVC in v16? There's no way I can test anything this week - I'm on leave for most

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Tom Lane
David Rowley writes: > Over in [1], Horiguchisan mentioned a few things about VACUUM's new > BUFFER_USAGE_LIMIT option. > 1) buffer_usage_limit in the ERROR messages should be consistently in > uppercase. FWIW, I think this is exactly backward, and so is whatever code you based this on. Our

  1   2   >