Fallout from PQhost() semantics changes

2018-08-02 Thread Tom Lane
Traditionally (prior to v10), PQhost() returned the "host" connection parameter if that was nonempty, otherwise the default host name (DEFAULT_PGSOCKET_DIR or "localhost" depending on platform). That got whacked around to a state of brokenness in v10 (which I'll return to in a bit), and then

Re: Should contrib modules install .h files?

2018-08-02 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> My impression is that there was consensus for per-extension > Tom> subdirectories, but the usage scenario isn't totally designed yet. > Tom> In principle, only the layout question has to be resolved to make > Tom> it OK to ship this in

Re: Allow COPY's 'text' format to output a header

2018-08-02 Thread Cynthia Shang
> On Aug 2, 2018, at 8:11 AM, Daniel Verite wrote: > > That makes sense, thanks for elaborating, although there are also > a fair number of ERRCODE_FEATURE_NOT_SUPPORTED in copy.c > that are raised on forbidden/nonsensical combination of features, > so the consistency argument could work both

Re: Should contrib modules install .h files?

2018-08-02 Thread Andres Freund
On 2018-08-02 10:54:00 -0400, Tom Lane wrote: > Also, "near future" means "before Monday". I don't want to ship beta3 > with this in place if we end up reverting later, because it'd mean > thrashing packagers' file manifests, which they won't appreciate. > It might be best to revert in v11 for

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Andres" == Andres Freund writes: >> Also, "near future" means "before Monday". I don't want to ship >> beta3 with this in place if we end up reverting later, because it'd >> mean thrashing packagers' file manifests, which they won't >> appreciate. It might be best to revert in v11 for

Re: doc - add missing documentation for "acldefault"

2018-08-02 Thread Fabien COELHO
Hello Pavel, I couldn't find the documentation. Attached patch adds one. Probably this function should have been named pg_*. Too late. I think this is intentionally hidden function, like others started with acl*. Yep, I thought of that. However, the point of having hidden and/or

Re: Making "COPY partitioned_table FROM" faster

2018-08-02 Thread Peter Eisentraut
On 02/08/2018 01:36, David Rowley wrote: > On 31 July 2018 at 11:51, David Rowley wrote: >> The attached v6 delta replaces the v5 delta and should be applied on >> top of the full v4 patch. > > (now committed) > > Many thanks for committing this Peter and many thanks to Melanie and > Karen for

Re: Should contrib modules install .h files?

2018-08-02 Thread Andres Freund
On 2018-08-02 17:53:17 +0100, Andrew Gierth wrote: > > "Andres" == Andres Freund writes: > > >> Also, "near future" means "before Monday". I don't want to ship > >> beta3 with this in place if we end up reverting later, because it'd > >> mean thrashing packagers' file manifests, which

Re: FailedAssertion on partprune

2018-08-02 Thread Robert Haas
On Thu, Aug 2, 2018 at 1:54 PM, Tom Lane wrote: > (EXPLAIN isn't a very adequate tool for testing this, since > it fails to show anything about what pruning tests are attached to an > Append. I wonder if we need to create something that does show that.) I've asked for that more than once and

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> Maybe this all just works without much thought, but given that Tom> smart people like Peter E. seem to be unsure of that, I'd sure Tom> like to see a concrete set of rules that extensions should follow Tom> for this. I'll comment on the more substantive

Re: [HACKERS] logical decoding of two-phase transactions

2018-08-02 Thread Nikhil Sontakke
>> They can be, but currently they might not be. So this requires at least >> big fat warning in docs and description on how to access user catalogs >> from plugins correctly (ie to always use systable_* API on them). It >> would be nice if we could check for it in Assert builds at least. > Ok,

Re: doc - add missing documentation for "acldefault"

2018-08-02 Thread Pavel Luzanov
Hello Fabien, However, the point of having hidden and/or undocumented functions fails me: they are hard/impossible to find if you do not know they exist from the start, and if you ever find one you do not know what they do without reading the source code in detail, eg to know what to give

Re: Explain buffers wrong counter with parallel plans

2018-08-02 Thread Robert Haas
On Thu, Aug 2, 2018 at 5:41 AM, Amit Kapila wrote: > I have created three patches (a) move InstrStartParallelQuery from its > original location so that we perform it just before ExecutorRun (b) > patch to fix the gather stats by calling shutdown at appropriate place > and allow stats collection

Re: [HACKERS] Bug in to_timestamp().

2018-08-02 Thread Alexander Korotkov
On Wed, Aug 1, 2018 at 3:17 PM Arthur Zakirov wrote: > On Mon, Jul 23, 2018 at 05:21:43PM +0300, Alexander Korotkov wrote: > > Thank you, Arthur. These examples shows downside of this patch, where > > users may be faced with incompatibility. But it's good that this > > situation can be handled

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> It seems like there were two separate areas of Tom> disagreement/questioning, one being the file layout (whether to Tom> add per-extension subdirectories) and then one about how one would Tom> actually use this, ie what would the -I switch(es) look like

Re: Should contrib modules install .h files?

2018-08-02 Thread Robert Haas
On Thu, Aug 2, 2018 at 12:56 PM, Andres Freund wrote: >> On the other hand, _I'm_ getting pressure from at least one packager to >> nail down a final release of pllua-ng so they can build it along with >> beta3 (in place of the old broken pllua), which obviously I can't do if >> I keep having to

Re: FailedAssertion on partprune

2018-08-02 Thread Tom Lane
[ bringing this discussion back to the original thread ] David Rowley writes: > The attached patch removes the Assert, but I think it should be > probably be done as part of [1]'s patch since that's also adding the > code to handle subplans for tables that don't belong in the partition >

Re: [HACKERS] Bug in to_timestamp().

2018-08-02 Thread Alexander Korotkov
On Thu, Aug 2, 2018 at 6:17 PM Alexander Korotkov wrote: > After some experiments I found that when you mix spaces and separators > between two fields, then Oracle takes into account only length of last > group of spaces/separators. > > # SELECT to_timestamp('2018- -01 02', ' ---

Re: Should contrib modules install .h files?

2018-08-02 Thread Tom Lane
Andres Freund writes: > On 2018-08-02 19:13:05 +0100, Andrew Gierth wrote: >> And none of the plpython transforms can even parse their makefiles with >> USE_PGXS, let alone build, because they have an "include" directive >> pointing into src/pl/plpython. > FWIW, I'd be perfectly on board with

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: Tom> There's also a question of whether we need to change anything in Tom> contrib/ so that it plays by whatever rules we set. There's an Tom> expectation that contrib modules should be buildable with PGXS, Tom> so they need to follow the rules.

Re: Problem during Windows service start

2018-08-02 Thread Laurenz Albe
Sakai, Teppei wrote: > This is my first posting to the mailing list. > > Currently our customer uses PostgreSQL 9.5 and hits problem during Windows > service start. > The Windows service status of the instance is different from actual status. > > We got the following situation. > 1. Register

Re: Should contrib modules install .h files?

2018-08-02 Thread Andres Freund
On 2018-08-02 19:13:05 +0100, Andrew Gierth wrote: > > "Andrew" == Andrew Gierth writes: > > Tom> There's also a question of whether we need to change anything in > Tom> contrib/ so that it plays by whatever rules we set. There's an > Tom> expectation that contrib modules should be

Re: Ideas for a relcache test mode about missing invalidations

2018-08-02 Thread Andres Freund
Hi, On 2018-08-02 19:18:11 +0900, Kyotaro HORIGUCHI wrote: > At Wed, 1 Aug 2018 09:25:18 -0700, Andres Freund wrote > in <20180801162518.jnb2ql5dfmgwp...@alap3.anarazel.de> > > Hi, > > > > The issue at [1] is caused by missing invalidations, and [2] seems like > > a likely candidate too. I

Re: Stored procedures and out parameters

2018-08-02 Thread Vladimir Sitnikov
Shay>Npgsql currently always sends a describe as part of statement execution (for server-prepared messages the describe is done only once, at preparation-time). Vladimir, are you doing things differently here? The same thing is for pgjdbc. It does use describe to identify result row format.

Re: Documentaion fix.

2018-08-02 Thread Michael Paquier
On Wed, Aug 01, 2018 at 01:04:37PM +0900, Kyotaro HORIGUCHI wrote: > The query and the result with four columns fit the current width. Just wondering, what is your reason behind the addition of restart_lsn? This part of the documentation focuses on slot creation, so slot_name, slot_type and

Re: doc - add missing documentation for "acldefault"

2018-08-02 Thread Arthur Zakirov
On Wed, Aug 01, 2018 at 04:41:44PM +0300, Pavel Luzanov wrote: > postgres=# \df acl* > List of fun >    Schema   |    Name | Result data type | > +-+--+-- >  pg_catalog | aclcontains | boolean  | aclitem[], aclitem

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-02 Thread Tom Lane
Robert Haas writes: > Does anyone else want to weigh in on this? It seems to me that there > are several people who are quite willing to complain about the fact > that this hasn't been fixed, but not willing to express an opinion > about the shape of the fix. Either the RMT needs to take

Re: Alter index rename concurrently to

2018-08-02 Thread Andres Freund
Hi, On 2018-08-02 16:30:42 -0400, Robert Haas wrote: > With this change, we'd be able to say that new statements will > definitely see the results of concurrent DDL. I don't think it really gets you that far. Because you're suggesting to do it at the parse stage, you suddenly have issues with

Re: Standby trying "restore_command" before local WAL

2018-08-02 Thread Robert Haas
On Wed, Aug 1, 2018 at 7:14 AM, Emre Hasegeli wrote: >> There's still a question here, at least from my perspective, as to which >> is actually going to be faster to perform recovery based off of. A good >> restore command, which pre-fetches the WAL in parallel and gets it local >> and on the

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-02 Thread Robert Haas
On Thu, Aug 2, 2018 at 7:20 AM, Etsuro Fujita wrote: > The new approach seems to me more localized than what Ashutosh had proposed. > One obvious advantage of the new approach is that we no longer need changes > to postgres_fdw for it to work for partitionwise joins, which would apply > for any

Re: [PATCH] Add regress test for pg_read_all_stats role

2018-08-02 Thread Michael Paquier
On Thu, Aug 02, 2018 at 06:25:14PM +0100, Alexandra Ryzhevich wrote: > I have noticed that there is no regression tests for default monitoring > roles such as pg_read_all_stats. A bug has been recently fixed for that, see 0c8910a0, so having more coverage would be welcome, now your patch has a

Re: Alter index rename concurrently to

2018-08-02 Thread Andres Freund
Hi, On 2018-08-02 15:57:13 -0400, Robert Haas wrote: > On Wed, Aug 1, 2018 at 3:36 PM, Andres Freund wrote: > >> Right. If nobody sees a reason not to change that, I think we should. > >> It would make the behavior more predictable with, I hope, no real > >> loss. > > > > What precisely are you

Re: Ideas for a relcache test mode about missing invalidations

2018-08-02 Thread Peter Geoghegan
On Thu, Aug 2, 2018 at 3:18 AM, Kyotaro HORIGUCHI wrote: >> [1] >> http://archives.postgresql.org/message-id/CAKoxK%2B5fVodiCtMsXKV_1YAKXbzwSfp7DgDqUmcUAzeAhf%3DHEQ%40mail.gmail.com >> [2] https://www.postgresql.org/message-id/12259.1532117...@sss.pgh.pa.us > > As for [1], it is not a issue on

Re: BUG #15182: Canceling authentication due to timeout aka Denial of Service Attack

2018-08-02 Thread Michael Paquier
On Wed, Aug 01, 2018 at 10:55:11AM +, Ahsan Hadi wrote: > Can you rebase the reindex-priv-93.patch, it is getting some hunk failures. Patch reindex-priv-93.patch is for REL9_3_STABLE, where it applies cleanly for me. reindex-priv-94.patch is for REL9_4_STABLE and reindex-priv-95-master.patch

Re: Allow COPY's 'text' format to output a header

2018-08-02 Thread Simon Muller
On 2 August 2018 at 17:07, Cynthia Shang wrote: > > > On Aug 2, 2018, at 8:11 AM, Daniel Verite > wrote: > > > > That makes sense, thanks for elaborating, although there are also > > a fair number of ERRCODE_FEATURE_NOT_SUPPORTED in copy.c > > that are raised on forbidden/nonsensical

Re: "Write amplification" is made worse by "getting tired" while inserting into nbtree secondary indexes (Was: Why B-Tree suffix truncation matters)

2018-08-02 Thread Peter Geoghegan
On Tue, Jul 17, 2018 at 10:42 PM, Simon Riggs wrote: > If we knew that we were never going to do deletes/non-HOT updates from > the table we could continue to use the existing mechanism, otherwise > we will be better off to use sorted index entries. However, it does > appear as if keeping entries

Re: Alter index rename concurrently to

2018-08-02 Thread Andres Freund
On 2018-08-02 16:51:10 -0400, Tom Lane wrote: > Robert Haas writes: > > [ reasons why DDL under less than AEL sucks ] > > Unfortunately, none of these problems are made to go away with an > AcceptInvalidationMessages at statement start. That just makes the > window smaller. But DDL effects

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> It's particularly bad for these cases, since what they demonstrate Tom> is that it's impossible to build transform modules for plperl or Tom> plpython out-of-tree at the moment. Right. Both plperl and plpython install _some_ header files (which behavior

Re: FailedAssertion on partprune

2018-08-02 Thread Robert Haas
David Rowley writes: >> It's probably best discussed on the other thread, but it seems to be >> by design in accumulate_append_subpath(). Parallel Append nodes don't >> get flattened if they contain a mix of parallel aware and non-parallel >> aware subplans. I don't really understand the issue

Re: [HACKERS] Cached plans and statement generalization

2018-08-02 Thread Konstantin Knizhnik
On 02.08.2018 08:25, Yamaji, Ryo wrote: -Original Message- From: Konstantin Knizhnik [mailto:k.knizh...@postgrespro.ru] Sent: Wednesday, August 1, 2018 4:53 PM To: Yamaji, Ryo/山地 亮 Cc: PostgreSQL mailing lists Subject: Re: [HACKERS] Cached plans and statement generalization I failed

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Andres" == Andres Freund writes: Tom> There's also a question of whether we need to change anything in Tom> contrib/ so that it plays by whatever rules we set. There's an Tom> expectation that contrib modules should be buildable with PGXS, Tom> so they need to follow the rules.

Re: Alter index rename concurrently to

2018-08-02 Thread Robert Haas
On Wed, Aug 1, 2018 at 3:36 PM, Andres Freund wrote: >> Right. If nobody sees a reason not to change that, I think we should. >> It would make the behavior more predictable with, I hope, no real >> loss. > > What precisely are you proposing? Inserting AcceptInvalidationMessages() in some

Re: Alter index rename concurrently to

2018-08-02 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 1, 2018 at 3:36 PM, Andres Freund wrote: >> What precisely are you proposing? > Inserting AcceptInvalidationMessages() in some location that > guarantees it will be executed at least once per SQL statement. I > tentatively propose the beginning of

Re: Alter index rename concurrently to

2018-08-02 Thread Robert Haas
On Thu, Aug 2, 2018 at 4:02 PM, Andres Freund wrote: >> Inserting AcceptInvalidationMessages() in some location that >> guarantees it will be executed at least once per SQL statement. I >> tentatively propose the beginning of parse_analyze(), but I am open to >> suggestions. > > I'm inclined to

Re: Alter index rename concurrently to

2018-08-02 Thread Tom Lane
Robert Haas writes: > [ reasons why DDL under less than AEL sucks ] Unfortunately, none of these problems are made to go away with an AcceptInvalidationMessages at statement start. That just makes the window smaller. But DDL effects could still be seen - or not - partway through a statement,

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-02 Thread Andres Freund
Hi, On 2018-08-02 15:19:49 -0400, Robert Haas wrote: > Does anyone else want to weigh in on this? It seems to me that there > are several people who are quite willing to complain about the fact > that this hasn't been fixed, but not willing to express an opinion > about the shape of the fix.

Re: [HACKERS] Bug in to_timestamp().

2018-08-02 Thread Arthur Zakirov
On Thu, Aug 02, 2018 at 06:17:01PM +0300, Alexander Korotkov wrote: > So, if number of spaces/separators between fields in input string is > more than in format string and list space/separator skipped is minus > sign, then it decides to glue that minus sign to TZH. I think this > behavior is nice

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-08-02 Thread Kyotaro HORIGUCHI
Hello. At Tue, 26 Jun 2018 10:19:45 +0530, Ashutosh Bapat wrote in > On Tue, Jun 26, 2018 at 9:59 AM, Kyotaro HORIGUCHI > wrote: > > > >> But good thing is because of join and aggregate > >> push-down we already have ability to push arbitrary kinds of nodes > >> down to the foreign server

Re: [PATCH] Improve geometric types

2018-08-02 Thread Kyotaro HORIGUCHI
At Thu, 2 Aug 2018 11:50:55 +0200, Tomas Vondra wrote in > > > On 08/01/2018 01:40 PM, Emre Hasegeli wrote: > >> Ah, so there's an assumption that NaNs are handled earlier and never > >> reach > >> this place? That's probably a safe assumption. I haven't thought about > >> that, > >> it

Re: [HACKERS] Restricting maximum keep segments by repslots

2018-08-02 Thread Kyotaro HORIGUCHI
At Thu, 2 Aug 2018 09:05:33 -0400, Robert Haas wrote in > On Tue, Jul 31, 2018 at 9:52 PM, Kyotaro HORIGUCHI > wrote: > > I thought it's to be deprecated for some reason so I'm leaving > > wal_keep_segments in '# of segments' even though the new GUC is > > in MB. I'm a bit uneasy that the two

Re: Pluggable Storage - Andres's take

2018-08-02 Thread Haribabu Kommi
On Tue, Jul 24, 2018 at 11:31 PM Haribabu Kommi wrote: > On Tue, Jul 17, 2018 at 11:01 PM Haribabu Kommi > wrote: > >> >> I added new API in the tableam.h to get all the page visible tuples to > abstract the bitgetpage() function. > > >>- Merge tableam.h and tableamapi.h and make most tableam.c

Re: [PATCH] Improve geometric types

2018-08-02 Thread Kyotaro HORIGUCHI
At Fri, 03 Aug 2018 13:38:40 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180803.133840.180843182.horiguchi.kyot...@lab.ntt.co.jp> > At Thu, 2 Aug 2018 11:50:55 +0200, Tomas Vondra > wrote in > > > > > > > On 08/01/2018 01:40 PM, Emre Hasegeli wrote: > > >> Ah, so there's an

Page freezing, FSM, and WAL replay

2018-08-02 Thread Alvaro Herrera
We recently had a customer report a very strange problem, involving a very large insert-only table: without explanation, insertions would stall for several seconds, causing application timeout and process accumulation and other nastiness. After some investigation, we narrowed this down to

Re: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian

2018-08-02 Thread Alvaro Herrera
On 2018-Aug-01, Tom Lane wrote: > David Rowley writes: > > On 20 July 2018 at 01:03, David Rowley wrote: > >> I've attached a patch intended for master which is just v2 based on > >> post 5220bb7533. > > I've pushed the v3 patch with a lot of editorial work (e.g. cleaning > up comments you

Re: Ideas for a relcache test mode about missing invalidations

2018-08-02 Thread Kyotaro HORIGUCHI
At Thu, 2 Aug 2018 14:40:50 -0700, Peter Geoghegan wrote in pg> On Thu, Aug 2, 2018 at 3:18 AM, Kyotaro HORIGUCHI pg> wrote: pg> >> [1] http://archives.postgresql.org/message-id/CAKoxK%2B5fVodiCtMsXKV_1YAKXbzwSfp7DgDqUmcUAzeAhf%3DHEQ%40mail.gmail.com pg> >> [2]

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-08-02 Thread Kyotaro HORIGUCHI
Hello, thank you for the comment. At Wed, 01 Aug 2018 21:21:57 +0900, Etsuro Fujita wrote in <5b61a5e5.6010...@lab.ntt.co.jp> > (2018/06/12 12:19), Kyotaro HORIGUCHI wrote: > > I have demonstrated and actually shown a problem of the > > PARAM_EXEC case. > > > A. Just detecting and

Re: FailedAssertion on partprune

2018-08-02 Thread David Rowley
On 3 August 2018 at 05:54, Tom Lane wrote: > Yeah, looking at the explain posted upthread, the issue is specifically > that some of the child paths might be for Gathers over subsets of the > partitioning hierarchy. It's not real clear to me whether such a subset > would necessarily correspond to

Re: [report] memory leaks in COPY FROM on partitioned table

2018-08-02 Thread Kohei KaiGai
2018-08-02 5:38 GMT+09:00 Alvaro Herrera : > On 2018-Aug-01, Alvaro Herrera wrote: > >> Right, makes sense. Pushed that way. > > KaiGai, if you can please confirm that the pushed change fixes your test > case, I'd appreciate it. > Can you wait for a few days? I can drop the test dataset and reuse

RE: Recovery performance of standby for multiple concurrent truncates on large tables

2018-08-02 Thread Jamison, Kirk
Hi, I appreciate the feedback and suggestions. On Tue, Jul 31, 2018 at 8:01 AM, Robert Haas wrote: >> How would this work if a relfilenode number that belonged to an old >> relation got recycled for a new relation? >> .. >> I think something like this could be made to work -- both on the >>

Re: Speeding up INSERTs and UPDATEs to partitioned tables

2018-08-02 Thread Amit Langote
(looking at the v5 patch but replying to an older email) On 2018/07/31 16:03, David Rowley wrote: > I've attached a complete v4 patch. > >> By the way, when going over the updated code, I noticed that the code >> around child_parent_tupconv_maps could use some refactoring too. >> Especially, I

Re: Should contrib modules install .h files?

2018-08-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> Something that copes with different modules installing headers Tom> with the same base name. Allowing for that was the driving force Tom> for going with subdirectory-per-extension, but if we really want Tom> that to work, there seems to be no alternative

Re: FailedAssertion on partprune

2018-08-02 Thread David Rowley
On 3 August 2018 at 07:53, Robert Haas wrote: > I don't really understand the issue at hand, but let me just make a > comment about accumulate_append_subpath(). If we have a regular > Append on top of another regular Append or on top of a MergeAppend, we > can flatten the lower Merge(Append)

Re: [report] memory leaks in COPY FROM on partitioned table

2018-08-02 Thread Alvaro Herrera
On 2018-Aug-03, Kohei KaiGai wrote: > 2018-08-02 5:38 GMT+09:00 Alvaro Herrera : > > On 2018-Aug-01, Alvaro Herrera wrote: > > > >> Right, makes sense. Pushed that way. > > > > KaiGai, if you can please confirm that the pushed change fixes your test > > case, I'd appreciate it. > > Can you wait

Re: [Patch] Create a new session in postmaster by calling setsid()

2018-08-02 Thread Tom Lane
Paul Guo writes: > [ make the postmaster execute setsid() too ] I'm a bit skeptical of this proposal. Forcing the postmaster to dissociate from its controlling terminal is a good thing in some scenarios, but probably less good in others, and manual postmaster starts are probably mostly in the

Re: Problems with plan estimates in postgres_fdw

2018-08-02 Thread Tom Lane
Andrew Gierth writes: > [ postgres_fdw is not smart about exploiting fast-start plans ] Yeah, that's basically not accounted for at all in the current design. > One possibility: would it be worth adding an option to EXPLAIN that > makes it assume cursor_tuple_fraction? [ handwaving ahead ] I

Re: Should contrib modules install .h files?

2018-08-02 Thread Tom Lane
Robert Haas writes: > Yeah, I would have voted -1 if I'd realized that it was close. Now > we're in a situation where we have patch not everyone likes not only > in master (which is OK, because we've got a year to decide whether to > change anything) but also in v11 (where we have a lot less

Re: Have an encrypted pgpass file

2018-08-02 Thread Kyotaro HORIGUCHI
Hello. I have had complaints several times on lack of this kind of feature. At Wed, 1 Aug 2018 17:33:39 +0200, Marco van Eck wrote in > After explaining the patch to a college we identified potentially execution > of another user when it is defined in as a command parameter. To protect >

Re: patch to ensure logical decoding errors early

2018-08-02 Thread Simon Riggs
On 1 August 2018 at 23:11, Alvaro Herrera wrote: > On 2018-Aug-01, Dave Cramer wrote: > >> See attached patch which fixes it, and adds a test for it. > > Pushed, thanks. Thanks -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training

Re: [HACKERS] Parallel Append implementation

2018-08-02 Thread Adrien NAYRAT
On 08/01/2018 03:14 PM, Robert Haas wrote: Committed to master and v11. Thanks for the review. Thanks!

Re: Explain buffers wrong counter with parallel plans

2018-08-02 Thread Amit Kapila
On Thu, Aug 2, 2018 at 10:26 AM, Amit Kapila wrote: > On Thu, Aug 2, 2018 at 8:38 AM, Andres Freund wrote: >> Hi, >> >> On 2018-08-02 08:21:58 +0530, Amit Kapila wrote: >>> I think something on the lines what Tom and you are suggesting can be >>> done with the help of EXEC_FLAG_BACKWARD, but I

Re: New Defects reported by Coverity Scan for PostgreSQL

2018-08-02 Thread Tomas Vondra
On 08/01/2018 04:07 PM, Emre Hasegeli wrote: I think there are three different things that need to be addressed: * Underspecified comments. I agree. My patch added comments, the next one with actual fixes adds more. I just didn't want to invest even more time on them while the code is

Re: Have an encrypted pgpass file

2018-08-02 Thread Geoff Winkless
On Tue, 24 Jul 2018 at 11:25, Marco van Eck wrote: > Indeed having unencrypted password lying (.pgpass or PGPASSWORD or -W) > around is making my auditors unhappy, > With the greatest of respect, perhaps you need to get auditors who understand crypto better.​ ​Having a user that has the

Re: Have an encrypted pgpass file

2018-08-02 Thread Geoff Winkless
On Thu, 2 Aug 2018 at 10:41, I wrote: > Perhaps you could make your auditors happier by restricting that user's > permissions to only run a defined function, and make that function do the > work that the automation script wants? So even if the attacker can access > the password he will still only

Re: Ideas for a relcache test mode about missing invalidations

2018-08-02 Thread Kyotaro HORIGUCHI
Hello. At Wed, 1 Aug 2018 09:25:18 -0700, Andres Freund wrote in <20180801162518.jnb2ql5dfmgwp...@alap3.anarazel.de> > Hi, > > The issue at [1] is caused by missing invalidations, and [2] seems like > a likely candidate too. I wonder if it'd be good to have a relcache test > mode akin to

FW: [Todo item] Add entry creation timestamp column to pg_stat_replication

2018-08-02 Thread MyungKyu LIM
I changed field name from 'reply_time' to 'last_msg_send_time'. Because 'last_msg_send_time' is used in pg_stat_wal_receiver/pg_stat_subsctiption view. I think that field has the same meaning. test example> postgres=# select pid, last_msg_send_time from pg_stat_replication; -[ RECORD 1

Re: [PATCH] Improve geometric types

2018-08-02 Thread Tomas Vondra
On 08/01/2018 01:40 PM, Emre Hasegeli wrote: Ah, so there's an assumption that NaNs are handled earlier and never reach this place? That's probably a safe assumption. I haven't thought about that, it simply seemed suspicious that the code mixes direct comparisons and float8_mi() calls. The

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-02 Thread Etsuro Fujita
(2018/08/02 2:44), Robert Haas wrote: Tom, Ashutosh, and I all seem to agree that we shouldn't try to re-jigger things at create-plan time. I think that a 3-1 consensus against your proposal is sufficient to say we shouldn't go that way. Agreed. Now, here you've got a new approach which

Re: Stored procedures and out parameters

2018-08-02 Thread Shay Rojansky
Apologies for disappearing from this conversation for a week. First off, on the .NET side I have the exact same issue that Vladimir Sitnikov described for the Java side. The .NET database API (ADO.NET) has a standard, portable way for calling "server-side code". Since stored procedures are in

Re: [HACKERS] Restricting maximum keep segments by repslots

2018-08-02 Thread Robert Haas
On Tue, Jul 31, 2018 at 9:52 PM, Kyotaro HORIGUCHI wrote: > I thought it's to be deprecated for some reason so I'm leaving > wal_keep_segments in '# of segments' even though the new GUC is > in MB. I'm a bit uneasy that the two similar settings are in > different units. Couldn't we turn it into

Re: Should contrib modules install .h files?

2018-08-02 Thread Robert Haas
On Tue, Jul 31, 2018 at 5:53 PM, Tom Lane wrote: > By my count of people expressing opinions, we had Michael -1, Stephen -1, > me -0.1 or so, Alvaro +1, Peter -1, presumably +1 from Andrew; and Andres > made a comment about not waiting, which perhaps Andrew read as a +1 for > backpatching. So

Re: Allow COPY's 'text' format to output a header

2018-08-02 Thread Daniel Verite
Simon Muller wrote: > I changed the error type and message for consistency with other similar > errors in that file. Whenever options are combined that are incompatible, > it looks like the convention is for a ERRCODE_SYNTAX_ERROR to be thrown. That makes sense, thanks for elaborating,

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-02 Thread Etsuro Fujita
(2018/08/02 4:30), Robert Haas wrote: On Wed, Aug 1, 2018 at 7:44 AM, Etsuro Fujita wrote: I updated the patch that way. Updated patch attached. I fixed a bug and did a bit of cleanups as well. Looking this over from a technical point of view, I think it's better than what you proposed

Problem during Windows service start

2018-08-02 Thread Sakai, Teppei
Hi, This is my first posting to the mailing list. Currently our customer uses PostgreSQL 9.5 and hits problem during Windows service start. The Windows service status of the instance is different from actual status. We got the following situation. 1. Register service with 'pg_ctl register -N