Re: Incorrect comment in be-secure-openssl.c

2020-05-31 Thread Michael Paquier
On Fri, May 29, 2020 at 02:38:53PM +0900, Michael Paquier wrote: > Indeed, looks good to me. I'll go fix, ust let's wait and see first > if others have any comments. Actually, I was reading again the new sentence, and did not like its first part. Here is a rework that looks much better to me:

Proposal: remove string "contains errors; unaffected changes were applied"

2020-05-31 Thread Антон Пацев
Hello! When parameter cannot be changed without restarting the server postgresql write: "LOG: configuration file "/var/lib/postgresql/data/postgresql.auto.conf" contains errors; unaffected changes were applied" May be not write this string to LOG? This string confuses people. If all log send to

Re: Internal key management system

2020-05-31 Thread Fabien COELHO
Hello Masahiko-san, I am sharing here a document patch based on top of kms_v10 that was shared awhile back. This document patch aims to cover more design details of the current KMS design and to help people understand KMS better. Please let me know if you have any more comments. A few

A wrong index choose issue because of inaccurate statistics

2020-05-31 Thread Andy Fan
This thread is a follow-up of thread [1] where I don't have a good writing to describe the issue and solution in my mind. So I start this thread to fix that and also enrich the topic by taking the advices from Ashutosh, Tomas and Tom. Inaccurate statistics is not avoidable and can cause lots of

Re: Proposal: remove string "contains errors; unaffected changes were applied"

2020-05-31 Thread Justin Pryzby
On Sun, May 31, 2020 at 01:43:45PM +0600, Антон Пацев wrote: > Hello! > When parameter cannot be changed without restarting the server postgresql > write: > "LOG: configuration file "/var/lib/postgresql/data/postgresql.auto.conf" > contains errors; unaffected changes were applied" > May be not

Re: Compatible defaults for LEAD/LAG

2020-05-31 Thread Tom Lane
Vik Fearing writes: > postgres=# SELECT LAG(n, 1, -99) OVER (ORDER BY n) > postgres-# FROM (VALUES (1.1), (2.2), (3.3)) AS v (n) > postgres-# ORDER BY n; > ERROR: function lag(numeric, integer, integer) does not exist > LINE 1: SELECT LAG(n, 1, -99) OVER (ORDER BY n) >^

Re: Compatible defaults for LEAD/LAG

2020-05-31 Thread Vik Fearing
On 5/31/20 9:53 PM, Tom Lane wrote: > Vik Fearing writes: >> postgres=# SELECT LAG(n, 1, -99) OVER (ORDER BY n) >> postgres-# FROM (VALUES (1.1), (2.2), (3.3)) AS v (n) >> postgres-# ORDER BY n; >> ERROR: function lag(numeric, integer, integer) does not exist >> LINE 1: SELECT LAG(n,

Re: Incorrect comment in be-secure-openssl.c

2020-05-31 Thread Robert Haas
On Sun, May 31, 2020 at 2:54 AM Michael Paquier wrote: > On Fri, May 29, 2020 at 02:38:53PM +0900, Michael Paquier wrote: > > Indeed, looks good to me. I'll go fix, ust let's wait and see first > > if others have any comments. > > Actually, I was reading again the new sentence, and did not like

Re: archive status ".ready" files may be created too early

2020-05-31 Thread Bossart, Nathan
On 5/28/20, 11:42 PM, "matsumura@fujitsu.com" wrote: > I'm preparing a patch that backend inserting segment-crossboundary > WAL record leaves its EndRecPtr and someone flushing it checks > the EndRecPtr and notifies.. Thank you for sharing your thoughts. I will be happy to take a look at

Compatible defaults for LEAD/LAG

2020-05-31 Thread Vik Fearing
I noticed that the PostgreSQL entry in a pan-database feature matrix by Modern SQL was not reflecting the reality of our features.[1] It turns out that test case used by the author produced an error which the tool took to mean the feature was not implemented. I don't have the actual test, but

Re: Read access for pg_monitor to pg_replication_origin_status view

2020-05-31 Thread Martín Marqués
Hi Michael, > Wouldn't it be just better to remove this hardcoded superuser check > and replace it with equivalent ACLs by default? The trick is to make > sure that any function calling replorigin_check_prerequisites() has > its execution correctly revoked from public. See for example >

Re: Compatible defaults for LEAD/LAG

2020-05-31 Thread Vik Fearing
On 5/31/20 9:53 PM, Tom Lane wrote: > When the anycompatible patch went in, I thought for a little bit about > trying to use it with existing built-in functions, but didn't have the > time to investigate the issue in detail. I'm not in favor of hacking > things one-function-at-a-time here; we

Re: Default gucs for EXPLAIN

2020-05-31 Thread David Fetter
On Tue, May 26, 2020 at 02:49:46AM +, Nikolay Samokhvalov wrote: > On Mon, May 25, 2020 at 6:36 PM, Bruce Momjian < br...@momjian.us > wrote: > > I am not excited about this new feature. Why do it only for > > EXPLAIN? That is a log of GUCs. I can see this becoming a feature > > creep

Re: segmentation fault using currtid and partitioned tables

2020-05-31 Thread Michael Paquier
On Fri, May 29, 2020 at 03:48:40PM +0900, Michael Paquier wrote: > Okay, I have switched the patch to do that. Any comments or > objections? Applied this one then. I also got to check the ODBC driver in more details, and I am indeed not seeing those functions getting used. One extra thing to

Re: Compatible defaults for LEAD/LAG

2020-05-31 Thread Tom Lane
Vik Fearing writes: > On 5/31/20 9:53 PM, Tom Lane wrote: >> When the anycompatible patch went in, I thought for a little bit about >> trying to use it with existing built-in functions, but didn't have the >> time to investigate the issue in detail. I'm not in favor of hacking >> things

Re: segmentation fault using currtid and partitioned tables

2020-05-31 Thread Michael Paquier
On Mon, Jun 01, 2020 at 10:57:29AM +0900, Michael Paquier wrote: > Applied this one then. I also got to check the ODBC driver in more > details, and I am indeed not seeing those functions getting used. > One extra thing to know is that the ODBC driver requires libpq from at > least 9.2, which may

Re: segmentation fault using currtid and partitioned tables

2020-05-31 Thread Tom Lane
Michael Paquier writes: > Woah. This one is old, good catch from -DRELCACHE_FORCE_RELEASE. It > happens that since its introduction in a3519a2 from 2002, > currtid_for_view() in tid.c closes the view and then looks at a RTE > from it. I have reproduced the issue and the patch attached takes >

Re: Compatible defaults for LEAD/LAG

2020-05-31 Thread Pavel Stehule
po 1. 6. 2020 v 4:07 odesílatel Tom Lane napsal: > Vik Fearing writes: > > On 5/31/20 9:53 PM, Tom Lane wrote: > >> When the anycompatible patch went in, I thought for a little bit about > >> trying to use it with existing built-in functions, but didn't have the > >> time to investigate the

Re: segmentation fault using currtid and partitioned tables

2020-05-31 Thread Michael Paquier
On Sun, May 31, 2020 at 10:26:54PM -0400, Tom Lane wrote: > Ugh. Aside from the stale-pointer-deref problem, once we drop the lock > we can't even be sure the table still exists. +1 for back-patch. Thanks. Fixed down to 9.5 then to make prion happier. -- Michael signature.asc Description: