Re: Defer selection of asynchronous subplans until the executor initialization stage

2022-04-06 Thread Etsuro Fujita
On Mon, Apr 4, 2022 at 6:30 PM Andrey V. Lepikhov wrote: > On 4/3/22 15:29, Etsuro Fujita wrote: > > Also, I added the commit message. Attached is a new version of the > > patch. Barring objections, I’ll commit this. > I looked through this patch - looks much more stable. > But, as far as I rem

Re: DSA failed to allocate memory

2022-04-06 Thread Dongming Liu
On Mon, Mar 28, 2022 at 3:53 PM Thomas Munro wrote: > Hi Dongming, > > Thanks for the report, and for working on the fix. Can you please > create a commitfest entry (if you haven't already)? I plan to look at > this soon, after the code freeze. I created a commitfest entry https://commitfest.p

Re: generic plans and "initial" pruning

2022-04-06 Thread Amit Langote
On Fri, Apr 1, 2022 at 5:36 PM Amit Langote wrote: > On Fri, Apr 1, 2022 at 5:20 PM David Rowley wrote: > > On Fri, 1 Apr 2022 at 19:58, Amit Langote wrote: > > > Yes, the ExecLockRelsInfo node in the current patch, that first gets > > > added to the QueryDesc and subsequently to the EState of t

Re: Fix unsigned output for signed values in SLRU error reporting

2022-04-06 Thread Peter Eisentraut
On 25.03.22 11:49, Pavel Borisov wrote: It's true that offset can not be negative, but printing int value as %u isn't nice even if it is not supposed to be negative. So I'd propose the small patch in this thread be applied separately if none has anything against it. committed

Re: MERGE bug report

2022-04-06 Thread Richard Guo
On Wed, Apr 6, 2022 at 6:18 AM Joe Wildish wrote: > Hello Hackers, > > Reporting a bug with the new MERGE statement. Tested against > 75edb919613ee835e7680e40137e494c7856bcf9. > > psql output as follows: > > ... > psql:merge.sql:33: ERROR: variable not found in subplan target lists > ROLLBACK >

Re: API stability

2022-04-06 Thread Kyotaro Horiguchi
At Wed, 06 Apr 2022 15:53:32 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 06 Apr 2022 15:31:53 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Wed, 06 Apr 2022 14:30:37 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > So if we don't want to move any member in PGPROC, we do: > > > >

Re: API stability

2022-04-06 Thread Alvaro Herrera
On 2022-Apr-06, Kyotaro Horiguchi wrote: > For master, renamed delayChkpt to delayChkptFlags and changed it to > uint8. For code documentation purposes, I think it is slightly better to use bits8 than uint8 for variables where you're storing independent bit flags. -- Álvaro Herrera Post

Re: Logical replication timeout problem

2022-04-06 Thread Amit Kapila
On Wed, Apr 6, 2022 at 11:28 AM Amit Kapila wrote: > > On Wed, Apr 6, 2022 at 11:09 AM wangw.f...@fujitsu.com > wrote: > > > > According to your suggestion, improve the patch to make it more generic. > > Attach the new patch. > > > > typedef void (*LogicalOutputPluginWriterUpdateProgress) (struc

Re: psql - add SHOW_ALL_RESULTS option - pg_regress output

2022-04-06 Thread Peter Eisentraut
On 06.04.22 04:06, Andres Freund wrote: On 2022-04-04 23:32:50 +0200, Peter Eisentraut wrote: This has been committed. It's somewhat annoying that made pg_regress even more verbose than before: == removing existing temp instance== == creating tempor

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

2022-04-06 Thread Bharath Rupireddy
On Wed, Apr 6, 2022 at 10:32 AM Jeff Davis wrote: > > On Mon, 2022-04-04 at 09:15 +0530, Bharath Rupireddy wrote: > > My intention is to return the overall undecoded WAL record [5] i.e. > > the data starting from XLogReadRecord's output [6] till length > > XLogRecGetTotalLen(xlogreader);. Please s

Re: Skipping logical replication transactions on subscriber side

2022-04-06 Thread Peter Eisentraut
On 02.04.22 10:13, Noah Misch wrote: uint64 and pg_lsn use TYPALIGN_DOUBLE. For AIX, they really need a typalign corresponding to ALIGNOF_LONG. Hence, the C struct layout doesn't match the tuple layout. Columns potentially affected: [local] test=*# select attrelid::regclass, attname from pg_a

Re: shared-memory based stats collector - v70

2022-04-06 Thread Kyotaro Horiguchi
At Tue, 5 Apr 2022 20:00:08 -0700, Andres Freund wrote in > Hi, > > Here comes v70: > - extended / polished the architecture comment based on feedback from Melanie > and David > - other polishing as suggested by David > - addressed the open issue around pgstat_report_stat(), as described in >

Re: unlogged sequences

2022-04-06 Thread Peter Eisentraut
On 03.04.22 19:19, Peter Eisentraut wrote: On 01.04.22 18:31, Peter Eisentraut wrote: Consider that an identity sequence creates an "internal" dependency and a serial sequence creates an "auto" dependency. An "internal" dependency means that the internal object shouldn't really be operated o

Re: API stability

2022-04-06 Thread Kyotaro Horiguchi
At Wed, 6 Apr 2022 10:30:32 +0200, Alvaro Herrera wrote in > On 2022-Apr-06, Kyotaro Horiguchi wrote: > > > For master, renamed delayChkpt to delayChkptFlags and changed it to > > uint8. > > For code documentation purposes, I think it is slightly better to use > bits8 than uint8 for variables

Re: API stability

2022-04-06 Thread Kyotaro Horiguchi
At Wed, 06 Apr 2022 18:13:17 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 6 Apr 2022 10:30:32 +0200, Alvaro Herrera > wrote in > > For code documentation purposes, I think it is slightly better to use > > bits8 than uint8 for variables where you're storing independent bit flags. > > Oh,

Re: shared-memory based stats collector - v70

2022-04-06 Thread John Naylor
On Wed, Apr 6, 2022 at 10:00 AM Andres Freund wrote: > - while working on the above point, I noticed that hash_bytes() showed up > noticeably in profiles, so I replaced it with a fixed-width function I'm curious about this -- could you direct me to which patch introduces this? -- John Naylor

OpenSSL deprectation warnings in Postgres 10-13

2022-04-06 Thread Victor Wagner
Collegues! I've tried to build all supported versions of PostgresSQL in the Ubuntu 22.04 which is soon to be released. And found out that versions 10-13 produce a lot of warnings about deprecated OpenSSL functions. I've found discussion about this problem https://www.postgresql.org/message-i

Re: A qsort template

2022-04-06 Thread John Naylor
Here is the updated insertion sort threshold patch based on Thomas' experimental v4 0010, with adjusted regression test output. I only found a couple places where it could make sense to add sort keys to test queries, but 1) not enough to make a big difference and 2) the adjustments looked out of pl

Re: OpenSSL deprectation warnings in Postgres 10-13

2022-04-06 Thread Daniel Gustafsson
> On 6 Apr 2022, at 11:55, Victor Wagner wrote: > I've tried to build all supported versions of PostgresSQL in the Ubuntu > 22.04 which is soon to be released. > > And found out that versions 10-13 produce a lot of warnings about > deprecated OpenSSL functions. Thanks for testing. Does it cause

Re: PG DOCS - logical replication filtering

2022-04-06 Thread Amit Kapila
On Thu, Mar 24, 2022 at 11:48 AM Peter Smith wrote: > Review comments: === 1. +The WHERE clause expression is evaluated with the same +role used for the replication connection. i.e. the role specified in the +CONNECTION clause of the . Can we use () around i.e. sentence?

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-04-06 Thread Laurenz Albe
On Tue, 2022-04-05 at 13:06 -0700, Nathan Bossart wrote: > On Tue, Apr 05, 2022 at 11:25:36AM -0400, Stephen Frost wrote: > > Please find attached an updated patch + commit message.  Mostly, I just > > went through and did a bit more in terms of updating the documentation > > and improving the comm

Re: How to simulate sync/async standbys being closer/farther (network distance) to primary in core postgres?

2022-04-06 Thread Ashutosh Bapat
On Tue, Apr 5, 2022 at 9:23 PM Bharath Rupireddy wrote: > > Hi, > > I'm thinking if there's a way in core postgres to achieve $subject. In > reality, the sync/async standbys can either be closer/farther (which > means sync/async standbys can receive WAL at different times) to > primary, especially

Re: Enables to call Unregister*XactCallback() in Call*XactCallback()

2022-04-06 Thread Hao Wu
> You normally shouldn'd need to do this frequently - what's your use case? > UnregisterXactCallback() is O(N), so workloads registering / unregistering > a > lot of callbacks would be problematic. > > It's not about workloads or efficiency. Here is the use case: I want to register a callback for s

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-04-06 Thread Michael Paquier
On Tue, Apr 05, 2022 at 06:23:06PM +, Jacob Champion wrote: > Whether it holds meaning or not depends entirely on the auth method, I > think. Hypothetical example -- a system could accept client > certificates with an empty Subject. What identity that Subject > represents would depend on the or

Practical Timing Side Channel Attacks on Memory Compression

2022-04-06 Thread Filip Janus
Hi all, A few months ago a group of researchers published a paper about LZ77 vulnerability[1]. And it also affects PGLZ. From my point of view, it could be a really dangerous issue for some kind of application. If I understand it correctly there is a possibility of leaking approx. 24B secret data p

Re: shared-memory based stats collector - v70

2022-04-06 Thread Alvaro Herrera
Just skimming a bit here ... On 2022-Apr-05, Andres Freund wrote: > From 0532b869033595202d5797b148f22c61e4eb4969 Mon Sep 17 00:00:00 2001 > From: Andres Freund > Date: Mon, 4 Apr 2022 16:53:16 -0700 > Subject: [PATCH v70 10/27] pgstat: store statistics in shared memory. > + PgStatsData >

Re: Support logical replication of DDLs

2022-04-06 Thread Ajin Cherian
On Wed, Mar 23, 2022 at 4:09 PM Japin Li wrote: > > > On Tue, 22 Mar 2022 at 04:56, Zheng Li wrote: > > Hi Japin, > > > >> You should use a different user that has different length from your > >> current one. > >> For example: > >> > >> px@localhost$ make check-world > > > > This is fixe

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

2022-04-06 Thread Michael Paquier
On Tue, Apr 05, 2022 at 11:10:30AM +0900, Michael Paquier wrote: > In the tests, the only difference between the modes "archive_cli" and > "archive" is the extra option given to the pg_rewind command, and > that's a simple redirect to what pg_rewind would choose by default > anyway. A more elegant

Re: [COMMITTERS] pgsql: Allow time delayed standbys and recovery

2022-04-06 Thread Robert Haas
On Tue, Apr 5, 2022 at 8:43 PM Thom Brown wrote: > I share your discomfort with the wording. How about: > > WAL records must be kept on standby until they are ready to be applied. > Therefore, longer delays will result in a greater accumulation of WAL files, > increasing disk space requirements f

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

2022-04-06 Thread Gunnar "Nick" Bluth
Am 06.04.22 um 14:04 schrieb Michael Paquier: > On Tue, Apr 05, 2022 at 11:10:30AM +0900, Michael Paquier wrote: >> In the tests, the only difference between the modes "archive_cli" and >> "archive" is the extra option given to the pg_rewind command, and >> that's a simple redirect to what pg_rewin

Re: Unit tests for SLRU

2022-04-06 Thread Aleksander Alekseev
Hi hackers, > OK, here is an updated version of the patch. Changes comparing to v1: > > * Tests are moved to regress.c, as asked by the majority; > * SimpleLruInit() returns void as before, per Daniel's feedback; > * Most of the initial refactorings were reverted in order to keep the patch > as

RE: Logical replication timeout problem

2022-04-06 Thread wangw.f...@fujitsu.com
On Wed, Apr 6, 2022 at 1:59 AM Amit Kapila wrote: On Wed, Apr 6, 2022 at 4:32 AM Amit Kapila wrote: > Thanks for your comments. > typedef void (*LogicalOutputPluginWriterUpdateProgress) (struct > LogicalDecodingContext *lr, > XLogRecPtr Ptr, > TransactionId xid, > - bool skipped_xact > + bo

Re: OpenSSL deprectation warnings in Postgres 10-13

2022-04-06 Thread Peter Eisentraut
On 06.04.22 11:55, Victor Wagner wrote: And found out that versions 10-13 produce a lot of warnings about deprecated OpenSSL functions. I've found discussion about this problem https://www.postgresql.org/message-id/flat/FEF81714-D479-4512-839B-C769D2605F8A%40yesql.se and commit 4d3db13621be64

logical replication of identity sequences

2022-04-06 Thread Peter Eisentraut
Identity sequences shouldn't be addressed directly by name in normal use. Therefore, requiring them to be added directly to publications is a faulty interface. I think they should be considered included in a publication automatically when their owning table is. See attached patch for a sketc

Re: BufferAlloc: don't take two simultaneous locks

2022-04-06 Thread Yura Sokolov
Good day, Kyotaoro-san. Good day, hackers. В Вс, 20/03/2022 в 12:38 +0300, Yura Sokolov пишет: > В Чт, 17/03/2022 в 12:02 +0900, Kyotaro Horiguchi пишет: > > At Wed, 16 Mar 2022 14:11:58 +0300, Yura Sokolov > > wrote in > > > В Ср, 16/03/2022 в 12:07 +0900, Kyotaro Horiguchi пишет: > > > > At T

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andrew Dunstan
On 4/5/22 22:21, Andres Freund wrote: > Hi, > > On 2022-03-27 16:53:57 -0400, Andrew Dunstan wrote: >> I'm therefore going to commit this series > The new jsonb_sqljson test is, on my machine, the slowest test in the main > regression tests: > > 4639 ms jsonb_sqljson > 2401 ms btree_index > 2166

Re: Practical Timing Side Channel Attacks on Memory Compression

2022-04-06 Thread Robert Haas
On Wed, Apr 6, 2022 at 7:18 AM Filip Janus wrote: > A few months ago a group of researchers published a paper about LZ77 > vulnerability[1]. And it also affects PGLZ. From my point of view, it could > be a really dangerous issue for some kind of application. If I understand it > correctly there

Re: OpenSSL deprectation warnings in Postgres 10-13

2022-04-06 Thread Victor Wagner
В Wed, 6 Apr 2022 15:01:42 +0200 Peter Eisentraut пишет: > On 06.04.22 11:55, Victor Wagner wrote: > > And found out that versions 10-13 produce a lot of warnings about > > deprecated OpenSSL functions. > > > > I've found discussion about this problem > > > > https://www.postgresql.org/message

Re: logical decoding and replication of sequences

2022-04-06 Thread Tomas Vondra
On 4/5/22 12:06, Amit Kapila wrote: > On Mon, Apr 4, 2022 at 3:10 AM Tomas Vondra > wrote: >> >> I did some experiments over the weekend, exploring how to rework the >> sequence decoding in various ways. Let me share some WIP patches, >> hopefully that can be useful for trying more stuff and mov

Re: Practical Timing Side Channel Attacks on Memory Compression

2022-04-06 Thread Tom Lane
Robert Haas writes: > One last thought: I don't think it's right to suppose that every > security vulnerability is the result of some design flaw and every > security vulnerability must be patched. As far as Postgres is concerned, I'm kind of unimpressed by timing-based attacks. There are enough

Re: Practical Timing Side Channel Attacks on Memory Compression

2022-04-06 Thread Robert Haas
On Wed, Apr 6, 2022 at 10:14 AM Tom Lane wrote: > Robert Haas writes: > > One last thought: I don't think it's right to suppose that every > > security vulnerability is the result of some design flaw and every > > security vulnerability must be patched. > > As far as Postgres is concerned, I'm ki

REINDEX blocks virtually any queries but some prepared queries.

2022-04-06 Thread Frédéric Yhuel
Hello, 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 planner wants to take an ACCESS SHARE lock on every indexes, regardless of the query, and s

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andrew Dunstan
On 4/6/22 09:20, Andrew Dunstan wrote: > On 4/5/22 22:21, Andres Freund wrote: >> Hi, >> >> On 2022-03-27 16:53:57 -0400, Andrew Dunstan wrote: >>> I'm therefore going to commit this series >> The new jsonb_sqljson test is, on my machine, the slowest test in the main >> regression tests: >> >> 46

Re: Mingw task for Cirrus CI

2022-04-06 Thread Andrew Dunstan
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 (It would be nice if we could see config.lo

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

2022-04-06 Thread Peter Geoghegan
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 planner wants to take an ACCESS SHARE loc

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Stephen Frost
Greetings, * Andrew Dunstan (and...@dunslane.net) wrote: > On 4/6/22 09:20, Andrew Dunstan wrote: > > On 4/5/22 22:21, Andres Freund wrote: > >> On 2022-03-27 16:53:57 -0400, Andrew Dunstan wrote: > >>> I'm therefore going to commit this series > >> The new jsonb_sqljson test is, on my machine, th

Re: [PATCH] pg_stat_toast

2022-04-06 Thread Robert Haas
On Tue, Apr 5, 2022 at 10:34 PM Andres Freund wrote: > > Anyway, my (undisputed up to now!) understanding still is that only > > backends _looking_ at these stats (so, e.g., accessing the pg_stat_toast > > view) actually read the data. So, the 10-15% more space used for pg_stat > > only affect the

Re: Practical Timing Side Channel Attacks on Memory Compression

2022-04-06 Thread Greg Stark
On Wed, 6 Apr 2022 at 10:29, Robert Haas wrote: > > I think that the paper shows that, under the right set of > circumstances, a timing-based attack is possible here. Generally any argument that an attack is infeasible is risky and usually leads to security professionals showing that surprisingly

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andrew Dunstan
On 4/6/22 11:11, Stephen Frost wrote: > Greetings, > > * Andrew Dunstan (and...@dunslane.net) wrote: >> On 4/6/22 09:20, Andrew Dunstan wrote: >>> On 4/5/22 22:21, Andres Freund wrote: On 2022-03-27 16:53:57 -0400, Andrew Dunstan wrote: > I'm therefore going to commit this series Th

Re: [PATCH] pg_stat_toast

2022-04-06 Thread 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 can get it and pay the cost, and others aren't much i

Re: [PATCH] pg_stat_toast

2022-04-06 Thread Robert Haas
On Tue, Apr 5, 2022 at 6:08 PM Gunnar "Nick" Bluth wrote: > At the end of the day, one could argue like you did there for almost all > (non-attribute) stats. "Why track function execution times? Just set up > a benchmark and call the function 1 mio times and you'll know how long > it takes on aver

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andrew Dunstan
On 4/6/22 11:33, Andrew Dunstan wrote: > On 4/6/22 11:11, Stephen Frost wrote: >> Greetings, >> >> * Andrew Dunstan (and...@dunslane.net) wrote: >>> On 4/6/22 09:20, Andrew Dunstan wrote: On 4/5/22 22:21, Andres Freund wrote: > On 2022-03-27 16:53:57 -0400, Andrew Dunstan wrote: >> I

Re: [PATCH] pg_stat_toast

2022-04-06 Thread Robert Haas
On Wed, Apr 6, 2022 at 11:49 AM Alvaro Herrera wrote: > 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 th

Last day of commitfest

2022-04-06 Thread Greg Stark
The commitfest ends with the feature freeze in less than 48 hours. I'm going to start moving patches that are Waiting On Author and haven't received comment in more than a few days out of the commitfset. If the patch has received a review or good feedback then I'll mark it Returned With Feedback.

Re: [PATCH] pg_stat_toast

2022-04-06 Thread Gunnar "Nick" Bluth
Am 06.04.22 um 17:22 schrieb Robert Haas: > On Tue, Apr 5, 2022 at 10:34 PM Andres Freund wrote: >>> Anyway, my (undisputed up to now!) understanding still is that only >>> backends _looking_ at these stats (so, e.g., accessing the pg_stat_toast >>> view) actually read the data. So, the 10-15% mor

Re: Last day of commitfest

2022-04-06 Thread Tom Lane
Greg Stark writes: > The commitfest ends with the feature freeze in less than 48 hours. Just to clarify --- I think what has been agreed to is that we'll close the CF as of the announced time (noon UTC Friday), but Robert and I will push in our two wide-ranging patches after that. You might as we

Re: shared-memory based stats collector - v70

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 18:11:04 +0900, Kyotaro Horiguchi wrote: > 0004: > > I can see padding_pgstat_send and fun:pgstat_send in valgrind.supp Those shouldn't be affected by the patch, I think? But I did indeed forget to remove those in 0010. > 0006: > > I'm fine with the categorize for now. > > +

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Tom Lane
Andrew Dunstan writes: >> I think we should, but I think here the obvious solution is to drop the >> table when we're done with it. I'll test that. > It does work, but Tom prefers not to have the test at all, so I'll just > rip it out. Perhaps moving it to some other place (test/modules/somethin

Re: pg14 psql broke \d datname.nspname.relname

2022-04-06 Thread Mark Dilger
> On Mar 29, 2022, at 8:20 AM, Robert Haas wrote: > > In describe.c, why are the various describeWhatever functions > returning true when validateSQLNamePattern returns false? It seems to > me that they should return false. That would cause exec_command_d() to > set status = PSQL_CMD_ERROR, whi

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-04-06 Thread Justin Pryzby
I already rebased this in a local branch, so here it's. I don't expect it to survive the day. This should be updated to use the tuplestore helper. >From bc4afef0bf0cb34d90fb6c029ab4c5ff1a6d033d Mon Sep 17 00:00:00 2001 From: Melanie Plageman Date: Mon, 11 Oct 2021 16:15:06 -0400 Subject: [PATCH 1

Re: shared-memory based stats collector - v70

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 13:31:31 +0200, Alvaro Herrera wrote: > Just skimming a bit here ... Thanks! > On 2022-Apr-05, Andres Freund wrote: > > > From 0532b869033595202d5797b148f22c61e4eb4969 Mon Sep 17 00:00:00 2001 > > From: Andres Freund > > Date: Mon, 4 Apr 2022 16:53:16 -0700 > > Subject: [PAT

Re: [PATCH] pg_stat_toast

2022-04-06 Thread Gunnar "Nick" Bluth
Am 06.04.22 um 17:49 schrieb Robert Haas: > I feel like if you want to know whether externalization made a > difference, you can look at the size of the TOAST table. And by > selecting directly from that table, you can even see how many chunks > it contains, and how many are full-sized chunks vs.

Re: shared-memory based stats collector - v70

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 16:24:28 +0700, John Naylor wrote: > On Wed, Apr 6, 2022 at 10:00 AM Andres Freund wrote: > > - while working on the above point, I noticed that hash_bytes() showed up > > noticeably in profiles, so I replaced it with a fixed-width function > > I'm curious about this -- could

Re: [PATCH] pg_stat_toast

2022-04-06 Thread Robert Haas
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 though? I don't have statistics on that, but it's large enough that the expense associated with the statistics colle

Re: Mingw task for Cirrus CI

2022-04-06 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. Hm. Hadn't enabled that when I trie

Re: [PATCH] pg_stat_toast

2022-04-06 Thread 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 though? > > I don't have statistics on that, but it's

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 11:50:11 -0400, Andrew Dunstan wrote: > It does work, but Tom prefers not to have the test at all, so I'll just > rip it out. If I understand correctly the reason a large table is needed is to test parallelism, right? Wouldn't the better fix be to just tweak the parallelism sett

Re: psql - add SHOW_ALL_RESULTS option - pg_regress output

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 10:37:29 +0200, Peter Eisentraut wrote: > On 06.04.22 04:06, Andres Freund wrote: > > On 2022-04-04 23:32:50 +0200, Peter Eisentraut wrote: > > > This has been committed. > > > > It's somewhat annoying that made pg_regress even more verbose than before: > > > > == r

Re: Granting SET and ALTER SYSTE privileges for GUCs

2022-04-06 Thread Tom Lane
I wrote: > Here's v17 rebased up to HEAD. Pushed after fooling around with the docs. I have a couple of followup ideas in mind (\dcp and another one), which I'll start separate threads about. regards, tom lane

buildfarm failures, src/test/recovery

2022-04-06 Thread Mark Dilger
Hi Andrew, It appears to me that 2ef6f11b0c77ec323c688ddfd98ffabddb72c11d broke src/test/recovery. It looks like the following fixes it. Care to review and push? Or perhaps just revert that commit? diff --git a/src/test/regress/expected/jsonb_sqljson.out b/src/test/regress/expected/jsonb_sq

Re: [Proposal] vacuumdb --schema only

2022-04-06 Thread Gilles Darold
Le 30/03/2022 à 23:22, Nathan Bossart a écrit : > I took a look at the v4 patch. > > 'git-apply' complains about whitespace errors: Fixed. > + > +To clean all tables in the Foo and > bar schemas > +only in a database named xyzzy: > + > +$ vacuumdb --schema='"Foo"' --schema='bar' > x

How about a psql backslash command to show GUCs?

2022-04-06 Thread Tom Lane
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 * from pg_settings where name like '%foo%'; when I want to see s

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

2022-04-06 Thread Pavel Stehule
hi 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 > > selec

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andrew Dunstan
On 4/6/22 12:59, Andres Freund wrote: > Hi, > > On 2022-04-06 11:50:11 -0400, Andrew Dunstan wrote: >> It does work, but Tom prefers not to have the test at all, so I'll just >> rip it out. > If I understand correctly the reason a large table is needed is to test > parallelism, right? Wouldn't th

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

2022-04-06 Thread Alvaro Herrera
On 2022-Apr-06, Tom Lane wrote: > However, I very often find myself resorting to the much more tedious > > select * from pg_settings where name like '%foo%'; > > when I want to see some related parameters, or when I'm a bit > fuzzy on the exact name of the parameter. Been there many times, so +

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

2022-04-06 Thread Mark Dilger
> On Apr 6, 2022, at 10:48 AM, Tom Lane wrote: > > So does anyone else like this idea? Privileges on targets other than parameters have a \d command to show the privileges, as listed in doc/src/sgml/ddl.sgml. There isn't an obvious reason for omitting parameters from the list so covered.

Re: SQL/JSON: JSON_TABLE

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 11:11:42 -0400, Stephen Frost wrote: > Maybe we should add --no-unlogged-table-data to those pg_dumpall runs? Yes, I think we should. And then we should explicitly add an unlogged table that isn't dropped. That way we get pg_upgrade testing etc. Thomas, what do you think? Gree

Should pg_dumpall dump ALTER SYSTEM settings?

2022-04-06 Thread Tom Lane
Commit a0ffa885e included some code that makes "pg_dumpall -g" dump GRANT commands for any GUCs that have had nondefault privileges granted on them. I pushed that without complaint, but it feels a little weird to me that we are worrying about preserving grants for GUCs when we don't worry about pr

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

2022-04-06 Thread Joe Conway
On 4/6/22 13:58, Alvaro Herrera wrote: On 2022-Apr-06, Tom Lane wrote: However, I very often find myself resorting to the much more tedious select * from pg_settings where name like '%foo%'; when I want to see some related parameters, or when I'm a bit fuzzy on the exact name of the parameter

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

2022-04-06 Thread Tom Lane
Joe Conway writes: > No as sure about \show though. That seems like it could be confused with > showing other stuff. Maybe consistent with \sf[+] and \sv[+] we could > add \sc[+]? Hmm ... my first reaction to that was "no, it should be \sp for 'parameter'". But with the neighboring \sf for 'fu

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

2022-04-06 Thread Greg Stark
On Wed, 6 Apr 2022 at 13:50, Tom Lane wrote: > > when I want to see some related parameters, or when I'm a bit > fuzzy on the exact name of the parameter. Not only is this > a lot of typing, but unless I'm willing to type even more to > avoid using "*", I'll get a wall of mostly unreadable text,

Re: shared-memory based stats collector - v70

2022-04-06 Thread Lukas Fittl
On Tue, Apr 5, 2022 at 8:00 PM Andres Freund wrote: > Here comes v70: > Some small nitpicks on the docs: > From 13090823fc4c7fb94512110fb4d1b3e86fb312db Mon Sep 17 00:00:00 2001 > From: Andres Freund > Date: Sat, 2 Apr 2022 19:38:01 -0700 > Subject: [PATCH v70 14/27] pgstat: update docs. > ...

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-04-06 Thread Jacob Champion
On Wed, 2022-04-06 at 20:09 +0900, Michael Paquier wrote: > > The current patch already handles NULL with a byte of overhead; is > > there any advantage to using noError? (It might make things messier > > once a second member gets added to the struct.) My concern was directed > > at the GUC proposa

Re: Kerberos delegation support in libpq and postgres_fdw

2022-04-06 Thread Stephen Frost
Greetinsg, * Jacob Champion (pchamp...@vmware.com) wrote: > On Fri, 2022-03-11 at 19:39 -0500, Stephen Frost wrote: > > On Fri, Mar 11, 2022 at 18:55 Jacob Champion wrote: > > > [5] says we have to free the proxy credential with GSS_Release_cred(); > > > I don't see that happening anywhere, but I

Re: shared-memory based stats collector - v70

2022-04-06 Thread Andres Freund
Hi, On 2022-04-06 12:14:35 -0700, Lukas Fittl wrote: > On Tue, Apr 5, 2022 at 8:00 PM Andres Freund wrote: > > > Here comes v70: > > > > Some small nitpicks on the docs: Thanks! > > From 13090823fc4c7fb94512110fb4d1b3e86fb312db Mon Sep 17 00:00:00 2001 > > From: Andres Freund > > Date: Sat,

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-04-06 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Tue, 2022-04-05 at 13:06 -0700, Nathan Bossart wrote: > > On Tue, Apr 05, 2022 at 11:25:36AM -0400, Stephen Frost wrote: > > > Please find attached an updated patch + commit message.  Mostly, I just > > > went through and did a bit m

Re: shared-memory based stats collector - v70

2022-04-06 Thread Justin Pryzby
On Wed, Apr 06, 2022 at 12:27:34PM -0700, Andres Freund wrote: > > > + next use of statistical information will cause a new snapshot to be > > > built > > > + or accessed statistics to be cached. > > > > I believe this should be an "and", not an "or". (next access builds both a > > new snapsh

Re: shared-memory based stats collector - v70

2022-04-06 Thread Lukas Fittl
On Wed, Apr 6, 2022 at 12:34 PM Justin Pryzby wrote: > On Wed, Apr 06, 2022 at 12:27:34PM -0700, Andres Freund wrote: > > > > + next use of statistical information will cause a new snapshot to > be built > > > > + or accessed statistics to be cached. > > > > > > I believe this should be an "a

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-04-06 Thread Nathan Bossart
On Wed, Apr 06, 2022 at 03:29:15PM -0400, Stephen Frost wrote: > This has now been committed- thanks again to everyone for their help! Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

New compiler warning from btree dedup code

2022-04-06 Thread Tom Lane
I just noticed that if I build without asserts on my Mac laptop (using Apple's latest clang, 13.1.6) I get nbtdedup.c:68:8: warning: variable 'pagesaving' set but not used [-Wunused-but-set-variable] Sizepagesaving = 0; ^ 1 warning generated. Apparentl

Re: New compiler warning from btree dedup code

2022-04-06 Thread Peter Geoghegan
That approach seems fine. Thanks.-- Peter Geoghegan

Re: trigger example for plsample

2022-04-06 Thread Mark Wong
On Thu, Mar 10, 2022 at 06:36:44PM -0500, Chapman Flack wrote: > On 03/02/22 15:12, Mark Wong wrote: > > > I've attached v2, which reduces the output: > > > > * Removing the notices for the text body, and the "compile" message. > > * Replaced the notice for "compile" message with a comment as a >

Re: buildfarm failures, src/test/recovery

2022-04-06 Thread Andrew Dunstan
On 4/6/22 13:42, Mark Dilger wrote: > Hi Andrew, > > It appears to me that 2ef6f11b0c77ec323c688ddfd98ffabddb72c11d broke > src/test/recovery. > > It looks like the following fixes it. Care to review and push? Or perhaps > just revert that commit? Fixed here https://git.postgresql.org/pg/co

Re: trigger example for plsample

2022-04-06 Thread Fabrízio de Royes Mello
On Wed, Apr 6, 2022 at 5:44 PM Mark Wong wrote: > > On Thu, Mar 10, 2022 at 06:36:44PM -0500, Chapman Flack wrote: > > On 03/02/22 15:12, Mark Wong wrote: > > > > > I've attached v2, which reduces the output: > > > > > > * Removing the notices for the text body, and the "compile" message. > > > *

Re: Add index scan progress to pg_stat_progress_vacuum

2022-04-06 Thread Imseih (AWS), Sami
>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 seems like the appropriate place to be storing any kind of data >

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

2022-04-06 Thread Jonathan S. Katz
On 4/6/22 2:40 PM, Tom Lane wrote: Joe Conway writes: No as sure about \show though. That seems like it could be confused with showing other stuff. Maybe consistent with \sf[+] and \sv[+] we could add \sc[+]? Hmm ... my first reaction to that was "no, it should be \sp for 'parameter'". But w

Re: shared-memory based stats collector - v70

2022-04-06 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 just noticed an existing incoherency that I'm wonder

Re: shared-memory based stats collector - v70

2022-04-06 Thread David G. Johnston
On Wednesday, April 6, 2022, Andres Freund wrote: > > > I'd go for > pgstat_reset_slru_counter() -> pgstat_reset_slru() > pgstat_reset_subscription_counter() -> pgstat_reset_subscription() > pgstat_reset_subscription_counters() -> pgstat_reset_all_subscriptions() > pgstat_reset_replslot_counter()

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

2022-04-06 Thread Mark Dilger
> On Apr 6, 2022, at 2:34 PM, Jonathan S. Katz wrote: > > "\sc" would make sense I originally wrote the command as \dcp (describe configuration parameter) because \dp (describe parameter) wasn't available. The thing we're showing is a "parameter", not a "config". If we're going to use a s

Re: Add spin_delay() implementation for Arm in s_lock.h

2022-04-06 Thread Tom Lane
"Blake, Geoff" writes: > Hi Tom, Andres, > Any additional feedback for this patch? I did some more research and testing: * Using a Mac with the M1 Pro chip (marginally beefier than the M1 I was testing on before), I think I can see some benefit in the test case I proposed upthread. It's margina

  1   2   >