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

2022-03-02 Thread Michael Paquier
On Wed, Mar 02, 2022 at 01:27:40PM -0800, Andres Freund wrote: > I don't think we should commit this without synchronizing the authn between > worker / leader (in a separate commit). Too likely that some function that's > marked parallel ok queries the authn_id, opening up a security/monitoring

Re: Changing "Hot Standby" to "hot standby"

2022-03-02 Thread Daniel Westermann (DWE)
>> Thanks for having a look. Are you suggesting to change it like this? >> -    Hot Standby is the term used to describe the ability to connect to >> +    Hot standby is the term used to describe the ability to connect to >Yes.  Isn't it the right form of a sentence? Done like that. Regards

Re: Commitfest 2022-03 Patch Triage Part 1b

2022-03-02 Thread Fabien COELHO
Hello Greg, Peter posted an updated version of Fabiens patch about a month ago (which at this point no longer applies) Attached a v15 which is a rebase, after some minor changes in the source and some new test cases added (good!). fixing a few issues, but also point at old review comments

Re: Changing "Hot Standby" to "hot standby"

2022-03-02 Thread Kyotaro Horiguchi
At Thu, 3 Mar 2022 06:55:43 +, "Daniel Westermann (DWE)" wrote in > Hi Kyotaro, > > >>    > >>-    Hot Standby is the term used to describe the ability to connect to > >>+    hot standby is the term used to describe the ability to connect to > > >They look like decapitalizing the first

Re: Schema variables - new implementation for Postgres 15

2022-03-02 Thread Julien Rouhaud
On Thu, Mar 03, 2022 at 03:06:52PM +0800, Julien Rouhaud wrote: > Hi, > > On Wed, Mar 02, 2022 at 06:03:06AM +0100, Pavel Stehule wrote: > > > > I lost commit with this change. I am sending updated patch. Also, another thing is the size of the patch. It's probably the minimum to have a

Re: Schema variables - new implementation for Postgres 15

2022-03-02 Thread Julien Rouhaud
Hi, On Wed, Mar 02, 2022 at 06:03:06AM +0100, Pavel Stehule wrote: > > I lost commit with this change. I am sending updated patch. Thanks a lot Pavel! I did a more thorough review of the patch. I'm attaching a diff (in .txt extension) for comment improvement suggestions. I may have

Re: Changing "Hot Standby" to "hot standby"

2022-03-02 Thread Daniel Westermann (DWE)
Hi Kyotaro, >>    >>-    Hot Standby is the term used to describe the ability to connect to >>+    hot standby is the term used to describe the ability to connect to >They look like decapitalizing the first word in a sentsnce. Thanks for having a look. Are you suggesting to change it like

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-02 Thread Amit Kapila
On Wed, Mar 2, 2022 at 1:05 PM Masahiko Sawada wrote: > > On Wed, Mar 2, 2022 at 4:14 PM Amit Kapila wrote: > > I've attached updated patches. > The first patch LGTM. Some comments on the second patch: 1. @@ -3499,6 +3503,17 @@ ApplyWorkerMain(Datum main_arg) myslotname =

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Michael Paquier
On Wed, Mar 02, 2022 at 11:15:28AM -0500, Stephen Frost wrote: > With... which? We removed recovery.conf without any warning between > major releases, yet it was used by every single PG file-based backup and > restore solution out there and by every single organization that had > ever done a

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Tatsuo Ishii
> Yes, really, it's a known-broken system which suffers from such an old > and well known attack that it's been given a name: pass-the-hash. As > was discussed on this thread even, just the fact that it's not trivial > to break on the wire doesn't make it not-broken, particularly when we > use

RE: row filtering for logical replication

2022-03-02 Thread shiy.f...@fujitsu.com
On Thu, Mar 3, 2022 10:40 AM Amit Kapila wrote: > > On Wed, Mar 2, 2022 at 5:42 PM Euler Taveira wrote: > > > > On Wed, Mar 2, 2022, at 8:45 AM, Tomas Vondra wrote: > > > > While working on the column filtering patch, which touches about the > > same places, I noticed two minor gaps in testing:

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2022-03-02 Thread Michael Paquier
On Wed, Mar 02, 2022 at 12:07:29AM -0800, Andres Freund wrote: >> +++ b/src/bin/pg_upgrade/t/001_basic.pl >> @@ -0,0 +1,9 @@ >> +use strict; >> +use warnings; >> + >> +use PostgreSQL::Test::Utils; >> +use Test::More tests => 8; > > Outdated. Fixed. >> +program_help_ok('pg_upgrade'); >>

Re: PG DOCS - logical replication filtering

2022-03-02 Thread Peter Smith
On Thu, Mar 3, 2022 at 2:15 PM Amit Kapila wrote: > > On Wed, Mar 2, 2022 at 8:00 PM Peter Eisentraut > wrote: > > > > On 02.03.22 05:47, Peter Smith wrote: > > > This patch introduces a new "Filtering" page to give a common place > > > where all kinds of logical replication filtering can be

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-03-02 Thread Japin Li
On Thu, 03 Mar 2022 at 11:25, David G. Johnston wrote: > I would suggest a wording more like: > > "A precondition for using minimal WAL is to disable WAL archiving and > streaming replication by setting max_wal_senders to 0, and archive_mode to > off." > > While accurate, the phrase "you must

Re: logical replication empty transactions

2022-03-02 Thread Ajin Cherian
On Wed, Mar 2, 2022 at 1:01 PM shiy.f...@fujitsu.com wrote: > > Hi, > > Here are some comments on the v21 patch. > > 1. > + WalSndKeepalive(false, 0); > > Maybe we can use InvalidXLogRecPtr here, instead of 0. > Fixed. > 2. > + pq_sendint64(_message, writePtr ?

RE: Failed transaction statistics to measure the logical replication progress

2022-03-02 Thread osumi.takami...@fujitsu.com
On Wednesday, March 2, 2022 5:29 PM Shi, Yu/侍 雨 wrote: > A comments on the v26 patch. Thank you for checking the patch ! > > The following document about pg_stat_subscription_stats view only says that > "showing statistics about errors", should we add something about transactions > here? > >

RE: Failed transaction statistics to measure the logical replication progress

2022-03-02 Thread osumi.takami...@fujitsu.com
On Wednesday, March 2, 2022 2:18 PM Masahiko Sawada wrote: > On Wed, Mar 2, 2022 at 10:21 AM osumi.takami...@fujitsu.com > wrote: > > Also, I quickly checked other similar views(pg_stat_slru, > > pg_stat_wal_receiver) commit logs, especially when they introduce columns. > > But, I couldn't find

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-03-02 Thread David G. Johnston
On Wed, Mar 2, 2022 at 7:44 PM Japin Li wrote: > > Hi, hackers > > When I try to change wal_level to minimal and restart the database, it > complains > max_wal_senders > 0. > > 2022-03-03 10:10:16.938 CST [6389] FATAL: WAL streaming (max_wal_senders > > 0) requires wal_level "replica" or

Re: PG DOCS - logical replication filtering

2022-03-02 Thread Amit Kapila
On Wed, Mar 2, 2022 at 8:00 PM Peter Eisentraut wrote: > > On 02.03.22 05:47, Peter Smith wrote: > > This patch introduces a new "Filtering" page to give a common place > > where all kinds of logical replication filtering can be described. > > (e.g. It is envisaged that a "Column Filters" section

Re: Add CHECKPOINT_REQUESTED flag to the log message in LogCheckpointStart()

2022-03-02 Thread Kyotaro Horiguchi
At Thu, 3 Mar 2022 10:27:10 +0900, Michael Paquier wrote in > On Thu, Mar 03, 2022 at 09:39:37AM +0900, Kyotaro Horiguchi wrote: > > At Wed, 2 Mar 2022 18:18:10 +0530, Bharath Rupireddy > > wrote in > >> I don't think that's useful. Being in LogCheckpointStart > >> (CreateCheckPoint or

Re: Why do spgbuildempty(), btbuildempty(), and blbuildempty() use smgrwrite()?

2022-03-02 Thread Kyotaro Horiguchi
At Wed, 2 Mar 2022 20:07:14 -0500, Melanie Plageman wrote in > If you enable the CHECK_WRITE_VS_EXTEND-protected assert in mdwrite(), > you'll trip it anytime you exercise btbuildempty(), blbuildempty(), or > spgbuildempty(). > > In this case, it may not make any meaningful difference if

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

2022-03-02 Thread Kyotaro Horiguchi
Hi. +#ifdef FRONTEND +/* + * Functions that are currently not needed in the backend, but are better + * implemented inside xlogreader.c because of the internal facilities available + * here. + */ + #endif /* FRONTEND */ Why didn't you remove the

Doc about how to set max_wal_senders when setting minimal wal_level

2022-03-02 Thread Japin Li
Hi, hackers When I try to change wal_level to minimal and restart the database, it complains max_wal_senders > 0. 2022-03-03 10:10:16.938 CST [6389] FATAL: WAL streaming (max_wal_senders > 0) requires wal_level "replica" or "logical" However, the documentation about wal_level [1] doesn't

Re: row filtering for logical replication

2022-03-02 Thread Amit Kapila
On Wed, Mar 2, 2022 at 5:42 PM Euler Taveira wrote: > > On Wed, Mar 2, 2022, at 8:45 AM, Tomas Vondra wrote: > > While working on the column filtering patch, which touches about the > same places, I noticed two minor gaps in testing: > > 1) The regression tests do perform multiple ALTER

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

2022-03-02 Thread Ashutosh Sharma
On Wed, Mar 2, 2022 at 10:37 PM Bharath Rupireddy wrote: > > On Wed, Mar 2, 2022 at 8:12 PM Ashutosh Sharma wrote: > > > > Some review comments on v5 patch (v5-0001-pg_walinspect.patch) > > Thanks for reviewing. > > > +-- > > +-- pg_get_wal_records_info() > > +-- > > +CREATE FUNCTION

Re: Design of pg_stat_subscription_workers vs pgstats

2022-03-02 Thread Andres Freund
Hi, On 2022-02-25 11:32:24 -0800, Andres Freund wrote: > On 2022-02-25 16:25:01 -0300, Euler Taveira wrote: > > On Fri, Feb 25, 2022, at 11:52 AM, Greg Stark wrote: > > > On Tue, 25 Jan 2022 at 01:32, Andres Freund wrote: > > > > > > > > Hi, > > > > > > > > I was looking the shared memory stats

Re: [Proposal] Global temporary tables

2022-03-02 Thread Pavel Stehule
Hi > I think you'd basically have to come up with a generic design for > partitioning > catalog tables into local / non-local storage, without needing explicit > code > for each catalog. That could also be used to store the default catalog > contents separately from user defined ones (e.g.

Re: Add CHECKPOINT_REQUESTED flag to the log message in LogCheckpointStart()

2022-03-02 Thread Michael Paquier
On Thu, Mar 03, 2022 at 09:39:37AM +0900, Kyotaro Horiguchi wrote: > At Wed, 2 Mar 2022 18:18:10 +0530, Bharath Rupireddy > wrote in >> I don't think that's useful. Being in LogCheckpointStart >> (CreateCheckPoint or CreateRestartPoint) itself means that somebody >> has requested a checkpoint.

Re: Changing "Hot Standby" to "hot standby"

2022-03-02 Thread Kyotaro Horiguchi
At Wed, 2 Mar 2022 15:22:44 +, "Daniel Westermann (DWE)" wrote in > > Pretty sure that for titles we should keep English capitalization rules. > > Done like that. Thanks for taking a look. -Hot Standby feedback propagates upstream, whatever the cascaded arrangement. +hot

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Michael Paquier
On Wed, Mar 02, 2022 at 12:04:59PM -0500, Chapman Flack wrote: > I had just recently noticed that while reviewing [0], but shrugged, > as I didn't know what the history was. Okay. I did not see you mention it on the thread, but the discussion is long so it is easy to miss some of its details. >

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Michael Paquier
On Thu, Mar 03, 2022 at 12:36:32AM +0800, Julien Rouhaud wrote: > I don't see strong evidence for that pattern being wildly used with some naive > grepping: Yes, I don't recall either seeing the style with an undef a lot when it came to system functions. I'll move on and apply the fix in a

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-03-02 Thread Justin Pryzby
Rebased to appease cfbot. I ran these paches under a branch which shows code coverage in cirrus. It looks good to my eyes. https://api.cirrus-ci.com/v1/artifact/task/5212346552418304/coverage/coverage/00-index.html Are these patches being considered for v15 ? >From

Why do spgbuildempty(), btbuildempty(), and blbuildempty() use smgrwrite()?

2022-03-02 Thread Melanie Plageman
If you enable the CHECK_WRITE_VS_EXTEND-protected assert in mdwrite(), you'll trip it anytime you exercise btbuildempty(), blbuildempty(), or spgbuildempty(). In this case, it may not make any meaningful difference if smgrwrite() or smgrextend() is called (_mdfd_getseg() behavior won't differ

Re: Proposal: Support custom authentication methods using hooks,Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Tatsuo Ishii
> On 2/25/22 12:39 PM, Tom Lane wrote: >> Jeff Davis writes: >>> On Thu, 2022-02-24 at 20:47 -0500, Tom Lane wrote: ... and, since we can't readily enforce that the client only sends those cleartext passwords over suitably-encrypted connections, this could easily be a net negative

Re: PG DOCS - logical replication filtering

2022-03-02 Thread Peter Smith
On Wed, Mar 2, 2022 at 8:26 PM Amit Kapila wrote: > > On Wed, Mar 2, 2022 at 2:37 PM Aleksander Alekseev > wrote: > > > > > > I see that a large part of the documentation is commented and marked as TBA > > (Column Filters, Combining Different Kinds of Filters). Could you please > > clarify if

Re: PG DOCS - logical replication filtering

2022-03-02 Thread Peter Smith
On Wed, Mar 2, 2022 at 8:43 PM Aleksander Alekseev wrote: ... > Here is an updated version of the patch. Thanks for your review comments and fixes. The updated v2 patch looks good to me. -- Kind Regards, Peter Smith. Fujitsu Australia

Re: Add CHECKPOINT_REQUESTED flag to the log message in LogCheckpointStart()

2022-03-02 Thread Kyotaro Horiguchi
At Wed, 2 Mar 2022 18:18:10 +0530, Bharath Rupireddy wrote in > On Wed, Mar 2, 2022 at 5:41 PM Nitin Jadhav > wrote: > > > > Hi, > > > > I have noticed that the CHECKPOINT_REQUESTED flag information is not > > present in the log message of LogCheckpointStart() function. I would > > like to

Re: Column Filtering in Logical Replication

2022-03-02 Thread Justin Pryzby
I applied this patch in my branch with CI hacks to show code coverage on cirrus. https://api.cirrus-ci.com/v1/artifact/task/6186186539532288/coverage/coverage/00-index.html Eyeballing it looks good. But GetActionsInPublication() isn't being hit at all? I think the queries in pg_dump should be

Re: Logical replication timeout problem

2022-03-02 Thread Peter Smith
On Wed, Mar 2, 2022 at 1:06 PM wangw.f...@fujitsu.com wrote: > ... > Attach the new patch. [suggestion by Kuroda-San] It is difficult to read the thread and to keep track of who reviewed what, and what patch is latest etc, when every patch name is the same. Can you please introduce a version

Re: BufferAlloc: don't take two simultaneous locks

2022-03-02 Thread Yura Sokolov
В Вт, 01/03/2022 в 10:24 +0300, Yura Sokolov пишет: > Ok, here is v4. And here is v5. First, there was compilation error in Assert in dynahash.c . Excuse me for not checking before sending previous version. Second, I add third commit that reduces HASHHDR allocation size for non-partitioned

Re: libpq compression (part 2)

2022-03-02 Thread Justin Pryzby
If there's no objection, I'd like to move this to the next CF for consideration in PG16. On Mon, Jan 17, 2022 at 10:39:19PM -0600, Justin Pryzby wrote: > On Tue, Jan 18, 2022 at 02:06:32AM +0500, Daniil Zakhlystov wrote: > > > => Since March, errmsg doesn't need extra parenthesis around it

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-02 Thread Robert Haas
On Wed, Mar 2, 2022 at 3:00 PM Andres Freund wrote: > What I am stuck on is what we can do for the released branches. Data > corruption after two consecutive ALTER DATABASE SET TABLESPACEs seems like > something we need to address. I think we should consider back-porting the ProcSignalBarrier

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

2022-03-02 Thread Andres Freund
Hi, On 2022-03-01 08:35:27 -0500, Stephen Frost wrote: > I'm not really sure why we're arguing about this, but clearly the authn > ID of the leader process is what should be used because that's the > authentication under which the parallel worker is running, just as much > as the effective role

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-02 Thread Andres Freund
Hi, On 2022-03-02 16:25:33 +0300, Aleksander Alekseev wrote: > I agree with Bruce it would be great to deliver this in PG15. > Please let me know if you believe it's unrealistic for any reason so I will > focus on testing and reviewing other patches. I don't see 15 as a realistic target for

Re: [Proposal] Global temporary tables

2022-03-02 Thread Andres Freund
Hi, On 2022-02-27 06:09:54 +0100, Pavel Stehule wrote: > ne 27. 2. 2022 v 5:13 odesílatel Andres Freund napsal: > > On 2022-02-27 04:17:52 +0100, Pavel Stehule wrote: > > > Without this, the GTT will be terribly slow like current temporary tables > > > with a lot of problems with bloating of

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Andres Freund
Hi, On 2022-03-02 15:26:32 -0500, Stephen Frost wrote: > Part of the point, for my part anyway, of dropping support for plaintext > transmission would be to remove support for that from libpq, otherwise a > compromised server could still potentially convince a client to provide > a plaintext

Re: Adding CI to our tree

2022-03-02 Thread Justin Pryzby
On Mon, Feb 28, 2022 at 02:58:02PM -0600, Justin Pryzby wrote: > I still think that if "Build Docs" is a separate cirrus task, it should > rebuild > docs on every CI run, even if they haven't changed, for any patch that touches > docs/. It'll be confusing if cfbot shows 5 green circles and 4 of

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread samay sharma
Hi, On Wed, Mar 2, 2022 at 12:32 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 01.03.22 22:34, Andres Freund wrote: > > The cases I've heard about are about centralizing auth across multiple > cloud > > services. Including secret management in some form. E.g. allowing an >

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2022-03-02 09:32:26 +0100, Peter Eisentraut wrote: > > On 01.03.22 22:34, Andres Freund wrote: > > > The cases I've heard about are about centralizing auth across multiple > > > cloud > > > services. Including secret management in some

Re: trigger example for plsample

2022-03-02 Thread Mark Wong
On Fri, Feb 25, 2022 at 06:39:39PM +, Chapman Flack wrote: > This patch is straightforward, does what it says, and passes the tests. > > Regarding the duplication of code between plsample_func_handler and > plsample_trigger_handler, perhaps that's for the best for now, as 3554 in > the same

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Andres Freund
Hi, On 2022-03-02 09:32:26 +0100, Peter Eisentraut wrote: > On 01.03.22 22:34, Andres Freund wrote: > > The cases I've heard about are about centralizing auth across multiple cloud > > services. Including secret management in some form. E.g. allowing an > > application to auth to postgres, redis

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-02 Thread Andres Freund
Hi, On 2022-03-02 14:52:01 -0500, Robert Haas wrote: > - I am having some trouble understanding clearly what 0001 is doing. > I'll try to study it further. It tests for the various scenarios I could think of that could lead to FD reuse, to state the obvious ;). Anything particularly unclear. >

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-02 Thread Robert Haas
On Tue, Feb 22, 2022 at 4:40 AM Andres Freund wrote: > On 2022-02-22 01:11:21 -0800, Andres Freund wrote: > > I've started to work on a few debugging aids to find problem like > > these. Attached are two WIP patches: > > Forgot to attach. Also importantly includes a tap test for several of these

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

2022-03-02 Thread Chapman Flack
On 03/01/22 20:03, Nathan Bossart wrote: > Here is a new version of the patch with the following changes: I did not notice this earlier (sorry), but there seems to remain in backup.sgml a programlisting example that shows a psql invocation for pg_backup_start, then a tar command, then another

Re: Support for grabbing multiple consecutive values with nextval()

2022-03-02 Thread Jille Timmermans
On 2022-02-28 11:13, Peter Eisentraut wrote: On 27.02.22 10:42, Jille Timmermans wrote: I wanted to be able to allocate a bunch of numbers from a sequence at once. Multiple people seem to be struggling with this

Re: [PATCH] Add reloption for views to enable RLS

2022-03-02 Thread Laurenz Albe
On Wed, 2022-03-02 at 10:10 +, Dean Rasheed wrote: > > I kept "check_permissions_owner" for now. Constantly changing it around > > with each iteration doesn't really bring any value IMHO, I'd rather have > > a final consensus on how to name the option and *then* change it for good. > > Yes

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-02 Thread Bharath Rupireddy
On Wed, Mar 2, 2022 at 4:45 PM Nitin Jadhav wrote: > > Also, how about special phases for SyncPostCheckpoint(), > > SyncPreCheckpoint(), InvalidateObsoleteReplicationSlots(), > > PreallocXlogFiles() (it currently pre-allocates only 1 WAL file, but > > it might be increase in future (?)),

Re: [Proposal] Global temporary tables

2022-03-02 Thread Pavel Stehule
st 2. 3. 2022 v 19:02 odesílatel Adam Brusselback napsal: > >In my observation, very few users require an accurate query plan for > temporary tables to > perform manual analyze. > > Absolutely not true in my observations or personal experience. It's one of > the main reasons I have needed to use

Re: [Proposal] Global temporary tables

2022-03-02 Thread Adam Brusselback
>In my observation, very few users require an accurate query plan for temporary tables to perform manual analyze. Absolutely not true in my observations or personal experience. It's one of the main reasons I have needed to use (local) temporary tables rather than just materializing a CTE when

Re: Add id's to various elements in protocol.sgml

2022-03-02 Thread Chapman Flack
On 03/02/22 12:46, Brar Piening wrote: > With regard to varlistentry I'd suggest to decide whether to add ids or > not on a case by case base. I already offered to add ids to long lists > upon request but I wouldn't want to blindly add ~4k ids that nobody Perhaps there are a bunch of

Re: Add id's to various elements in protocol.sgml

2022-03-02 Thread Brar Piening
On 02.03.2022 at 10:37, Peter Eisentraut wrote: I have applied the part of your patch that adds the id's.  The discussion about the formatting aspect can continue. Thank you! I've generated some data by outputting the element name whenever a section or varlistentry lacks an id. That's how the

Re: using extended statistics to improve join estimates

2022-03-02 Thread Justin Pryzby
On Wed, Mar 02, 2022 at 11:38:21AM -0600, Justin Pryzby wrote: > Rebased over 269b532ae and muted compiler warnings. And attached. >From 587a5e9fe87c26cdcd9602fc349f092da95cc580 Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Mon, 13 Dec 2021 14:05:17 +0100 Subject: [PATCH] Estimate joins

Re: using extended statistics to improve join estimates

2022-03-02 Thread Justin Pryzby
On Wed, Jan 19, 2022 at 06:18:09PM +0800, Julien Rouhaud wrote: > On Tue, Jan 04, 2022 at 03:55:50PM -0800, Andres Freund wrote: > > On 2022-01-01 18:21:06 +0100, Tomas Vondra wrote: > > > Here's an updated patch, rebased and fixing a couple typos reported by > > > Justin Pryzby directly. > > > >

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-03-02 Thread Robert Haas
On Wed, Mar 2, 2022 at 11:09 AM Tom Lane wrote: > Robert Haas writes: > > So the questions in my mind here are all > > about whether we can detect this stuff cheaply and whether anybody > > wants to do the work to make it happen, not whether we'd get a benefit > > in the cases where it kicks in.

Re: Commitfest 2022-03 Patch Triage Part 1a.i

2022-03-02 Thread Julien Rouhaud
On Wed, Mar 02, 2022 at 11:58:28AM -0500, Greg Stark wrote: > > But I'm unclear exactly what the consequences in the commitfest app > are of specific state changes. As I understand it there are basically > two alternatives: > > 1) Returned with feedback -- does this make it harder for an author to

Re: Commitfest 2022-03 Patch Triage Part 1a.i

2022-03-02 Thread Tom Lane
Greg Stark writes: > Do I have this right? What is the right state to put a patch in that > means "this patch doesn't need to be triaged again unless the author > actually feels progress has been made and needs new feedback or thinks > its committable"? But that's not really the goal, is it?

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread David Steele
On 3/2/22 11:04, Chapman Flack wrote: On 03/02/22 02:46, Michael Paquier wrote: system function marked as proretset while it builds and returns only one record. And this is a popular one: pg_stop_backup(), labelled v2. I had just recently noticed that while reviewing [0], but shrugged, as I

Re: Allow root ownership of client certificate key

2022-03-02 Thread David Steele
On 3/2/22 08:40, Tom Lane wrote: Chris Bandy writes: On 3/1/22 3:15 AM, Tom Lane wrote: Anyway, I'd be happier about back-patching if we could document actual requests to make it work like the server side does. PGO runs PostgreSQL 10 through 14 in Kubernetes, and we have to work around

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

2022-03-02 Thread Bharath Rupireddy
On Wed, Mar 2, 2022 at 8:12 PM Ashutosh Sharma wrote: > > Some review comments on v5 patch (v5-0001-pg_walinspect.patch) Thanks for reviewing. > +-- > +-- pg_get_wal_records_info() > +-- > +CREATE FUNCTION pg_get_wal_records_info(IN start_lsn pg_lsn, > +IN end_lsn pg_lsn, > +IN

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Chapman Flack
On 03/02/22 02:46, Michael Paquier wrote: > system function marked as proretset while it builds and returns only > one record. And this is a popular one: pg_stop_backup(), labelled > v2. I had just recently noticed that while reviewing [0], but shrugged, as I didn't know what the history was.

Re: Commitfest 2022-03 Patch Triage Part 1a.i

2022-03-02 Thread Greg Stark
On Wed, 2 Mar 2022 at 07:12, Daniel Gustafsson wrote: > Thanks for picking it up and continuing with recent developments. Let me know > if you want a hand in triaging patchsets. While I have the time there may be patches I may need help coming to the right conclusions about what actions to

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Julien Rouhaud
On Wed, Mar 02, 2022 at 05:40:00PM +0300, Aleksander Alekseev wrote: > Hi Tom. > > Yeah, there's plenty of precedent for that coding if you look around. > > I've not read the whole patch, but this snippet seems fine to me > > if there's also an #undef at the end of the function. > > No, there is

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-02 Thread Justin Pryzby
On Wed, Mar 02, 2022 at 06:43:11PM +0400, Pavel Borisov wrote: > Hi hackers! > > Hi! Here is the rebased version. The patch doesn't apply - I suppose the patch is relative a forked postgres which already has other patches. http://cfbot.cputube.org/pavel-borisov.html Note also that I mentioned

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Mar 2, 2022 at 10:54:27AM -0500, Stephen Frost wrote: > > It's our decision what we want to support and maintain in the code base > > and what we don't. Folks often ask for things that we don't or won't > > support and this isn't

Re: Handle infinite recursion in logical replication setup

2022-03-02 Thread vignesh C
On Tue, Mar 1, 2022 at 4:12 PM kuroda.hay...@fujitsu.com wrote: > > Hi Vignesh, > > > In logical replication, currently Walsender sends the data that is > > generated locally and the data that are replicated from other > > instances. This results in infinite recursion in circular logical > >

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-03-02 Thread Tom Lane
Robert Haas writes: > So the questions in my mind here are all > about whether we can detect this stuff cheaply and whether anybody > wants to do the work to make it happen, not whether we'd get a benefit > in the cases where it kicks in. Right, my worries are mostly about the first point.

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Bruce Momjian
On Wed, Mar 2, 2022 at 10:54:27AM -0500, Stephen Frost wrote: > It's our decision what we want to support and maintain in the code base > and what we don't. Folks often ask for things that we don't or won't > support and this isn't any different from that. We also remove things > on a rather

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Mar 2, 2022 at 10:29:45AM -0500, Stephen Frost wrote: > > We don't require SSL to be used with them..? Further, as already > > discussed on this thread, SSL only helps with on-the-wire, doesn't > > address the risk of a compromised

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-03-02 Thread Robert Haas
On Tue, Mar 1, 2022 at 9:05 PM Tom Lane wrote: > Robert Haas writes: > > I agree. My question is: why shouldn't every case where we can deduce > > an implied inequality be reasonably likely to show a benefit? > > Maybe it will be, if we can deal with the issue you already mentioned > about not

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Bruce Momjian
On Wed, Mar 2, 2022 at 10:29:45AM -0500, Stephen Frost wrote: > We don't require SSL to be used with them..? Further, as already > discussed on this thread, SSL only helps with on-the-wire, doesn't > address the risk of a compromised server. LDAP, in particular, is > terrible in this regard

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Jonathan S. Katz
On 3/2/22 10:30 AM, Stephen Frost wrote: Greetings, * Peter Eisentraut (peter.eisentr...@enterprisedb.com) wrote: On 02.03.22 15:16, Jonathan S. Katz wrote: I find that a lot of people are still purposely using md5.  Removing it now or in a year would be quite a disruption. What are the

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Joshua Brindle
On Wed, Mar 2, 2022 at 10:29 AM Stephen Frost wrote: > > Greetings, > > * Bruce Momjian (br...@momjian.us) wrote: > > On Wed, Mar 2, 2022 at 10:09:31AM -0500, Stephen Frost wrote: > > > I'm not sure that it's quite so simple. Perhaps we should also drop > > > LDAP and I don't really think PAM

Re: [PoC/RFC] Multiple passwords, interval expirations

2022-03-02 Thread Joshua Brindle
On Wed, Mar 2, 2022 at 9:58 AM Joshua Brindle wrote: > > This is not intended for PG15. > > Attached are a proof of concept patchset to implement multiple valid > passwords, which have independent expirations, set by a GUC or SQL > using an interval. > > postgres=# select * from

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@enterprisedb.com) wrote: > On 02.03.22 15:16, Jonathan S. Katz wrote: > >>I find that a lot of people are still purposely using md5.  Removing it > >>now or in a year would be quite a disruption. > > > >What are the reasons they are still purposely

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Mar 2, 2022 at 10:09:31AM -0500, Stephen Frost wrote: > > I'm not sure that it's quite so simple. Perhaps we should also drop > > LDAP and I don't really think PAM was ever terribly good for us to have, > > but at least PAM and

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Peter Eisentraut
On 02.03.22 15:16, Jonathan S. Katz wrote: I find that a lot of people are still purposely using md5.  Removing it now or in a year would be quite a disruption. What are the reasons they are still purposely using it? The ones I have seen/heard are: - Using an older driver - On a pre-v10

Re: Changing "Hot Standby" to "hot standby"

2022-03-02 Thread Daniel Westermann (DWE)
Hi Aleksander, > Pretty sure that for titles we should keep English capitalization rules. Done like that. Thanks for taking a look. Regards Danieldiff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index b5b6042104..08eb1ad946 100644 ---

Re: SQL/JSON: functions

2022-03-02 Thread Andrew Dunstan
On 3/1/22 16:41, Andrew Dunstan wrote: > On 2/1/22 14:11,I wrote: >> 2. The new GUC "sql_json" is a bit of a worry. I understand what it's >> trying to do, but I'm trying to convince myself it's not going to be a >> fruitful source of error reports, especially if people switch it in the >>

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Bruce Momjian
On Wed, Mar 2, 2022 at 10:09:31AM -0500, Stephen Frost wrote: > I'm not sure that it's quite so simple. Perhaps we should also drop > LDAP and I don't really think PAM was ever terribly good for us to have, > but at least PAM and RADIUS could possibly be used with OTP solutions > (and maybe

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Bruce Momjian (br...@momjian.us) wrote: > >> What is the logic to removing md5 but keeping 'password'? > > > I don't think we should keep 'password'. > > I don't see much point in that unless we deprecate *all* the

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Tom Lane
Stephen Frost writes: > * Bruce Momjian (br...@momjian.us) wrote: >> What is the logic to removing md5 but keeping 'password'? > I don't think we should keep 'password'. I don't see much point in that unless we deprecate *all* the auth methods that transmit a cleartext password.

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Tue, Mar 1, 2022 at 08:31:19AM -0500, Stephen Frost wrote: > > > The last time I played with this area is the recent error handling > > > improvement with cryptohashes but MD5 has actually helped here in > > > detecting the problem as a

Re: Proposal: Support custom authentication methods using hooks

2022-03-02 Thread Bruce Momjian
On Tue, Mar 1, 2022 at 08:31:19AM -0500, Stephen Frost wrote: > > The last time I played with this area is the recent error handling > > improvement with cryptohashes but MD5 has actually helped here in > > detecting the problem as a patched OpenSSL would complain if trying to > > use MD5 as hash

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-02 Thread Pavel Borisov
Hi hackers! Hi! Here is the rebased version. > I'd like to add a description of what was done in v9: - The patch is rebased on current master branch - In-memory tuple storage format was refactored as promised to have pre-calculated 64bit xmin and xmax, not just copies of pd_xid_base and

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

2022-03-02 Thread Ashutosh Sharma
Some review comments on v5 patch (v5-0001-pg_walinspect.patch) +-- +-- pg_get_wal_records_info() +-- +CREATE FUNCTION pg_get_wal_records_info(IN start_lsn pg_lsn, +IN end_lsn pg_lsn, +IN wait_for_wal boolean DEFAULT false, +OUT lsn pg_lsn, What does the wait_for_wal flag mean here

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Aleksander Alekseev
Hi Tom. Yeah, there's plenty of precedent for that coding if you look around. > I've not read the whole patch, but this snippet seems fine to me > if there's also an #undef at the end of the function. > No, there is no #undef. With #undef I don't mind it either. -- Best regards, Aleksander

Re: Allow root ownership of client certificate key

2022-03-02 Thread Tom Lane
Chris Bandy writes: > On 3/1/22 3:15 AM, Tom Lane wrote: >> Anyway, I'd be happier about back-patching if we could document >> actual requests to make it work like the server side does. > PGO runs PostgreSQL 10 through 14 in Kubernetes, and we have to work > around this issue when using

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 2, 2022 at 5:25 AM Aleksander Alekseev > wrote: >> Declaring a macro inside the procedure body is a bit unconventional. >> Since it doesn't seem to be used for anything except these two array >> declarations I suggest keeping simply "3" here. > I think we do

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-02 Thread Robert Haas
On Wed, Mar 2, 2022 at 5:25 AM Aleksander Alekseev wrote: > ``` > Datum > pg_stop_backup_v2(PG_FUNCTION_ARGS) > { > -ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo; > +#define PG_STOP_BACKUP_V2_COLS 3 > TupleDesctupdesc; > -Tuplestorestate *tupstore; > -

Re: PG DOCS - logical replication filtering

2022-03-02 Thread Peter Eisentraut
On 02.03.22 05:47, Peter Smith wrote: This patch introduces a new "Filtering" page to give a common place where all kinds of logical replication filtering can be described. (e.g. It is envisaged that a "Column Filters" section can be added sometime in the future). The pending feature to select

  1   2   >