Re: PROXY protocol support

2022-02-25 Thread Magnus Hagander
On Tue, Nov 16, 2021 at 12:03 AM Jacob Champion wrote: > > On Thu, 2021-11-04 at 12:03 +0100, Magnus Hagander wrote: > > Thanks for the pointer, PFA a rebase. > > I think the Unix socket handling needs the same "success" fix that you > applied to the TCP socket hand

Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
ne of them would lead to a bit too much data. This can of course be reconsidered, but I think that's a reasonable tradeoff. Another option I guess could be to store the max/min/etc, but only store for the total jit time instead of for each individual one. Maybe that'd actually be more useful

Add parameter jit_warn_above_fraction

2022-02-25 Thread Magnus Hagander
bad estimates... -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 7ed8c82a9d..7c3bc56227 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -6592,6 +6592,21

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 2:33 PM Julien Rouhaud wrote: > > Hi, > > On Fri, Feb 25, 2022 at 02:06:29PM +0100, Magnus Hagander wrote: > > Here's a patch to add the sum of timings for JIT counters to > > pg_stat_statements, as a way to follow-up on if JIT is doing

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 4:40 PM Julien Rouhaud wrote: > > On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > > > So just to be clear, you're basically thinking: > > > > jit_count = count of entries where jit_functions>0 > > jit_f

Re: Add parameter jit_warn_above_fraction

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:20 PM Andres Freund wrote: > > Hi, > > On 2022-02-25 16:16:01 +0100, Magnus Hagander wrote: > > This patch adds a configuration parameter jit_warn_above_fraction that > > will cause a warning to be logged if the fraction of time spent on > >

Re: Expose JIT counters/timing in pg_stat_statements

2022-02-25 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 4:41 PM Magnus Hagander wrote: > > On Fri, Feb 25, 2022 at 4:40 PM Julien Rouhaud wrote: > > > > On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > > > > > So just to be clear, you're basically thinking: >

Re: Reducing power consumption on idle servers

2022-02-26 Thread Magnus Hagander
test version of the patch. Is there any actual use-case for this other than backwards compatibility? The alternative has certainly been around for some time now, so if we don't know a specific use-case for the file-based one it's definitely time to deprecate it properly. -- Mag

Re: Add parameter jit_warn_above_fraction

2022-03-07 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:47 PM Andres Freund wrote: > > Hi, > > On 2022-02-25 17:28:41 +0100, Magnus Hagander wrote: > > On Fri, Feb 25, 2022 at 5:20 PM Andres Freund wrote: > > > On 2022-02-25 16:16:01 +0100, Magnus Hagander wrote: > > > > Th

Re: Add parameter jit_warn_above_fraction

2022-03-07 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:23 PM Justin Pryzby wrote: > > On Fri, Feb 25, 2022 at 04:16:01PM +0100, Magnus Hagander wrote: > > + { > > + {"jit_warn_above_fraction", PGC_SUSET, LOGGING_WHEN, > > + gettext_noop("Sets the f

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:40 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On Fri, Feb 25, 2022 at 04:19:27PM +0100, Magnus Hagander wrote: > > On Fri, Feb 25, 2022 at 2:33 PM Julien Rouhaud wrote: > > > > > > Hi, > > > > > > On Fri

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Magnus Hagander
On Fri, Feb 25, 2022 at 5:43 PM Julien Rouhaud wrote: > > On Fri, Feb 25, 2022 at 05:38:45PM +0100, Magnus Hagander wrote: > > > > Per some off-list discussion with Julien, we have clearly been talking > > in slightly different terms. So let's summarize the options

Re: Add parameter jit_warn_above_fraction

2022-03-07 Thread Magnus Hagander
On Mon, Mar 7, 2022 at 2:09 PM Justin Pryzby wrote: > > On Mon, Mar 07, 2022 at 01:10:32PM +0100, Magnus Hagander wrote: > > On Fri, Feb 25, 2022 at 5:23 PM Justin Pryzby wrote: > > > > > > I think it should be a NOTICE (or less?) > > > > Hmm. I'

Re: New developer papercut - Makefile references INSTALL

2022-03-07 Thread Magnus Hagander
On Thu, Feb 10, 2022 at 12:52 AM Tom Lane wrote: (bringing this one back from the dead) > > Andres Freund writes: > > On 2022-02-09 22:32:59 +0100, Magnus Hagander wrote: > >> post-commit hooks don't run on the git server, they run locally on > >> your mach

Re: New developer papercut - Makefile references INSTALL

2022-03-07 Thread Magnus Hagander
On Mon, Mar 7, 2022 at 4:57 PM Tom Lane wrote: > > Magnus Hagander writes: > > If anything, I'm more behind the idea of just getting rid of the > > INSTALL file. A reference to the install instructions in the README > > should be enough today. The likelihood o

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

2022-03-09 Thread Magnus Hagander
o if they're complicated". And then design an API that's actually safe and easy to use *for that usecase*. For example, if the use case is "i want to use filesystemor SAN snapshots for my backups", we shouldn't try to write workarounds using bash coprocs or whatever. Instead, we could write a tool that interacts with the current api to start the backup, then launches a shellscript that interacts with the snapshot system, and then stops the backup after. With a well defined set of rules for how that shell script should work and interact. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: PROXY protocol support

2022-03-09 Thread Magnus Hagander
ction for multiple clients, you'd want something different, like a "priviliged mode in the tunnel" that the pooler can handle. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: New developer papercut - Makefile references INSTALL

2022-03-09 Thread Magnus Hagander
On Mon, Mar 7, 2022 at 11:51 PM Tom Lane wrote: > > Magnus Hagander writes: > > But taking a step back, who is the actual audience for this? Do we > > *need* a link pointing directly there, or is it enough to just point > > to "use the docs on the web"? We c

Re: Proposal: Support custom authentication methods using hooks

2022-03-09 Thread Magnus Hagander
e testing or examples that nobody in their right mind should use. Putting something security related there seems like a terrible idea on it's own, independent from shipping things that are known insecure. (yes, I know sepgsql it there. Which certainly doesn't help tell people if it's

Re: Estimating HugePages Requirements?

2022-03-14 Thread Magnus Hagander
vel/kernel-resources.html doesn't actually produce the output that the docs show, it also shows the log line, in the default config? If we can't fix the extra logging we should at least have our docs represent reality -- maybe by adding a "2>/dev/null" entry? But it'd be better to have it not output that log in the first place... (Of course what I'd really want is to be able to run it on a cluster that's running, but that was discussed downthread so I'm not bringing that one up for changes now) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Estimating HugePages Requirements?

2022-03-15 Thread Magnus Hagander
On Tue, Mar 15, 2022 at 3:41 AM Michael Paquier wrote: > > On Mon, Mar 14, 2022 at 10:34:17AM -0700, Nathan Bossart wrote: > > On Mon, Mar 14, 2022 at 04:26:43PM +0100, Magnus Hagander wrote: > >> And in fact, the command documented on > >> https://www.po

Re: Add session statistics to pg_stat_database

2020-12-01 Thread Magnus Hagander
On Fri, Nov 20, 2020 at 3:41 PM Laurenz Albe wrote: > On Tue, 2020-11-17 at 17:33 +0100, Magnus Hagander wrote: > > I've taken a look as well, and here are a few short notes: > > Much appreciated! > Sorry about the delay in getting back to you on this one. FYI, while th

Re: Change default of checkpoint_completion_target

2020-12-08 Thread Magnus Hagander
s nonzero performance, documentation, and maintenance > overhead. > +1. There are plenty of cases I think where it doesn't really matter with the values, but when it does I'm not sure what it would be where something else would actually be better. -- Magnus Hagander Me: htt

Re: Add session statistics to pg_stat_database

2020-12-13 Thread Magnus Hagander
ect) + msg.m_disconnect = pgStatSessionEndCause; in the non-disconnect state, that variable is left uninitialized, isn't it? It does end up getting ignored later, but to be more future proof the enum should probably have a value specifically for "not disconnected yet"? + case DISCONN

Re: REINDEX backend filtering

2020-12-15 Thread Magnus Hagander
ly a common enough operation that we need it i the main grammar? Having the functionality, definitely, but what if it was "just" a function instead? So you'd do something like: SELECT 'reindex index ' || i FROM pg_blah(some, arguments, here) \gexec Or even a function that returns the REINDEX commands directly (taking a parameter to turn on/off concurrency for example). That also seems like it would be easier to make flexible, and just as easy to plug into reindexdb? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Commit fest manager for 2021-01

2020-12-20 Thread Magnus Hagander
accounts. If you haven't been one before (which I think?), please let me know what username your account in the system has, and I will make sure you get the required permissions- -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Commit fest manager for 2021-01

2020-12-21 Thread Magnus Hagander
On Sun, Dec 20, 2020 at 10:57 PM Masahiko Sawada wrote: > > On Sun, Dec 20, 2020 at 10:27 PM Magnus Hagander wrote: > > > > On Sat, Dec 19, 2020 at 6:00 AM Michael Paquier wrote: > > > > > > On Sat, Dec 19, 2020 at 10:03:47AM +0530, Amit Kapila wrote: >

Re: BUG #16079: Question Regarding the BUG #16064

2020-12-21 Thread Magnus Hagander
IIRC we've discussed having a parameter that says "allowed authentication methods" on the client as well, but I don't believe it has been built. But it wouldn't be bad to be able to for example force the client to only attempt gssapi auth, regardless of what the server asks for, and just fail if it's not there. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: BUG #16079: Question Regarding the BUG #16064

2020-12-21 Thread Magnus Hagander
On Mon, Dec 21, 2020 at 8:06 PM Stephen Frost wrote: > > Greetings, > > * Magnus Hagander (mag...@hagander.net) wrote: > > On Mon, Dec 21, 2020 at 7:44 PM Tom Lane wrote: > > > BTW, do we have a client-side setting to insist that passwords not be > > > sent

Re: Better client reporting for "immediate stop" shutdowns

2020-12-22 Thread Magnus Hagander
onnection due to immediate shutdown request"))); > ? There are other places where errmsg("terminating connection due to > reasons"); is used. We also log messages when an immediate > shutdown request is received errmsg("received immediate shutdown > request"). +1. I definitely think having this message be different can be useful. See also the thread about tracking shutdown reasons (connection statistics) -- not the same thing, but the same concepts apply. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Commit fest manager for 2021-01

2020-12-25 Thread Magnus Hagander
ermissions required :/ One should add both the "can have some permissions at all" and the "member of the admins group". I only did the second part :) Fixed now, sorry about that! -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

Re: doc review for v14

2020-12-28 Thread Magnus Hagander
he fix all the way :) You may also want to submit those fixes upstream in freebsd? The typos seem to be present at https://github.com/freebsd/freebsd/tree/master/usr.bin/indent as well. (If so, please include the updated version that I applied, so we don't diverge on that) -- Magnus

Re: doc review for v14

2020-12-29 Thread Magnus Hagander
On Tue, Dec 29, 2020 at 1:37 AM Michael Paquier wrote: > On Mon, Dec 28, 2020 at 11:42:03AM +0100, Magnus Hagander wrote: > > Not as much "tightly controlled" as "nobody's really bothered to grant > any > > permissions". > > Magnus, do I have

Re: Let people set host(no)ssl settings from initdb

2021-01-01 Thread Magnus Hagander
t can trivially be changed to become insecure. And unfortunately due to the complexity of pg_hba, that can easily happen. Keeping it under configuration management helps with that, but doesn't entirely solve the problem. Another possible approach could be to add global gucs for "allow_unencrypted_connections" and maybe "available_authentication_methods". That would override pg_hba. At least in doing so, there would be *one* spot where one could fairly strictly lock things down. (Similar to Peters suggestion upthread) -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)

2021-01-06 Thread Magnus Hagander
m *on* again, that's a very slow offline operation at this time. Turning off checksums doesn't take noticeably more time than say changing the shared_buffers from the default, which is also almost guaranteed to be wrong for most installations. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)

2021-01-06 Thread Magnus Hagander
On Wed, Jan 6, 2021 at 6:58 PM Andres Freund wrote: > > Hi, > > On 2021-01-06 18:27:48 +0100, Magnus Hagander wrote: > > The other argument is that admins can cheaply and quickly turn off > > checksums if they don't want them. > > > > The same cannot be s

Re: Online checksums patch - once again

2021-01-07 Thread Magnus Hagander
+ the checksum protection in order to recover data. To do this, > >> temporarily > >> + set the configuration parameter >> linkend="guc-ignore-checksum-failure" />. > >> + > > > > I think the above is rather informative about checksums in

Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)

2021-01-08 Thread Magnus Hagander
people can more > easily test the overhead on their workloads. Yeah, definitely. If they have equivalent hardware they can easily do it now -- create a replica, turn off checksums on replica, compare. That is, assuming we turn them on by default :) But being able to turn them both on and off without a large downtime is obviously going to make experimentation a lot more reasonable. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Disallow SSL compression?

2021-02-22 Thread Magnus Hagander
people just upgrade libpq, though. And document it as such having no effect and "will eventually be removed". -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: REINDEX backend filtering

2021-02-26 Thread Magnus Hagander
On Wed, Dec 16, 2020 at 1:27 AM Michael Paquier wrote: > > On Tue, Dec 15, 2020 at 06:34:16PM +0100, Magnus Hagander wrote: > > Is this really a common enough operation that we need it in the main > > grammar? > > > > Having the functionality, definitely, but what i

Re: REINDEX backend filtering

2021-02-26 Thread Magnus Hagander
On Thu, Jan 21, 2021 at 4:13 AM Julien Rouhaud wrote: > > On Wed, Dec 16, 2020 at 8:27 AM Michael Paquier wrote: > > > > On Tue, Dec 15, 2020 at 06:34:16PM +0100, Magnus Hagander wrote: > > > Is this really a common enough operation that we need it in the main > &

Re: Disallow SSL compression?

2021-02-26 Thread Magnus Hagander
On Mon, Feb 22, 2021 at 12:28 PM Daniel Gustafsson wrote: > > > On 22 Feb 2021, at 11:52, Magnus Hagander wrote: > > > > On Thu, Feb 18, 2021 at 1:51 PM Daniel Gustafsson wrote: > >> > >> A few years ago we discussed whether to disable SSL compression [0]

Re: REINDEX backend filtering

2021-02-26 Thread Magnus Hagander
On Fri, Feb 26, 2021 at 11:07 AM Julien Rouhaud wrote: > > On Fri, Feb 26, 2021 at 5:50 PM Magnus Hagander wrote: > > > > I don't agree with the conclusion though. > > > > The most common case of that will be in the case of an upgrade. In > > that case

Re: We should stop telling users to "vacuum that database in single-user mode"

2021-03-02 Thread Magnus Hagander
thwhile throwing a WARNING if vacuum is run with cost delay enabled in single user mode -- so that the user is at least aware of the choice (and can cancel and try again). Maybe even a warning directly when starting up a single user session, to let them know? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

PROXY protocol support

2021-03-02 Thread Magnus Hagander
it's only available as a log message. But maybe it should go in pg_stat_activity as well? Or in a separate pg_stat_proxy view? (In passing, I note that pq_discardbytes were in pqcomm.h, yet listed as static in pqcomm.c -- but now made non-static) -- Magnus Hagander Me: https://www.haga

Re: 2019-03 CF now in progress

2021-03-02 Thread Magnus Hagander
7;t find > it in the admin interface) so hopefully Michael or Magnus can do it. Done. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: We should stop telling users to "vacuum that database in single-user mode"

2021-03-03 Thread Magnus Hagander
On Tue, Mar 2, 2021 at 10:07 PM David Rowley wrote: > > On Wed, 3 Mar 2021 at 01:12, Magnus Hagander wrote: > > > > On Tue, Mar 2, 2021 at 7:52 AM David Rowley wrote: > > > I have seen it happen that an instance has a vacuum_cost_limit set and > > > someone d

Re: PROXY protocol support

2021-03-03 Thread Magnus Hagander
On Wed, Mar 3, 2021 at 1:50 AM Jacob Champion wrote: > > On Tue, 2021-03-02 at 18:43 +0100, Magnus Hagander wrote: > > PFA a simple patch that implements support for the PROXY protocol. > > I'm not all the way through the patch yet, but this part jumped out at >

Re: PROXY protocol support

2021-03-03 Thread Magnus Hagander
On Wed, Mar 3, 2021 at 10:00 AM Magnus Hagander wrote: > > On Wed, Mar 3, 2021 at 1:50 AM Jacob Champion wrote: > > > > On Tue, 2021-03-02 at 18:43 +0100, Magnus Hagander wrote: > > > PFA a simple patch that implements support for the PROXY protocol. > > > >

Re: CI/windows docker vs "am a service" autodetection on windows

2021-03-04 Thread Magnus Hagander
re aren't that many such paths, but there are some. Just throwing out ideas without spending time thinking about it, maybe log to *both* in the case when we pick by it by autodetection? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: CI/windows docker vs "am a service" autodetection on windows

2021-03-04 Thread Magnus Hagander
On Thu, Mar 4, 2021 at 9:30 PM Andres Freund wrote: > > Hi, > > On 2021-03-04 21:08:30 +0100, Magnus Hagander wrote: > > The problem with doing it at register time is that everybody who > > builds an installer for PostgreSQL will then have to do it in their > > own

Re: PROXY protocol support

2021-03-04 Thread Magnus Hagander
is there, definitely doesn't replace it. It should equally be wrapping whatever an extension uses. So while the base topic is not unrelated, I don't think there is any overlap between these. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: PROXY protocol support

2021-03-04 Thread Magnus Hagander
On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion wrote: > > On Wed, 2021-03-03 at 10:39 +0100, Magnus Hagander wrote: > > On Wed, Mar 3, 2021 at 10:00 AM Magnus Hagander wrote: > > > Another option would of course be to listen on a separate port for it, > > > whic

Re: PROXY protocol support

2021-03-04 Thread Magnus Hagander
thout making haproxy a dependency to run the tests :) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: PROXY protocol support

2021-03-04 Thread Magnus Hagander
On Thu, Mar 4, 2021 at 10:01 PM Jan Wieck wrote: > > On 3/4/21 3:40 PM, Magnus Hagander wrote: > > On Thu, Mar 4, 2021 at 9:29 PM Jan Wieck wrote: > >> This looks like it would only need a few extra protocol messages to be > >> understood by the backend. It might

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
. I'd definitely like to see that one solved as well, but let's look at it on a different thread so we don't derail this one. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 1:33 AM Álvaro Hernández wrote: > > > > On 5/3/21 0:21, Jacob Champion wrote: > > On Thu, 2021-03-04 at 21:45 +0100, Magnus Hagander wrote: > >> On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion wrote: > >>> Idle thought I had while set

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
hink it would > be better to be mentioned in the docs. It's definitely not HAProxy specific, it's more or less an industry standard. It's just maintained by them. That said, yes, it should be referenced in the docs. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 12:21 AM Jacob Champion wrote: > > On Thu, 2021-03-04 at 21:45 +0100, Magnus Hagander wrote: > > On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion wrote: > > > Idle thought I had while setting up a local test rig: Are there any > > > compelling ca

Re: Disallow SSL compression?

2021-03-05 Thread Magnus Hagander
> > > > Attached is a version which removes that as well. > > Peter, Magnus, any comments about this point? We've broken stats views before. While it'd be nice if we could group multiple breakages at the same time, I don't think it's that important. Better to g

Re: PROXY protocol support

2021-03-06 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 8:11 PM Jacob Champion wrote: > > On Fri, 2021-03-05 at 10:22 +0100, Magnus Hagander wrote: > > On Fri, Mar 5, 2021 at 12:21 AM Jacob Champion wrote: > > > The original-host logging isn't working for me: > > > > > > [...] >

Re: PROXY protocol support

2021-03-06 Thread Magnus Hagander
On Sat, Mar 6, 2021 at 4:17 PM Magnus Hagander wrote: > > On Fri, Mar 5, 2021 at 8:11 PM Jacob Champion wrote: > > > > On Fri, 2021-03-05 at 10:22 +0100, Magnus Hagander wrote: > > > On Fri, Mar 5, 2021 at 12:21 AM Jacob Champion > > > wrote: > > >

Re: [patch] [doc] Introduce view updating options more succinctly

2021-03-06 Thread Magnus Hagander
've applied it now. Thanks, David! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: A new function to wait for the backend exit after termination

2021-03-06 Thread Magnus Hagander
*gone*, which I think is a very strange definition of "success". In fact, isn't pg_wait_backend() is a pretty bad name for a function that does this? Maybe pg_wait_for_backend_termination()? (the internal function has a name that more matches what it does, but the SQL funct

Re: [Doc Patch] Clarify that CREATEROLE roles can GRANT default roles

2021-03-06 Thread Magnus Hagander
> attached patch. > > > > > > Took look at the wording and +1 from me on the proposed change. FWIW, > I believe the preceding sentence would be more grammatically correct > if the word "which" was replaced with "that", ie. PostgreSQL provides > a set of d

Re: Proposal: Save user's original authenticated identity for logging

2021-03-06 Thread Magnus Hagander
g of, well, the same thing. Same goes for peer_user? In fact, if we're storing it in the Port, why are we even passing it as a separate parameter to check_usermap -- shouldn't that one always use this same value? ISTM that it could be quite confusing if the logged value is different

Re: pg_stat_statements oddity with track = all

2021-03-06 Thread Magnus Hagander
at? Maybe by looking up the entry with the flag set to the other value, and then reusing that? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-07 Thread Magnus Hagander
n whether the consistent > state is reached or not, and the followings would be necessary to implement > that. This looks a bit overkill to me against the purpose, at least for me. Agreed. If hot standby is off, why would the admin care about whether it's consistent yet or not? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: pg_upgrade failing for 200+ million Large Objects

2021-03-08 Thread Magnus Hagander
e objects that would be a billion statements, and thus a billion xids. And without checking, I'm fairly sure it doesn't load in a single transaction... -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: pg_upgrade failing for 200+ million Large Objects

2021-03-08 Thread Magnus Hagander
On Mon, Mar 8, 2021 at 5:33 PM Tom Lane wrote: > > Robins Tharakan writes: > > On Mon, 8 Mar 2021 at 23:34, Magnus Hagander wrote: > >> Without looking, I would guess it's the schema reload using > >> pg_dump/pg_restore and not actually pg_upgrade itself. Th

Re: pg_stat_statements oddity with track = all

2021-03-08 Thread Magnus Hagander
On Sun, Mar 7, 2021 at 8:39 AM Julien Rouhaud wrote: > > On Sat, Mar 06, 2021 at 06:56:49PM +0100, Magnus Hagander wrote: > > On Sun, Dec 27, 2020 at 9:39 AM Julien Rouhaud wrote: > > > > > - * > > - * Right now, this structure contains no padding. If you a

Re: pg_upgrade failing for 200+ million Large Objects

2021-03-08 Thread Magnus Hagander
On Mon, Mar 8, 2021 at 5:58 PM Tom Lane wrote: > > Magnus Hagander writes: > > On Mon, Mar 8, 2021 at 5:33 PM Tom Lane wrote: > >> It does seem that --single-transaction is a better idea than fiddling with > >> the transaction wraparound parameters, since the la

Re: PROXY protocol support

2021-03-09 Thread Magnus Hagander
On Sat, Mar 6, 2021 at 5:30 PM Magnus Hagander wrote: > > On Sat, Mar 6, 2021 at 4:17 PM Magnus Hagander wrote: > > > > On Fri, Mar 5, 2021 at 8:11 PM Jacob Champion wrote: > > > > > > On Fri, 2021-03-05 at 10:22 +0100, Magnus Hagander wrote: > >

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-09 Thread Magnus Hagander
On Tue, Mar 9, 2021 at 3:07 PM Alvaro Herrera wrote: > > On 2021-Mar-09, James Coleman wrote: > > > On Tue, Mar 9, 2021 at 8:47 AM Alvaro Herrera > > wrote: > > > > > > On 2021-Mar-07, Magnus Hagander wrote: > > > > > > >

Re: shared-memory based stats collector

2021-03-13 Thread Magnus Hagander
src/backend/utils/activity/stats.c - for the stats keeping > infrastructure (shared memory hash table, pending table, etc) > - src/backend/utils/activity/stats_report.c - for pgstat_report_*, > pgstat_count_*, pgstat_update_*, flush_*, i.e. everything that knows > about specific kinds of stats. > > The reason for that split is that imo the two pieces of code are largely > independent. One shouldn't need to understand the way stats are stored > in any sort of detail to add a new stats field and vice versa. Agreed as well. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Permission failures with WAL files in 13~ on Windows

2021-03-16 Thread Magnus Hagander
out for the bug reporters to test out, given they all seem to have it fairly well reproducible. (But I am assuming are unlikely to be able to create their own builds easily, given the complexity of doing so on Windows). Given that this is a pretty isolated change, it should hopefully be easy enough to back out for testing. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Permission failures with WAL files in 13~ on Windows

2021-03-16 Thread Magnus Hagander
On Tue, Mar 16, 2021 at 11:22 AM Michael Paquier wrote: > > On Tue, Mar 16, 2021 at 10:02:25AM +0100, Magnus Hagander wrote: > > If you back out that patch, does the problem you can reproduce with > > archive_command go away? > > That's the first thing I did after

Re: pg_stat_statements oddity with track = all

2021-03-16 Thread Magnus Hagander
On Tue, Mar 9, 2021 at 3:39 AM Julien Rouhaud wrote: > > On Mon, Mar 08, 2021 at 06:03:59PM +0100, Magnus Hagander wrote: > > On Sun, Mar 7, 2021 at 8:39 AM Julien Rouhaud wrote: > > > > > > Yes I was a bit worried about the possible extra text entry. I kept >

Re: A new function to wait for the backend exit after termination

2021-03-16 Thread Magnus Hagander
not just in the header (which was adjusted per Fujii's comment) + (errmsg("could not wait for the termination of the backend with PID %d within %lld milliseconds", That's not true though? The wait succeeded, it just timed out? Isn't itm ore like "backend with PID %d did not terminate within %lld milliseconds"? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: [PATCH] remove deprecated v8.2 containment operators

2020-10-27 Thread Magnus Hagander
ine for removing them now is good. > IIRC it was to align things so that "containment" had the same operator for all different kinds of datatypes? But whether that memory is right nor not it was indeed a long time ago, so +1 that it's definitely time to get rid of them. --

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-10-27 Thread Magnus Hagander
On Tue, Oct 27, 2020 at 11:53 AM Bruce Momjian wrote: > On Tue, Oct 27, 2020 at 11:35:25AM +0100, Peter Eisentraut wrote: > > On 2020-10-06 12:26, Magnus Hagander wrote: > > > I went with the name --no-instructions to have the same name for both > > > initdb and pg_up

Re: cutting down the TODO list thread

2020-10-28 Thread Magnus Hagander
g the items? That >> should help to prevent the same exact items from appearing on the list >> again, which they eventually would, I believe. > > > +1 A small technical detail on the topic but if doing that, let's not mark them as that inline -- create a separate page with those items on it. -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: cutting down the TODO list thread

2020-10-28 Thread Magnus Hagander
On Wed, Oct 28, 2020 at 3:35 PM Julien Rouhaud wrote: > > On Wed, Oct 28, 2020 at 9:27 PM John Naylor > wrote: > > > > On Wed, Oct 28, 2020 at 6:52 AM Magnus Hagander wrote: > >> > >> On Wed, Oct 28, 2020 at 11:15 AM Julien Rouhaud wrote: > >&g

-O switch

2020-10-29 Thread Magnus Hagander
postgres --help: -o OPTIONS pass "OPTIONS" to each server process (obsolete) This was marked obsolete in 2006 (86c23a6eb28). Is it perhaps time to get rid of it? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: -O switch

2020-10-29 Thread Magnus Hagander
On Thu, Oct 29, 2020 at 4:45 PM Tom Lane wrote: > > Magnus Hagander writes: > > postgres --help: > > -o OPTIONS pass "OPTIONS" to each server process (obsolete) > > > This was marked obsolete in 2006 (86c23a6eb28). > > I don't think it

Re: pg_upgrade analyze script

2020-11-02 Thread Magnus Hagander
On Fri, Oct 30, 2020 at 5:10 PM Georgios Kokolatos wrote: > > Hi, > > thank you for you contribution. > > I did notice that the cfbot [1] is failing for this patch. > Please try to address the issues for the upcoming Commitfest. Thanks for the notice -- PFA a rebased

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2020-11-02 Thread Magnus Hagander
On Tue, Oct 27, 2020 at 12:40 PM Bruce Momjian wrote: > > On Tue, Oct 27, 2020 at 12:35:56PM +0100, Peter Eisentraut wrote: > > On 2020-10-27 11:53, Bruce Momjian wrote: > > > On Tue, Oct 27, 2020 at 11:35:25AM +0100, Peter Eisentraut wrote: > > > > On 2020-1

Re: -O switch

2020-11-02 Thread Magnus Hagander
On Thu, Oct 29, 2020 at 5:25 PM Tom Lane wrote: > > Magnus Hagander writes: > > On Thu, Oct 29, 2020 at 4:45 PM Tom Lane wrote: > >> I don't think it's really obsolete ... don't we use that to pass > >> PGOPTIONS through from the client?

Re: [patch] [doc] Clarify temporary table name shadowing in CREATE TABLE

2020-11-02 Thread Magnus Hagander
On Wed, Oct 21, 2020 at 5:29 PM David G. Johnston wrote: > > Hackers, > > Moving this over from -general [1] Applied, thanks! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: contrib/sslinfo cleanup and OpenSSL errorhandling

2020-11-02 Thread Magnus Hagander
ssing previously as well. I'll go apply that fix to the back branches while waiting to see if somebody comes up with a more creative way to avoid the repeated code :) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Disable WAL logging to speed up data loading

2020-11-02 Thread Magnus Hagander
tain set of flags can do permanent damage which is not necessarily fixed by changing it back and restarting. This would also be something that should be exposed as monitoring points (which it could be if it's in pg_control). That is, I can imagine a *lot* of installations that would definite

Re: Online checksums verification in the backend

2020-11-03 Thread Magnus Hagander
ere could usefully be enabling > > functions in core. > > I'm not really convinced by this though. It's not really AM > specific - works for all types of relations with storage; don't really > object either... Yeah, I'm not sure about that one either. Also what would hap

Re: contrib/sslinfo cleanup and OpenSSL errorhandling

2020-11-03 Thread Magnus Hagander
On Mon, Nov 2, 2020 at 3:19 PM Magnus Hagander wrote: > > On Fri, Oct 30, 2020 at 11:20 PM Daniel Gustafsson wrote: > > > > > On 30 Oct 2020, at 00:40, Andres Freund wrote: > > > > > There's quite a few copies of this code that look exactly the same, &

Re: Move OpenSSL random under USE_OPENSSL_RANDOM

2020-11-03 Thread Magnus Hagander
nitialize() or something which would have an implementation in pg_strong_random.c, thereby isolating the openssl specific code in there? (And with a void implementation without openssl) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: Prefer TG_TABLE_NAME over TG_RELNAME in tests

2020-11-03 Thread Magnus Hagander
patch in itself of course. But it might be worth reaching out to some of those projects and notifying them they're using the deprecated ones.. Thus, pushed. Thanks! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/

Re: -O switch

2020-11-03 Thread Magnus Hagander
On Mon, Nov 2, 2020 at 6:58 PM Tom Lane wrote: > > Magnus Hagander writes: > > PFA a patch to do this. > > One thing you missed is that the getopt() calls in both postmaster.c > and postgres.c have 'o:' entries that should be removed. Also IIRC > there is a &q

Re: contrib/sslinfo cleanup and OpenSSL errorhandling

2020-11-03 Thread Magnus Hagander
On Tue, Nov 3, 2020 at 10:22 AM Daniel Gustafsson wrote: > > > On 3 Nov 2020, at 10:05, Magnus Hagander wrote: > > > Applied, with the small adjustment of the comma in the docs. > > Thanks! > > > I wonder if we should perhaps backpatch 0002? The changes to sslinf

Re: Move OpenSSL random under USE_OPENSSL_RANDOM

2020-11-03 Thread Magnus Hagander
On Tue, Nov 3, 2020 at 1:00 PM Daniel Gustafsson wrote: > > > On 3 Nov 2020, at 11:35, Michael Paquier wrote: > > > > On Tue, Nov 03, 2020 at 10:15:48AM +0100, Magnus Hagander wrote: > >> On Wed, Aug 26, 2020 at 2:19 PM Daniel Gustafsson wrote: > >>> Th

Re: language cleanups in code and docs

2020-11-03 Thread Magnus Hagander
On Wed, Oct 21, 2020 at 11:23 PM Thomas Munro wrote: > > On Wed, Jun 17, 2020 at 10:32 PM Magnus Hagander wrote: > > In looking at this I realize we also have exactly one thing referred to as > > "blacklist" in our codebase, which is the "enum blacklist" (a

Re: Move OpenSSL random under USE_OPENSSL_RANDOM

2020-11-04 Thread Magnus Hagander
On Wed, Nov 4, 2020 at 2:01 AM Michael Paquier wrote: > > On Tue, Nov 03, 2020 at 01:46:38PM +0100, Magnus Hagander wrote: > > On Tue, Nov 3, 2020 at 1:00 PM Daniel Gustafsson wrote: > >> I kind of like the idea of continuing to abstract this functionality, not > >>

  1   2   3   4   5   6   7   8   9   10   >