Re: Window Function "Run Conditions"

2022-04-07 Thread David Rowley
On Thu, 7 Apr 2022 at 15:41, Zhihong Yu wrote: > +* We must keep the original qual in place if there is a > +* PARTITION BY clause as the top-level WindowAgg remains in > +* pass-through mode and does nothing to filter out unwanted > +

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Julien Rouhaud
On Thu, Apr 07, 2022 at 03:58:46PM +0900, Michael Paquier wrote: > On Tue, Apr 05, 2022 at 11:57:14AM +0800, Julien Rouhaud wrote: > > This is a minor detail and the rest of the patch looks good to me, so I'm > > marking the patch as Ready for Committer! > > @@ -440,10 +442,14 @@ BufFileLoadBuffer

Remove error message hints mentioning configure options

2022-04-07 Thread Peter Eisentraut
We have some error messages like this: SELECT xml_is_well_formed(''); ERROR: unsupported XML feature DETAIL: This functionality requires the server to be built with libxml support. HINT: You need to rebuild PostgreSQL using --with-libxml. This patch removes these kinds of hints. I think th

Re: [PATCH] pg_stat_toast

2022-04-07 Thread Gunnar "Nick" Bluth
Am 06.04.22 um 18:55 schrieb Andres Freund: > Hi, > > On 2022-04-06 12:24:20 -0400, Robert Haas wrote: >> On Wed, Apr 6, 2022 at 12:01 PM Gunnar "Nick" Bluth >> wrote: >>> Fair enough. At that point, a lot of things become unexpectedly painful. >>> How many % of the installed base may that be tho

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Michael Paquier
On Thu, Apr 07, 2022 at 03:14:01PM +0800, Julien Rouhaud wrote: > Sure, but gettimeofday() has been implemented in vDSO for quite some time on > most platforms, so it shouldn't hurt that much on mainstream platforms > especially compared to the cost of whatever operation is actually using that > te

Re: shared-memory based stats collector - v70

2022-04-07 Thread Andres Freund
Hi, On 2022-04-05 20:00:08 -0700, Andres Freund wrote: > It'll be a few hours to get to the main commit - but except for 0001 it > doesn't make sense to push without intending to push later changes too. I > might squash a few commits togther. I've gotten through the main commits (and then a fix f

Re: Remove error message hints mentioning configure options

2022-04-07 Thread Andres Freund
Jo. On 2022-04-07 09:19:14 +0200, Peter Eisentraut wrote: > I think these hints are usually not useful since users will use packaged > distributions and won't be interested in rebuilding their installation from > source. Also, we have only used these kinds of hints for some features and > in some

Re: Add last commit LSN to pg_last_committed_xact()

2022-04-07 Thread Michael Paquier
On Sat, Jan 29, 2022 at 02:51:32PM -0500, James Coleman wrote: > Oh, thanks. I'd seen some discussion previously on the list about > clang not supporting it, but that seems to have been incorrect. Also I > didn't know about that compiler site -- that's really neat. > > Here's an updated patch seri

Re: Skip partition tuple routing with constant partition key

2022-04-07 Thread Andres Freund
Hi, On 2022-04-06 00:07:07 -0400, Tom Lane wrote: > Amit Langote writes: > > On Sun, Apr 3, 2022 at 10:31 PM Greg Stark wrote: > >> Is this a problem with the patch or its tests? > >> [18:14:20.798] Test Summary Report > >> [18:14:20.798] --- > >> [18:14:20.798] t/013_partition.p

Re: [PATCH] pg_stat_toast

2022-04-07 Thread Gunnar "Nick" Bluth
Am 06.04.22 um 17:49 schrieb Alvaro Herrera: > On 2022-Apr-06, Robert Haas wrote: > >> Now if we're only incurring that overhead when this feature is >> enabled, then in fairness that problem is a lot less of an issue, >> especially if this is also disabled by default. People who want the >> data

Re: Extensible Rmgr for Table AMs

2022-04-07 Thread Andres Freund
Hi, On 2022-04-06 23:56:40 -0700, Andres Freund wrote: > On 2022-04-06 23:35:05 -0700, Andres Freund wrote: > > Causes plenty new warnings here: > > And my machine isn't alone. There's also: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&dt=2022-04-07%2006%3A40%3A14 > > rmgrde

Re: WIP: WAL prefetch (another approach)

2022-04-07 Thread Thomas Munro
On Mon, Apr 4, 2022 at 3:12 PM Julien Rouhaud wrote: > [review] Thanks! I took almost all of your suggestions about renaming things, comments, docs and moving a magic number into a macro. Minor changes: 1. Rebased over the shmem stats changes and others that have just landed today (woo!). Th

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-07 Thread Gunnar "Nick" Bluth
Am 07.04.22 um 01:54 schrieb Michael Paquier: > On Wed, Apr 06, 2022 at 02:32:44PM +0200, Gunnar "Nick" Bluth wrote: >> Ta! Sorry, been ridiculously busy these days, and I do confess that I've >> been struggling a bit with those tests before ;-) > > No problem. Double-checked this morning and app

Re: BufferAlloc: don't take two simultaneous locks

2022-04-07 Thread Kyotaro Horiguchi
Hi, Yura. At Wed, 06 Apr 2022 16:17:28 +0300, Yura Sokolov wrot e in > Ok, I got access to stronger server, did the benchmark, found weird > things, and so here is new version :-) Thanks for the new version and benchmarking. > First I found if table size is strictly limited to NBuffers and FIX

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Julien Rouhaud
On Thu, Apr 07, 2022 at 04:24:54PM +0900, Michael Paquier wrote: > On Thu, Apr 07, 2022 at 03:14:01PM +0800, Julien Rouhaud wrote: > > Sure, but gettimeofday() has been implemented in vDSO for quite some time on > > most platforms, so it shouldn't hurt that much on mainstream platforms > > especial

Re: shared-memory based stats collector - v70

2022-04-07 Thread Kyotaro Horiguchi
At Wed, 6 Apr 2022 18:58:52 -0700, Andres Freund wrote in > Hi, > > On 2022-04-07 10:36:30 +0900, Kyotaro Horiguchi wrote: > > At Wed, 6 Apr 2022 09:04:09 -0700, Andres Freund wrote > > in > > > I think there's no switches left now, so it's not actually providing too > > > much. > > > > (Ou

Re: shared-memory based stats collector - v70

2022-04-07 Thread Kyotaro Horiguchi
At Thu, 7 Apr 2022 00:28:45 -0700, Andres Freund wrote in > Hi, > > On 2022-04-05 20:00:08 -0700, Andres Freund wrote: > > It'll be a few hours to get to the main commit - but except for 0001 it > > doesn't make sense to push without intending to push later changes too. I > > might squash a few

Re: Extensible Rmgr for Table AMs

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 00:45:34 -0700, Andres Freund wrote: > On 2022-04-06 23:56:40 -0700, Andres Freund wrote: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=wrasse&dt=2022-04-07%2006%3A49%3A14 > > ccache /opt/developerstudio12.6/bin/cc -m64 -Xa -v -O findtimezone.o > initdb.o localtim

Re: generic plans and "initial" pruning

2022-04-07 Thread Amit Langote
On Wed, Apr 6, 2022 at 4:20 PM Amit Langote wrote: > And here is a version like that that passes make check-world. Maybe > still a WIP as I think comments could use more editing. > > Here's how the new implementation works: > > AcquireExecutorLocks() calls ExecutorDoInitialPruning(), which in tur

Re: Extensible Rmgr for Table AMs

2022-04-07 Thread Bharath Rupireddy
On Thu, Apr 7, 2022 at 11:45 AM Jeff Davis wrote: > I'm happy with this patch and I committed it. Changes from last > version: Hi Jeff, I think there's a typo [1] in pg_waldump.c, we might miss to take account of the last custom resource mgr stats. Please fix it. diff --git a/src/bin/pg_waldump/

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Pavel Luzanov
On 06.04.2022 20:48, Tom Lane wrote: However, I very often find myself resorting to the much more tedious select * from pg_settings where name like '%foo%'; In the discussion about adding privileges for GUCs [1], there was a proposal to add a new psql backslash command to show GUCs, which cou

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

2022-04-07 Thread Matthias van de Meent
On Tue, 5 Apr 2022 at 21:45, Robert Haas wrote: > > On Fri, Apr 1, 2022 at 11:12 AM Matthias van de Meent > wrote: > > Here's a new 0001 to keep CFBot happy. > > This seems like it would conflict with the proposal from > http://postgr.es/m/ca+tgmoad8wmn6i1mmuo+4znege3hd57ys8uv8uzm7cneqy3...@mail.

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

2022-04-07 Thread Pavel Borisov
> > On Fri, Apr 1, 2022 at 11:12 AM Matthias van de Meent > wrote: > > Here's a new 0001 to keep CFBot happy. > > This seems like it would conflict with the proposal from > > http://postgr.es/m/ca+tgmoad8wmn6i1mmuo+4znege3hd57ys8uv8uzm7cneqy3...@mail.gmail.com > which I still hope to advance in so

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Masahiko Sawada
On Thu, Apr 7, 2022 at 4:55 PM Julien Rouhaud wrote: > > On Thu, Apr 07, 2022 at 04:24:54PM +0900, Michael Paquier wrote: > > On Thu, Apr 07, 2022 at 03:14:01PM +0800, Julien Rouhaud wrote: > > > Sure, but gettimeofday() has been implemented in vDSO for quite some time > > > on > > > most platfor

Re: Remove error message hints mentioning configure options

2022-04-07 Thread Daniel Gustafsson
> On 7 Apr 2022, at 09:19, Peter Eisentraut > wrote: > > We have some error messages like this: > > SELECT xml_is_well_formed(''); > ERROR: unsupported XML feature > DETAIL: This functionality requires the server to be built with libxml > support. > HINT: You need to rebuild PostgreSQL usin

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-04-07 Thread Bharath Rupireddy
On Wed, Apr 6, 2022 at 2:15 PM Bharath Rupireddy wrote: > > Attaching v17 patch-set with the above review comments addressed. > Please have a look at it. Had to rebase because of 5c279a6d350 (Custom WAL Resource Managers.). Please find v18 patch-set. Regards, Bharath Rupireddy. From eb9e3464340a

Re: On login trigger: take three

2022-04-07 Thread Daniel Gustafsson
> On 1 Apr 2022, at 09:16, a.soko...@postgrespro.ru wrote: > Please fix a typo in doc/src/sgml/event-trigger.sgml: "precvent" Will do. With that fixed I think this is ready and unless I find something on another read through and test pass I hope to be able to push this before the CF closes today

Re: Support logical replication of DDLs

2022-04-07 Thread Amit Kapila
On Wed, Mar 23, 2022 at 10:39 AM Japin Li wrote: > > Thanks for fixing this. I rebase the patchset on current master (383f222119) > and attach here for further review. > Some initial comments: === 1. +/* + * Write logical decoding DDL message into XLog. + */ +XLogRecPtr +LogLogic

Re: Support logical replication of DDLs

2022-04-07 Thread Amit Kapila
On Tue, Mar 29, 2022 at 9:47 AM Dilip Kumar wrote: > > On Thu, Mar 24, 2022 at 11:24 PM Zheng Li wrote: > > > > > > Good catch. The reason for having isTopLevel in the condition is > > because I haven't decided if a DDL statement inside a PL should > > be replicated from the user point of view. F

Re: Skipping logical replication transactions on subscriber side

2022-04-07 Thread Amit Kapila
On Thu, Apr 7, 2022 at 8:25 AM Amit Kapila wrote: > > I'll take care of this today. I think we can mark the new function > get_column_offset() being introduced by this patch as parallel safe. > Pushed. -- With Regards, Amit Kapila.

aggregate array broken in postgresql 15.

2022-04-07 Thread alias
https://github.com/postgres/postgres/commit/97f73a978fc1aca59c6ad765548ce0096d95a923?diff=split https://dbfiddle.uk/?rdbms=postgres_14&fiddle=11a30590cb376a24df172198139d758e select version(); version --

Re: Unit tests for SLRU

2022-04-07 Thread Aleksander Alekseev
Hi hackers, > Here is version 3 of the patch. > [...] > I think the tests are about as good as they will ever get. Here is version 4. Same as v3, but with resolved conflicts against the current `master` branch. -- Best regards, Aleksander Alekseev v4-0001-Unit-tests-for-SLRU.patch Description

Re: Should pg_dumpall dump ALTER SYSTEM settings?

2022-04-07 Thread Laurenz Albe
On Wed, 2022-04-06 at 21:39 -0400, Robert Haas wrote: > On Wed, Apr 6, 2022 at 2:26 PM Tom Lane wrote: > > Thoughts? > > I'm a little bit skeptical about this proposal, mostly because it > seems like it has the end result that values that are configured in > postgresql.conf and postgresql.auto.co

Re: aggregate array broken in postgresql 15.

2022-04-07 Thread Pavel Stehule
Hi čt 7. 4. 2022 v 12:30 odesílatel alias napsal: > > https://github.com/postgres/postgres/commit/97f73a978fc1aca59c6ad765548ce0096d95a923?diff=split > > https://dbfiddle.uk/?rdbms=postgres_14&fiddle=11a30590cb376a24df172198139d758e > > > select version(); > > version > > > ---

Re: aggregate array broken in postgresql 15.

2022-04-07 Thread alias
my mistake. I don't know that aggregate can also overload. problem solved On Thu, Apr 7, 2022 at 4:09 PM Pavel Stehule wrote: > Hi > > čt 7. 4. 2022 v 12:30 odesílatel alias napsal: > >> >> https://github.com/postgres/postgres/commit/97f73a978fc1aca59c6ad765548ce0096d95a923?diff=split >> >

Re: BufferAlloc: don't take two simultaneous locks

2022-04-07 Thread Yura Sokolov
В Чт, 07/04/2022 в 16:55 +0900, Kyotaro Horiguchi пишет: > Hi, Yura. > > At Wed, 06 Apr 2022 16:17:28 +0300, Yura Sokolov > wrot > e in > > Ok, I got access to stronger server, did the benchmark, found weird > > things, and so here is new version :-) > > Thanks for the new version and benchmar

Re: REINDEX blocks virtually any queries but some prepared queries.

2022-04-07 Thread Frédéric Yhuel
On 4/6/22 17:03, Peter Geoghegan wrote: On Wed, Apr 6, 2022 at 7:49 AM Frédéric Yhuel wrote: From the documentation (https://www.postgresql.org/docs/current/sql-reindex.html#id-1.9.3.162.7), it sounds like REINDEX won't block read queries that don't need the index. But it seems like the pla

Re: OpenSSL deprectation warnings in Postgres 10-13

2022-04-07 Thread Daniel Gustafsson
>> It seems easier to just disable deprecation warnings if you don't >> want to see them. > > As far as my understanding goes, "just disable deprication warning" it > is what commit 4d3db13621be64fbac2faf does. But as stated above, there is no set of supported versions defined so there is definit

Re: Skipping logical replication transactions on subscriber side

2022-04-07 Thread Masahiko Sawada
On Thu, Apr 7, 2022 at 7:28 PM Amit Kapila wrote: > > On Thu, Apr 7, 2022 at 8:25 AM Amit Kapila wrote: > > > > I'll take care of this today. I think we can mark the new function > > get_column_offset() being introduced by this patch as parallel safe. > > > > Pushed. Thanks! Regards, -- Masah

Fix a typo in xlogrecovery.c

2022-04-07 Thread Bharath Rupireddy
Hi, Attaching a patch to fix a typo in xlogrecovery.c - s/GetLogReplayRecPtr/GetXLogReplayRecPtr Regards, Bharath Rupireddy. v1-0001-Fix-a-typo-in-xlogrecovery.c.patch Description: Binary data

Re: OpenSSL deprectation warnings in Postgres 10-13

2022-04-07 Thread Peter Eisentraut
On 06.04.22 16:02, Victor Wagner wrote: It seems easier to just disable deprecation warnings if you don't want to see them. As far as my understanding goes, "just disable deprication warning" it is what commit 4d3db13621be64fbac2faf does. I meant compile with -Wno-deprecated.

Re: Fix a typo in xlogrecovery.c

2022-04-07 Thread Daniel Gustafsson
> On 7 Apr 2022, at 13:48, Bharath Rupireddy > wrote: > Attaching a patch to fix a typo in xlogrecovery.c - > s/GetLogReplayRecPtr/GetXLogReplayRecPtr Applied, thanks. -- Daniel Gustafsson https://vmware.com/

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Joe Conway
On 4/6/22 23:02, Tom Lane wrote: "Jonathan S. Katz" writes: +1 for \dconf Here's a draft patch using \dconf. No tests or docs yet. WFM -- using some form of \d makes more sense than \s, and I can't think of anything better that \dconf. I will say that I care about context far more often

Re: REINDEX blocks virtually any queries but some prepared queries.

2022-04-07 Thread Justin Pryzby
On Thu, Apr 07, 2022 at 01:37:57PM +0200, Frédéric Yhuel wrote: > Maybe something along this line? (patch attached) Some language fixes. I didn't verify the behavior, but +1 to document the practical consequences. I guess this is why someone invented REINDEX CONCURRENTLY. > From 4930bb8de182b7822

Re: generic plans and "initial" pruning

2022-04-07 Thread David Rowley
On Thu, 7 Apr 2022 at 20:28, Amit Langote wrote: > Here's an updated version. In Particular, I removed > part_prune_results list from PortalData, in favor of anything that > needs to look at the list can instead get it from the CachedPlan > (PortalData.cplan). This makes things better in 2 ways:

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Masahiko Sawada
On Thu, Apr 7, 2022 at 5:52 PM Masahiko Sawada wrote: > > On Thu, Apr 7, 2022 at 4:55 PM Julien Rouhaud wrote: > > > > On Thu, Apr 07, 2022 at 04:24:54PM +0900, Michael Paquier wrote: > > > On Thu, Apr 07, 2022 at 03:14:01PM +0800, Julien Rouhaud wrote: > > > > Sure, but gettimeofday() has been i

Re: WIP: WAL prefetch (another approach)

2022-04-07 Thread Justin Pryzby
The docs seem to be wrong about the default. +are not yet in the buffer pool, during recovery. Valid values are +off (the default), on and +try. The setting try enables + concurrency and distance, respectively. By default, it is set to + try, which enabled the featu

Re: Add index scan progress to pg_stat_progress_vacuum

2022-04-07 Thread Robert Haas
On Wed, Apr 6, 2022 at 5:22 PM Imseih (AWS), Sami wrote: > >At the beginning of a parallel operation, we allocate a chunk of> > >dynamic shared memory which persists even after some or all workers > >have exited. It's only torn down at the end of the parallel operation. > >That see

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Andrew Dunstan
On 4/6/22 23:25, David Rowley wrote: > I also find myself querying pg_settings all too often. More typing > than I'd like. > > On Thu, 7 Apr 2022 at 06:40, Tom Lane wrote: >> I do agree that \show might be a bad choice, the reason being that >> the adjacent \set command is for psql variables not

Re: why pg_walfile_name() cannot be executed during recovery?

2022-04-07 Thread Bharath Rupireddy
On Fri, Apr 2, 2021 at 5:52 PM Robert Haas wrote: > > On Fri, Apr 2, 2021 at 4:23 AM SATYANARAYANA NARLAPURAM > wrote: > > Why pg_walfile_name() can't be executed under recovery? > > I believe the issue is that the backend executing the function might > not have an accurate idea about which TLI t

Re: [PATCH] Add native windows on arm64 support

2022-04-07 Thread Tom Lane
Michael Paquier writes: > On Fri, Mar 25, 2022 at 11:38:44AM +1300, Thomas Munro wrote: >> Yeah. I think we should commit this patch, but decree that >> Windows/aarch64 support is experimental only for now. That allows a >> build farm animal to be set up. Then we add a bit of extra logging >> a

Re: REINDEX blocks virtually any queries but some prepared queries.

2022-04-07 Thread Frédéric Yhuel
On 4/7/22 14:40, Justin Pryzby wrote: On Thu, Apr 07, 2022 at 01:37:57PM +0200, Frédéric Yhuel wrote: Maybe something along this line? (patch attached) Some language fixes. Thank you Justin! I applied your fixes in the v2 patch (attached). I didn't verify the behavior, but +1 to document

Re: should vacuum's first heap pass be read-only?

2022-04-07 Thread Robert Haas
On Tue, Apr 5, 2022 at 6:26 PM Peter Geoghegan wrote: > On a long enough timeline the LP_DEAD items in heap pages are bound to > become the dominant concern in almost any interesting case for the > conveyor belt, for the obvious reason: you can't do anything about > LP_DEAD items without also doin

Are pg_current_wal_XXX, pg_walfile_XXX, pg_switch_wal and pg_wal_lsn_diff misplaced in docs?

2022-04-07 Thread Bharath Rupireddy
Hi, I think the WAL related functions [1] are misplaced under the "Backup Control Functions" category in the docs [2]. IMO, they aren't true backup control functions anymore and must be under a separate category like "WAL Utility Functions" or some other. Thoughts? [1] pg_current_wal_flush_lsn,

Re: Remove error message hints mentioning configure options

2022-04-07 Thread Tom Lane
Andres Freund writes: > On 2022-04-07 09:19:14 +0200, Peter Eisentraut wrote: >> I think these hints are usually not useful since users will use packaged >> distributions and won't be interested in rebuilding their installation from >> source. > +1 +1, those hints are from another era. > The xm

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

2022-04-07 Thread Robert Haas
On Thu, Apr 7, 2022 at 4:34 AM Matthias van de Meent wrote: > Also, I can't see why we would allow page-level layout changes in > initdb; that seems like the wrong place to do that. All page layout > currently is at compile-time; even checksums (which can be > enabled/disabled in initdb) have rese

Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]

2022-04-07 Thread Robert Haas
On Thu, Apr 7, 2022 at 2:28 AM Michael Paquier wrote: > > Well, perhaps it's not the end of the world, but it's still a large > > PITA for the maintainer of such an extension. They can't "just fix it" > > because some percentage of their userbase will still need to compile > > against older minor

Re: Extensible Rmgr for Table AMs

2022-04-07 Thread Tom Lane
Jeff Davis writes: > I'm happy with this patch and I committed it. wrasse is less happy: ccache /opt/developerstudio12.6/bin/cc -m64 -Xa -v -O findtimezone.o initdb.o localtime.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/common -lpgcommon -L

Re: Window Function "Run Conditions"

2022-04-07 Thread David Rowley
On Thu, 7 Apr 2022 at 19:01, David Rowley wrote: > > On Thu, 7 Apr 2022 at 15:41, Zhihong Yu wrote: > > +* We must keep the original qual in place if there is a > > +* PARTITION BY clause as the top-level WindowAgg remains in > > +* pass-through mod

New function(s) to get various timelines that the postgres server deals with.

2022-04-07 Thread Bharath Rupireddy
Hi, I see there's no single function one can rely on to get various timeline IDs [1] the postgres server deals with. We have the following functions that emit controlfile's timelines pg_control_checkpoint() - returns ControlFile->checkPointCopy.ThisTimeLineID and ControlFile->checkPointCopy.PrevTi

Re: trigger example for plsample

2022-04-07 Thread chap
On 2022-04-06 16:44, Mark Wong wrote: I think I've applied all of these suggestions and attached a new patch. That looks good to me, though I wonder about the pfree(source). In the simplest case of a PL that uses no advance compilation or augmentation step, the Code Execution block might natura

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Jonathan S. Katz
On 4/7/22 8:36 AM, Joe Conway wrote: On 4/6/22 23:02, Tom Lane wrote: "Jonathan S. Katz" writes: +1 for \dconf Here's a draft patch using \dconf.  No tests or docs yet. WFM -- using some form of \d makes more sense than \s, and I can't think of anything better that \dconf. I will say th

Re: [PATCH] Add native windows on arm64 support

2022-04-07 Thread Daniel Gustafsson
> On 7 Apr 2022, at 15:40, Tom Lane wrote: > > Michael Paquier writes: >> On Fri, Mar 25, 2022 at 11:38:44AM +1300, Thomas Munro wrote: >>> Yeah. I think we should commit this patch, but decree that >>> Windows/aarch64 support is experimental only for now. That allows a >>> build farm animal t

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Tom Lane
"Jonathan S. Katz" writes: > On 4/7/22 8:36 AM, Joe Conway wrote: >> I will say that I care about context far more often than unit or type >> though, so from my point of view I would switch them around with respect >> to which is only shown with verbose. > I disagree somewhat -- I agree the con

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread David G. Johnston
On Thu, Apr 7, 2022 at 7:56 AM Tom Lane wrote: > "Jonathan S. Katz" writes: > > > Maybe to appeal to all crowds, we say "list configuration parameters > > (GUCs)"? > > I'm in the camp that says that GUC is not an acronym we wish to expose > to end users. > > I am too. In any case, either go all

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Josef Šimánek
st 6. 4. 2022 v 19:49 odesílatel Tom Lane napsal: > > It's not difficult to get psql to show you the current value > of a single GUC --- "SHOW" does that fine, and it has tab > completion support for the GUC name. However, I very often > find myself resorting to the much more tedious > > select *

Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]

2022-04-07 Thread Robert Haas
On Tue, Apr 5, 2022 at 10:17 AM Tom Lane wrote: > What I think you need to do is: > > 1. In the back branches, revert delayChkpt to its previous type and > semantics. Squeeze a separate delayChkptEnd bool in somewhere > (you can't change the struct size either ...). > > 2. In HEAD, rename the fie

Re: unlogged sequences

2022-04-07 Thread Peter Eisentraut
On 06.04.22 11:12, Peter Eisentraut wrote: We could also move forward with this patch independently of the other one.  If we end up reverting the other one, then this one won't be very useful but it won't really hurt anything and it would presumably become useful eventually.  What we presumably

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Justin Pryzby
On Wed, Apr 06, 2022 at 11:02:54PM -0400, Tom Lane wrote: > "Jonathan S. Katz" writes: > > +1 for \dconf > > Here's a draft patch using \dconf. No tests or docs yet. The patch as written is a thin layer around pg_settings. SHOW and current_setting() translate to human units, which is particula

Re: REINDEX blocks virtually any queries but some prepared queries.

2022-04-07 Thread Guillaume Lelarge
Le jeu. 7 avr. 2022 à 15:44, Frédéric Yhuel a écrit : > > > On 4/7/22 14:40, Justin Pryzby wrote: > > On Thu, Apr 07, 2022 at 01:37:57PM +0200, Frédéric Yhuel wrote: > >> Maybe something along this line? (patch attached) > > Some language fixes. > > Thank you Justin! I applied your fixes in the v

Re: why pg_walfile_name() cannot be executed during recovery?

2022-04-07 Thread Robert Haas
On Thu, Apr 7, 2022 at 9:32 AM Bharath Rupireddy wrote: > I spent some time today to allow pg_walfile_{name, name_offset} run in > recovery. Timeline ID is computed while in recovery as follows - WAL > receiver's last received and flushed WAL record's TLI if it's > streaming, otherwise the last re

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Jonathan S. Katz
On 4/7/22 11:10 AM, David G. Johnston wrote: On Thu, Apr 7, 2022 at 7:56 AM Tom Lane > wrote: "Jonathan S. Katz" mailto:jk...@postgresql.org>> writes: > Maybe to appeal to all crowds, we say "list configuration parameters > (GUCs)"? I'm in the camp

Re: Add index scan progress to pg_stat_progress_vacuum

2022-04-07 Thread Masahiko Sawada
On Thu, Apr 7, 2022 at 10:20 PM Robert Haas wrote: > > On Wed, Apr 6, 2022 at 5:22 PM Imseih (AWS), Sami wrote: > > >At the beginning of a parallel operation, we allocate a chunk of> > > >dynamic shared memory which persists even after some or all workers > > >have exited. It's only t

Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]

2022-04-07 Thread Tom Lane
Robert Haas writes: > Here are patches for master and v14 to do things this way. Comments? WFM. regards, tom lane

test/isolation/expected/stats_1.out broken for me

2022-04-07 Thread chap
Running installcheck-world on an unrelated patch, I noticed a failure here in test/isolation/expected/stats_1.out (this is line 3102): step s1_slru_check_stats: SELECT current.blks_zeroed > before.value FROM test_slru_stats before INNER JOIN pg_stat_slru current ON before.slru = cur

Re: trigger example for plsample

2022-04-07 Thread Mark Wong
On Thu, Apr 07, 2022 at 10:30:13AM -0400, c...@anastigmatix.net wrote: > On 2022-04-06 16:44, Mark Wong wrote: > > I think I've applied all of these suggestions and attached a new patch. > > That looks good to me, though I wonder about the pfree(source). > In the simplest case of a PL that uses no

Re: should vacuum's first heap pass be read-only?

2022-04-07 Thread Peter Geoghegan
On Thu, Apr 7, 2022 at 6:45 AM Robert Haas wrote: > Well, OK, here's what I don't understand. Let's say I insert a tuple > and then I delete a tuple. Then time goes by and other things happen, > including but those things do not include a heap vacuum. However, > during that time, all transactions

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Mark Dilger
> On Apr 7, 2022, at 6:21 AM, Andrew Dunstan wrote: > > \dconf seems fine to me We have too many synonyms for configuration parameters. "config", "guc", "parameter", and "setting" are already in use. I thought we agreed on the other thread that "setting" means the value, and "parameter" i

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Tom Lane
Justin Pryzby writes: > SHOW and current_setting() translate to human units, which is particularly > useful for some settings, like those with units of 8k pages. > Is it better to use that "cooked" version for display in the backslash command > instead of the raw view from pg_settings ? Oh, tha

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Tom Lane
Mark Dilger writes: > We have too many synonyms for configuration parameters. "config", "guc", > "parameter", and "setting" are already in use. I thought we agreed on the > other thread that "setting" means the value, and "parameter" is the thing > being set. Right, so the suggestion of \dse

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Jonathan S. Katz
On 4/7/22 12:22 PM, Tom Lane wrote: Justin Pryzby writes: SHOW and current_setting() translate to human units, which is particularly useful for some settings, like those with units of 8k pages. Is it better to use that "cooked" version for display in the backslash command instead of the raw vie

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Mark Dilger
> On Apr 7, 2022, at 9:29 AM, Tom Lane wrote: > > I wouldn't > fight too hard if people want to lengthen it to \dconfig for consistency > with set_config(). I'd prefer \dconfig, but if the majority on this list view that as pedantically forcing them to type more, I'm not going to kick up a f

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Tom Lane
Mark Dilger writes: >> On Apr 7, 2022, at 9:29 AM, Tom Lane wrote: >> I wouldn't >> fight too hard if people want to lengthen it to \dconfig for consistency >> with set_config(). > I'd prefer \dconfig, but if the majority on this list view that as > pedantically forcing them to type more, I'm n

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Mark Dilger
> On Apr 7, 2022, at 9:37 AM, Tom Lane wrote: > > Maybe I'm atypical, but I'm probably going to use tab completion > either way, so it's not really more keystrokes. Same here, because after tab-completing \dcon\t\t into \dconfig, I'm likely to also tab-complete to get the list of parameters.

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Jonathan S. Katz
On 4/7/22 12:42 PM, Mark Dilger wrote: On Apr 7, 2022, at 9:37 AM, Tom Lane wrote: Maybe I'm atypical, but I'm probably going to use tab completion either way, so it's not really more keystrokes. Same here, because after tab-completing \dcon\t\t into \dconfig, I'm likely to also tab-compl

Re: test/isolation/expected/stats_1.out broken for me

2022-04-07 Thread Tom Lane
c...@anastigmatix.net writes: > Running installcheck-world on an unrelated patch, I noticed a failure > here in test/isolation/expected/stats_1.out (this is line 3102): So what non-default build options are you using? The only isolationcheck failure remaining in the buildfarm is prion's, which I

Re: test/isolation/expected/stats_1.out broken for me

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 12:49:07 -0400, Tom Lane wrote: > c...@anastigmatix.net writes: > > Running installcheck-world on an unrelated patch, I noticed a failure > > here in test/isolation/expected/stats_1.out (this is line 3102): > > So what non-default build options are you using? > > The only isola

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Joe Conway
On 4/7/22 12:37, Tom Lane wrote: Mark Dilger writes: On Apr 7, 2022, at 9:29 AM, Tom Lane wrote: I wouldn't fight too hard if people want to lengthen it to \dconfig for consistency with set_config(). I'd prefer \dconfig, but if the majority on this list view that as pedantically forcing th

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread David G. Johnston
On Thu, Apr 7, 2022 at 9:58 AM Joe Conway wrote: > On 4/7/22 12:37, Tom Lane wrote: > > Mark Dilger writes: > >>> On Apr 7, 2022, at 9:29 AM, Tom Lane wrote: > >>> I wouldn't > >>> fight too hard if people want to lengthen it to \dconfig for > consistency > >>> with set_config(). > > > >> I'd p

Re: How about a psql backslash command to show GUCs?

2022-04-07 Thread Pavel Stehule
čt 7. 4. 2022 v 19:04 odesílatel David G. Johnston < david.g.johns...@gmail.com> napsal: > On Thu, Apr 7, 2022 at 9:58 AM Joe Conway wrote: > >> On 4/7/22 12:37, Tom Lane wrote: >> > Mark Dilger writes: >> >>> On Apr 7, 2022, at 9:29 AM, Tom Lane wrote: >> >>> I wouldn't >> >>> fight too hard i

Re: Mingw task for Cirrus CI

2022-04-07 Thread Andres Freund
Hi, On 2022-04-06 11:03:37 -0400, Andrew Dunstan wrote: > On 3/30/22 20:26, Andres Freund wrote: > > Could you try using dash to invoke configure here, and whether it makes > > configure faster? > I got weird failures re libxml/parser.h when I tried with dash. See >

Re: test/isolation/expected/stats_1.out broken for me

2022-04-07 Thread chap
On 2022-04-07 12:49, Tom Lane wrote: So what non-default build options are you using? The command that I've just been reusing from my bash_history without thinking about it for some years is: configure --enable-cassert --enable-tap-tests \ --with-libxml --enable-debug \ CFLAGS='-ggdb -Og -g3

Re: [PATCH] Add native windows on arm64 support

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 09:40:43 -0400, Tom Lane wrote: > If it causes problems down the road, how will we debug it? If what causes problems down the road? Afaics the patch doesn't change anything outside of windows-on-arm, so it shouldn't cause any breakage we care about until we get a buildfarm anima

Re: test/isolation/expected/stats_1.out broken for me

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 13:16:53 -0400, c...@anastigmatix.net wrote: > The command that I've just been reusing from my bash_history without > thinking about it for some years is: > > configure --enable-cassert --enable-tap-tests \ > --with-libxml --enable-debug \ > CFLAGS='-ggdb -Og -g3 -fno-omit-fra

Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman

2022-04-07 Thread Tom Lane
Michael Paquier writes: > Add TAP test for archive_cleanup_command and recovery_end_command grassquit just showed a non-reproducible failure in this test [1]: # Postmaster PID for node "standby" is 291160 ok 1 - check content from archives not ok 2 - archive_cleanup_command executed on checkpoin

Re: [PATCH] Add native windows on arm64 support

2022-04-07 Thread Tom Lane
Andres Freund writes: > On 2022-04-07 09:40:43 -0400, Tom Lane wrote: >> If it causes problems down the road, how will we debug it? > If what causes problems down the road? Afaics the patch doesn't change > anything outside of windows-on-arm, so it shouldn't cause any breakage we care > about unt

Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 13:40:30 -0400, Tom Lane wrote: > Michael Paquier writes: > > Add TAP test for archive_cleanup_command and recovery_end_command > > grassquit just showed a non-reproducible failure in this test [1]: I was just staring at that as well. > # Postmaster PID for node "standby" is

Re: [PATCH] Add native windows on arm64 support

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 13:42:49 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-04-07 09:40:43 -0400, Tom Lane wrote: > >> If it causes problems down the road, how will we debug it? > > > If what causes problems down the road? Afaics the patch doesn't change > > anything outside of windows-

Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman

2022-04-07 Thread Tom Lane
Andres Freund writes: > On 2022-04-07 13:40:30 -0400, Tom Lane wrote: >> This test is sending a CHECKPOINT command to the standby and >> expecting it to run the archive_cleanup_command, but it looks >> like the standby did not actually run any checkpoint: >> ... >> I wondered if the recent pg_stat

Re: test/isolation/expected/stats_1.out broken for me

2022-04-07 Thread Andres Freund
Hi, On 2022-04-07 10:29:10 -0700, Andres Freund wrote: > On 2022-04-07 13:16:53 -0400, c...@anastigmatix.net wrote: > > The command that I've just been reusing from my bash_history without > > thinking about it for some years is: > > > > configure --enable-cassert --enable-tap-tests \ > > --with

  1   2   >