Re: Server won't start with fallback setting by initdb.

2018-02-27 Thread Michael Paquier
On Wed, Feb 14, 2018 at 10:08:06AM +0900, Kyotaro HORIGUCHI wrote: > Definitely. The another rationale for the value is that regtest > fails with the numbers less than 20. So it's not 11 but > 20. Currently regtest should succeed with that number of > connections as written in parallel_schedule and

Re: PATCH: Configurable file mode mask

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 03:52:32PM -0500, David Steele wrote: > On 1/30/18 3:01 AM, Michael Paquier wrote: > The purpose of this test to be ensure nothing else is in the directory. > As the tests get more complex I think keeping track of the state will be > important. In other words, this is reall

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-02-27 Thread Rajkumar Raghuwanshi
On Wed, Feb 14, 2018 at 5:44 PM, Amit Kapila wrote: > +# Concurrency error from GetTupleForTrigger > +# Concurrency error from ExecLockRows > > I think you don't need to mention above sentences in spec files. > Apart from that, your patch looks good to me. I have marked it as > Ready For Committ

RE: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-27 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:mich...@paquier.xyz] > So I would propose to just do that later. I have looked a second time at > your patch, attached is the set of tests I have run: Thanks so much, that has helped me a lot! > I have one small comment though. The comment block at the beginning of

Re: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-02-27 Thread Michael Paquier
On Mon, Feb 26, 2018 at 06:24:02PM +0900, Michael Paquier wrote: > Anything like that would be work only for HEAD I think as that's a bit > of refactoring. And indeed it could give you a good introduction to the > TAP facility. So I would propose to just do that later. I have looked a second tim

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
В Wed, 28 Feb 2018 10:45:24 +0900 Michael Paquier пишет: > Replace backslashes by forward slashes in MSVC build code > > This makes it possible to run some stages of these build scripts on > non-Windows systems. That way, we can more easily test whether file > moves or makefile changes might b

Re: TODO item for broken \s with libedit seems fixed

2018-02-27 Thread Tatsuo Ishii
> Tatsuo Ishii writes: >> Would you like to do this yourself? Or shall I do this? > > Go ahead, I have a bunch of other stuff to do ... Done. Once my editing is confirmed ok, I will delete the item. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Tom Lane
Robert Haas writes: > On Tue, Feb 27, 2018 at 2:50 PM, Andres Freund wrote: >> What I'm concerned about isn't so much testing paths specific to >> dynamic_shared_memory_type=none, but paths where we currently need >> fallbacks for the case we couldn't actually allocate dynamic shared >> memory. W

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Robert Haas
On Tue, Feb 27, 2018 at 2:50 PM, Andres Freund wrote: > What I'm concerned about isn't so much testing paths specific to > dynamic_shared_memory_type=none, but paths where we currently need > fallbacks for the case we couldn't actually allocate dynamic shared > memory. Which I think we at least so

Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index

2018-02-27 Thread Robert Haas
On Mon, Feb 26, 2018 at 7:51 PM, Thomas Munro wrote: > Thinking about how to tune that got me thinking about a simple middle > way we could perhaps consider... > > What if we just always locked pseudo page numbers using hash_value % > max_predicate_locks_per_relation (= effectively 31 by default)?

Re: jsonpath

2018-02-27 Thread Robert Haas
On Mon, Feb 26, 2018 at 10:34 AM, Nikita Glukhov wrote: > Attached 10th version of the jsonpath patches. > > 1. Fixed error handling in arithmetic operators. > >Now run-time errors in arithmetic operators are catched (added >PG_TRY/PG_CATCH around operator's functions calls) and converted

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 05:52:20PM -0500, Tom Lane wrote: > It already does treat SIGUSR1 as a log rotation request. Apparently > the point of this patch is that some people don't find that easy enough > to use, which is fair, because finding out the collector's PID from > outside isn't very easy.

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 04:14:02PM +0300, Victor Wagner wrote: > How interesting - somewhere between 9.3 (for which patch was made) and > 9.5 path to the Makefile in windows-specific script was changed from > Windows-style separators to unix-style and this broke context. You are looking for that,

Re: prokind column (was Re: [HACKERS] SQL procedures)

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 11:50:31AM -0500, Tom Lane wrote: > We support the various psql/describe.c features against old servers, > so it would be quite inconsistent for tab completion not to work > similarly. There are some gaps in that already, as per the other > thread, but we should clean those

Re: compress method for spgist - 2

2018-02-27 Thread Daniel Gustafsson
> On 04 Jan 2018, at 06:17, Dagfinn Ilmari Mannsåker wrote: > > Teodor Sigaev writes: > >>> Now, this patch is ready for committer from my point of view. >> >> Thank you, pushed > > This patch added two copies of the poly_ops row to the "Built-in SP-GiST > Operator Classes" table in spgist.sg

Re: jsonlog logging only some messages?

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 04:50:24PM +, Greg Stark wrote: > I would actually lean another way. If jsonlog opened *.json and wrote > there then it could leave the output_to_server field unchanged. It > does look like this might be a bit awkward with yet more of the static > functions needing to be

Re: Online enabling of checksums

2018-02-27 Thread Daniel Gustafsson
> On 28 Feb 2018, at 00:51, Andrey Borodin wrote: > >> 25 февр. 2018 г., в 21:17, Magnus Hagander написал(а): >> >> PFA an updated patch that adds this, and also fixes the problem in >> pg_verify_checksums spotted by Michael Banck. > > I had to ALLOW_CONNECTIONS to template0 to make it work

Re: [HACKERS] path toward faster partition pruning

2018-02-27 Thread Amit Langote
On 2018/02/28 1:05, Robert Haas wrote: > On Mon, Feb 26, 2018 at 10:59 PM, Amit Langote > wrote: >> You may say that partition bounds might have to be different too in this >> case and hence partition-wise join won't occur anyway, but I'm wondering >> if the mismatch of partcollation itself isn't

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 02:53:55PM -0500, Tom Lane wrote: > Andres Freund writes: >> On 2018-02-27 14:41:47 -0500, Tom Lane wrote: >>> What I didn't understand about it was what kind of testing this'd make >>> harder. If we desupport dynamic_shared_memory_type=none, there aren't >>> any code path

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Michael Paquier
On Tue, Feb 27, 2018 at 02:00:36PM -0500, Robert Haas wrote: > I think the two issues you are pointing out are the same issue -- > namely, if initdb probes for a max_connections setting with an invalid > DSM implementation configured, it will fail the test for every value > of max_connections and t

ON CONFLICT DO UPDATE for partitioned tables

2018-02-27 Thread Alvaro Herrera
I updated Amit Langote's patch for INSERT ON CONFLICT DO UPDATE[1]. Following the lead of edd44738bc88 ("Be lazier about partition tuple routing.") this incarnation only does the necessary push-ups for the specific partition that needs it, at execution time. As far as I can tell, it works as inten

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-02-27 Thread Thomas Munro
On Wed, Jan 3, 2018 at 4:31 AM, Shubham Barai wrote: > I have created new isolation tests. Please have a look at > updated patch. Hi Shubham, Could we please have a rebased version of the gin one? -- Thomas Munro http://www.enterprisedb.com

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Tom Lane
"David G. Johnston" writes: > On Tue, Feb 27, 2018 at 4:12 PM, Tom Lane wrote: >> IOW, I think a fair response to this is "if you're using logrotate with >> Postgres, you're doing it wrong". That was of some use back before we >> spent so much sweat on the syslogger, but it's not a reasonable se

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Andres Freund
On 2018-02-27 16:20:28 -0700, David G. Johnston wrote: > On Tue, Feb 27, 2018 at 4:12 PM, Tom Lane wrote: > > > IOW, I think a fair response to this is "if you're using logrotate with > > Postgres, you're doing it wrong". That was of some use back before we > > spent so much sweat on the syslogg

Re: Reopen logfile on SIGHUP

2018-02-27 Thread David G. Johnston
On Tue, Feb 27, 2018 at 4:12 PM, Tom Lane wrote: > IOW, I think a fair response to this is "if you're using logrotate with > Postgres, you're doing it wrong". That was of some use back before we > spent so much sweat on the syslogger, but it's not a reasonable setup > today. > A couple of weeks

Re: Sigh, I broke crake again

2018-02-27 Thread Andrew Dunstan
On Wed, Feb 28, 2018 at 6:08 AM, Tom Lane wrote: > I wrote: > > I had not intended to back-patch, since those changes were just cosmetic, > > but it might be the best way to preserve the XversionUpgrade tests. > > After closer study, it seems like the least painful answer is: > > 1. In HEAD, reve

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Tom Lane
Andres Freund writes: > On 2018-02-27 22:32:41 +, Greg Stark wrote: >> On 27 February 2018 at 14:41, Anastasia Lubennikova >> wrote: >>> Small patch in the attachment implements logfile reopeninig on SIGHUP. >> HUP will cause Postgres to reload its config files. That seems like a >> fine tim

Re: Unexpected behavior with transition tables in update statement trigger

2018-02-27 Thread Tom Kazimiers
On Wed, Feb 28, 2018 at 10:27:23AM +1300, Thomas Munro wrote: Tom K, if you need a workaround before 10.4 comes out in May[1], you could try selecting the whole transition table into a CTE up front. Something like WITH my_copy AS (SELECT * FROM new_table) SELECT * FROM my_copy UNION ALL SELECT *

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Tom Lane
Greg Stark writes: > On 27 February 2018 at 14:41, Anastasia Lubennikova > wrote: >> Small patch in the attachment implements logfile reopeninig on SIGHUP. >> It only affects the file accessed by logging collector, which name you can >> check with pg_current_logfile(). > HUP will cause Postgres

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Andres Freund
On 2018-02-27 22:32:41 +, Greg Stark wrote: > On 27 February 2018 at 14:41, Anastasia Lubennikova > wrote: > > > Small patch in the attachment implements logfile reopeninig on SIGHUP. > > It only affects the file accessed by logging collector, which name you can > > check with pg_current_logf

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Greg Stark
On 27 February 2018 at 14:41, Anastasia Lubennikova wrote: > Small patch in the attachment implements logfile reopeninig on SIGHUP. > It only affects the file accessed by logging collector, which name you can > check with pg_current_logfile(). HUP will cause Postgres to reload its config files.

Re: pgsql: Avoid valgrind complaint about write() of uninitalized bytes.

2018-02-27 Thread Peter Geoghegan
On Thu, Feb 22, 2018 at 6:32 AM, Robert Haas wrote: >> Attached patch does this. I cannot recreate this issue locally, but >> this should still fix it on skink. > > Committed. Looks like it worked. -- Peter Geoghegan

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-02-27 Thread Tom Lane
Etsuro Fujita writes: > (2018/02/11 6:24), Tom Lane wrote: >> However, jaguarundi still shows a problem: >> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguarundi&dt=2018-02-10%2008%3A41%3A32 > I ran the postgres_fdw regression test with no sleep two times in a > CLOBBER_CACHE_ALWAYS

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-27 Thread Peter Geoghegan
On Tue, Feb 27, 2018 at 10:19 AM, Pavan Deolasee wrote: >> I attach a rough example of this, that uses plpgsql. > > Thanks for writing the sample code. I understand you probably don't mean to > suggest that we need to mimic the behaviour of the plpgsql code and the > semantics offered by MERGE wou

Re: Unexpected behavior with transition tables in update statement trigger

2018-02-27 Thread Tom Kazimiers
On Tue, Feb 27, 2018 at 03:58:14PM -0500, Tom Lane wrote: Thomas Munro writes: Here's a new version with tuplestore_select_read_pointer() added in another place where it was lacking, and commit message. Moving to -hackers, where patches go. Pushed, along with a regression test based on your

Re: Unexpected behavior with transition tables in update statement trigger

2018-02-27 Thread Thomas Munro
On Wed, Feb 28, 2018 at 9:58 AM, Tom Lane wrote: > Thomas Munro writes: >> Here's a new version with tuplestore_select_read_pointer() added in >> another place where it was lacking, and commit message. Moving to >> -hackers, where patches go. > > Pushed, along with a regression test based on you

Re: PATCH: Exclude unlogged tables from base backups

2018-02-27 Thread David Steele
On 1/29/18 8:10 PM, Masahiko Sawada wrote: > On Tue, Jan 30, 2018 at 5:45 AM, Adam Brightwell >> >> If it is agreed that the temp file exclusion should be submitted as a >> separate patch, then I will mark 'ready for committer'. > > Agreed, please mark this patch as "Ready for Committer". Attache

Re: [HACKERS] [POC] Faster processing at Gather node

2018-02-27 Thread Andres Freund
Hi, On 2018-02-27 16:03:17 -0500, Robert Haas wrote: > On Wed, Feb 7, 2018 at 1:41 PM, Andres Freund wrote: > > Well, it's more than just systems like that - for 64bit atomics we > > sometimes do fall back to spinlock based atomics on 32bit systems, even > > if they support 32 bit atomics. > > I

Re: [HACKERS] [POC] Faster processing at Gather node

2018-02-27 Thread Robert Haas
On Wed, Feb 7, 2018 at 1:41 PM, Andres Freund wrote: > Well, it's more than just systems like that - for 64bit atomics we > sometimes do fall back to spinlock based atomics on 32bit systems, even > if they support 32 bit atomics. I built with -m32 on my laptop and tried "select aid, count(*) from

Re: Registering LWTRANCHE_PARALLEL_HASH_JOIN

2018-02-27 Thread Thomas Munro
On Wed, Feb 28, 2018 at 8:39 AM, Robert Haas wrote: > On Sat, Feb 10, 2018 at 6:07 PM, Thomas Munro > wrote: >> I forgot to register a display name for LWTRANCHE_PARALLEL_HASH_JOIN, >> the tranche ID used by the LWLock that Parallel Hash uses when handing >> out chunks of memory. Please see atta

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-27 Thread Robert Haas
On Tue, Feb 27, 2018 at 2:17 PM, Tom Lane wrote: > Robert Haas writes: >> +1. We don't have to support everything, but things that don't work >> should fail on insertion, not retrieval. Otherwise what we have is >> less a database and more a data black hole. > > That sounds nice as a principle

Re: Unexpected behavior with transition tables in update statement trigger

2018-02-27 Thread Tom Lane
Thomas Munro writes: > Here's a new version with tuplestore_select_read_pointer() added in > another place where it was lacking, and commit message. Moving to > -hackers, where patches go. Pushed, along with a regression test based on your example. Unfortunately, this came in a bit too late for

Re: PATCH: Configurable file mode mask

2018-02-27 Thread David Steele
Hi Michael, Thanks for having a look at the patches. On 1/30/18 3:01 AM, Michael Paquier wrote: > On Mon, Jan 29, 2018 at 04:29:08PM -0500, David Steele wrote: >> >> Adds a *very* basic test suite for pg_resetwal. I was able to make this >> utility core dump (floating point errors) pretty easily

Re: Unexpected behavior with transition tables in update statement trigger

2018-02-27 Thread Tom Kazimiers
On Tue, Feb 27, 2018 at 02:52:02PM +1300, Thomas Munro wrote: On Tue, Feb 27, 2018 at 4:18 AM, Tom Kazimiers wrote: It would be great if this or a similar fix would make it into the next official release. Here's a new version with tuplestore_select_read_pointer() added in another place where

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Tom Lane
Andres Freund writes: > On 2018-02-27 14:41:47 -0500, Tom Lane wrote: >> What I didn't understand about it was what kind of testing this'd make >> harder. If we desupport dynamic_shared_memory_type=none, there aren't >> any code paths that need to cope with the case, and we should just >> remove

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Andres Freund
On 2018-02-27 14:41:47 -0500, Tom Lane wrote: > Robert Haas writes: > > On Thu, Feb 15, 2018 at 1:00 PM, Andres Freund wrote: > >> Hm, I'm not quite convinced by this. Seems to make testing a bunch of > >> codepaths harder. I think it's fine to say that pg doesn't work > >> correctly with them d

Re: Wait event names mismatch: oldserxid

2018-02-27 Thread Robert Haas
On Fri, Feb 9, 2018 at 8:53 AM, Michael Paquier wrote: > So the docs look correct to me on this side. What I find weird is the > phrasing to define oldserxid. Instead of that, the current description: > Waiting to I/O on an oldserxid buffer. > I would suggest "waiting *for* I/O" > > A small patc

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Tom Lane
Robert Haas writes: > On Thu, Feb 15, 2018 at 1:00 PM, Andres Freund wrote: >> Hm, I'm not quite convinced by this. Seems to make testing a bunch of >> codepaths harder. I think it's fine to say that pg doesn't work >> correctly with them disabled though. > I'm not sure I understand this. Do y

Re: Registering LWTRANCHE_PARALLEL_HASH_JOIN

2018-02-27 Thread Robert Haas
On Sat, Feb 10, 2018 at 6:07 PM, Thomas Munro wrote: > I forgot to register a display name for LWTRANCHE_PARALLEL_HASH_JOIN, > the tranche ID used by the LWLock that Parallel Hash uses when handing > out chunks of memory. Please see attached. I think that you need to insert some weasel words int

Re: Sigh, I broke crake again

2018-02-27 Thread Tom Lane
I wrote: > I had not intended to back-patch, since those changes were just cosmetic, > but it might be the best way to preserve the XversionUpgrade tests. After closer study, it seems like the least painful answer is: 1. In HEAD, revert the renaming of int44in/int44out to city_budget_in/_out; the

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Robert Haas
On Thu, Feb 15, 2018 at 1:00 PM, Andres Freund wrote: > Hm, I'm not quite convinced by this. Seems to make testing a bunch of > codepaths harder. I think it's fine to say that pg doesn't work > correctly with them disabled though. I'm not sure I understand this. Do you mean we should just add a

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-27 Thread Tom Lane
Robert Haas writes: > +1. We don't have to support everything, but things that don't work > should fail on insertion, not retrieval. Otherwise what we have is > less a database and more a data black hole. That sounds nice as a principle but I'm not sure how workable it really is. Do you want t

Re: ALTER TABLE ADD COLUMN fast default

2018-02-27 Thread Andres Freund
Hi, On 2018-02-27 14:29:44 +1030, Andrew Dunstan wrote: > This was debated quite some time ago. See for example > > The consensus then seemed to be to store them in pg_attribute. If not, > I think we'd need a new catalog - pg

Re: Let's remove DSM_INPL_NONE.

2018-02-27 Thread Robert Haas
On Thu, Feb 15, 2018 at 5:58 AM, Kyotaro HORIGUCHI wrote: > It is amost a just-to-delete work but I see two issues raised so > far. I think the two issues you are pointing out are the same issue -- namely, if initdb probes for a max_connections setting with an invalid DSM implementation configure

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Andres Freund
On 2018-02-27 13:43:23 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2018-02-27 10:36:01 -0500, Robert Haas wrote: > >> However, those are presumably rare configurations that many people > >> (including many developers) don't care about. > > > I don't think that's quite true anymore. We e

Re: Sigh, I broke crake again

2018-02-27 Thread Tom Lane
Andres Freund writes: > On 2018-02-27 13:36:59 -0500, Tom Lane wrote: >> Does it seem practical to adjust TestUpgradeXversion.pm to cope with >> this change? An alternative answer is to put back C-language stubs >> in regress.c for the removed functions, but that seems a bit grotty. > Could we j

Re: Proposal for changes in official Docker image

2018-02-27 Thread Максим Кольцов
2018-02-27 21:48 GMT+03:00 Robert Haas : > On Sat, Feb 17, 2018 at 2:47 PM, Максим Кольцов wrote: >> First of all, thanks for the great app :) >> >> I started using PgAdmin with docker image (dpage/pgadmin4) a few weeks >> ago, however I thought that it had some issues, so I decided to make >> my

Re: Proposal for changes in official Docker image

2018-02-27 Thread Robert Haas
On Sat, Feb 17, 2018 at 2:47 PM, Максим Кольцов wrote: > First of all, thanks for the great app :) > > I started using PgAdmin with docker image (dpage/pgadmin4) a few weeks > ago, however I thought that it had some issues, so I decided to make > my own image. Some of the advantages: > > - Use alp

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-27 Thread Robert Haas
On Fri, Feb 16, 2018 at 2:00 PM, Anna Akenteva wrote: > It's not necessarily my goal. My goal is to avoid the confusing situation > where you insert something into a table and suddenly everything seems to > break for no reason and you don't get any information on what to do next. As > I see it, it

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Tom Lane
Andres Freund writes: > On 2018-02-27 10:36:01 -0500, Robert Haas wrote: >> However, those are presumably rare configurations that many people >> (including many developers) don't care about. > I don't think that's quite true anymore. We e.g. now rely on 64bit > atomics being emulated on some mac

Re: Sigh, I broke crake again

2018-02-27 Thread Andres Freund
Hi, On 2018-02-27 13:36:59 -0500, Tom Lane wrote: > I just committed some regression test cleanup that removed or renamed > a couple of C-language functions in regress.so. I see that crake is > now failing XversionUpgrade tests, and although I can't see the details, > I bet the problem is from tr

Re: [HACKERS] Partition-wise aggregation/grouping

2018-02-27 Thread Robert Haas
On Tue, Feb 27, 2018 at 4:29 AM, Jeevan Chalke wrote: > Hi Robert, > I had a look over his provided testcase and observed that when we create a > Gather Merge path over a cheapest partial path by sorting it explicitly as > generate_gather_paths won't consider it, we accidentally used cheapest > pa

Sigh, I broke crake again

2018-02-27 Thread Tom Lane
I just committed some regression test cleanup that removed or renamed a couple of C-language functions in regress.so. I see that crake is now failing XversionUpgrade tests, and although I can't see the details, I bet the problem is from trying to load CREATE FUNCTION commands from the old regressi

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-27 Thread Pavan Deolasee
On Fri, Feb 16, 2018 at 6:37 AM, Peter Geoghegan wrote: > > ISTM that a MERGE isn't really a thing that replaces 2 or 3 other DML > statements, at least in most cases. It's more like a replacement for > procedural code with an outer join, with an INSERT, UPDATE or DELETE > that affects zero or on

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Andres Freund
Hi, On 2018-02-27 10:36:01 -0500, Robert Haas wrote: > On Tue, Feb 27, 2018 at 8:49 AM, Aleksander Alekseev > We tried to follow commit messages [1] and discussions [2]. However no matter > how you try to look on this code it's weird. I don't see how that makes the code weird. Not fit for your pu

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-02-27 Thread Alexander Korotkov
On Fri, Jan 12, 2018 at 7:05 AM, Masahiko Sawada wrote: > On Wed, Jan 10, 2018 at 11:28 AM, Masahiko Sawada > wrote: > > On Sun, Jan 7, 2018 at 8:40 AM, Peter Geoghegan wrote: > >> On Sat, Jan 6, 2018 at 2:20 PM, Stephen Frost > wrote: > > IIRC the patches that makes the cleanup scan skip

Re: Online enabling of checksums

2018-02-27 Thread Andrey Borodin
Hi, Magus! > 25 февр. 2018 г., в 21:17, Magnus Hagander написал(а): > > PFA an updated patch that adds this, and also fixes the problem in > pg_verify_checksums spotted by Michael Banck. I had to ALLOW_CONNECTIONS to template0 to make it work postgres=# 2018-02-27 21:29:05.993 +05 [57259] ERR

Re: jsonlog logging only some messages?

2018-02-27 Thread Greg Stark
On 27 February 2018 at 02:04, Michael Paquier wrote: > On Mon, Feb 26, 2018 at 05:38:56PM +, Greg Stark wrote: >> I tried loading the jsonlog module from >> https://github.com/michaelpq/pg_plugins into Postgres 9.6. >> >> However it seems it resulted in logs only for session log messages but >

Re: prokind column (was Re: [HACKERS] SQL procedures)

2018-02-27 Thread Tom Lane
Catalin Iacob writes: > On Tue, Feb 27, 2018 at 4:03 AM, Michael Paquier wrote: >> I would just recommend users to use a version of psql matching >> the one of the server instead of putting an extra load of maintenance >> into psql for years to come > Breaking tab completion in new psql against

Re: [HACKERS] GUC for cleanup indexes threshold.

2018-02-27 Thread Alexander Korotkov
On Wed, Nov 29, 2017 at 6:06 PM, Masahiko Sawada wrote: > On Wed, Nov 29, 2017 at 11:05 PM, Simon Riggs > wrote: > > On 25 September 2017 at 22:34, Kyotaro HORIGUCHI > > wrote: > > > >>> > Here is a small patch that skips scanning btree index if no pending > >>> > deleted pages exists. > >>> >

Re: prokind column (was Re: [HACKERS] SQL procedures)

2018-02-27 Thread Catalin Iacob
On Tue, Feb 27, 2018 at 4:03 AM, Michael Paquier wrote: > I would just recommend users to use a version of psql matching > the one of the server instead of putting an extra load of maintenance > into psql for years to come Breaking tab completion in new psql against old servers might be acceptabl

Re: Reopen logfile on SIGHUP

2018-02-27 Thread Dagfinn Ilmari Mannsåker
Anastasia Lubennikova writes: > Large percentage of postgres installations, for example PGDG packages > for Debian/Ubuntu, assume by default that log management will be > handled by extrernals tools such as logrotate. > > Unfortunately such tools have no way to tell postgres to reopen log > file

Re: [HACKERS] path toward faster partition pruning

2018-02-27 Thread Robert Haas
On Mon, Feb 26, 2018 at 10:59 PM, Amit Langote wrote: > You may say that partition bounds might have to be different too in this > case and hence partition-wise join won't occur anyway, but I'm wondering > if the mismatch of partcollation itself isn't enough to conclude that? Yeah, you're right.

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-02-27 Thread Claudio Freire
On Tue, Feb 6, 2018 at 4:56 AM, Masahiko Sawada wrote: > For vacuuming fsm of index, we might have to consider to > vacuum fsm of index after lazy_vacuum_index. I've been thinking about that, and I think you're right. So here's a fourth patch that adds that to nbtree's bulkdelete implementation.

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Robert Haas
On Tue, Feb 27, 2018 at 8:49 AM, Aleksander Alekseev wrote: > We would like to know whether you share this concern and whether it > would be a good idea to try to refactor the code so that atomics could > be used not only from the backend. I think the concern on the referenced threads was that at

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Noah Misch
On Tue, Feb 27, 2018 at 11:43:34AM +0100, Magnus Hagander wrote: > On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner wrote: > > These errors seems to be caused by commit 91f3ffc5249 > > which improves readability of src/bin/scripts/Makefile for > > humans by moving list of common object files into

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-02-27 Thread Claudio Freire
On Mon, Feb 26, 2018 at 10:20 PM, Masahiko Sawada wrote: > Thank you for updating patches! > > 0001 patch looks good to me except for the following unnecessary empty lines. > > +* If there are no indexes then we should periodically > vacuum the FSM > +* on huge rela

Reopen logfile on SIGHUP

2018-02-27 Thread Anastasia Lubennikova
Large percentage of postgres installations, for example PGDG packages for Debian/Ubuntu, assume by default that log management will be handled by extrernals tools such as logrotate. Unfortunately such tools have no way to tell postgres to reopen log file after rotation and forced to use copy-t

Re: TODO item for broken \s with libedit seems fixed

2018-02-27 Thread Patrick Krecker
> On Feb 27, 2018, at 06:25, Tom Lane wrote: > > Tatsuo Ishii writes: >> Would you like to do this yourself? Or shall I do this? > > Go ahead, I have a bunch of other stuff to do ... > >regards, tom lane I don’t think I have permission to edit the page, otherwise I would be happ

Re: TODO item for broken \s with libedit seems fixed

2018-02-27 Thread Tom Lane
Tatsuo Ishii writes: > Would you like to do this yourself? Or shall I do this? Go ahead, I have a bunch of other stuff to do ... regards, tom lane

atomics.h may not be included from frontend code

2018-02-27 Thread Aleksander Alekseev
Hello hackers, My colleague Anastasia Lubennikova and I were discussing a weird piece of code in src/include/port/atomics.h: ``` #ifdef FRONTEND #error "atomics.h may not be included from frontend code" #endif ``` We tried to follow commit messages [1] and discussions [2]. However no matter how

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
On Tue, 27 Feb 2018 14:14:04 +0100 Magnus Hagander wrote: > > Thanks. I've pushed this for 9.3-9.5. > > Please verify that it looks good if you can (it takes a while for the > buildfarm to get around to it) Works at least for 9.5, although I haven't run tap tests on this build. ---

Re: Re: ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)

2018-02-27 Thread Jeevan Chalke
On Tue, Feb 27, 2018 at 4:55 PM, Andreas Joseph Krogh wrote: > På tirsdag 27. februar 2018 kl. 12:16:42, skrev Jeevan Chalke < > jeevan.cha...@enterprisedb.com>: > > Hi, > > On Tue, Feb 27, 2018 at 3:46 PM, Andreas Joseph Krogh > wrote: >> >> $subject >> >> The query I'm using is 14K and I have

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Magnus Hagander
On Tue, Feb 27, 2018 at 2:05 PM, Victor Wagner wrote: > On Tue, 27 Feb 2018 13:35:33 +0100 > Magnus Hagander wrote: > > > > > Note that said commit (91f3ffc5249) is not limited to rearranging > > > makefile. It also changes a lot into C code itself. So it is not a > > > question of reverting com

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
On Tue, 27 Feb 2018 13:49:29 +0100 Magnus Hagander wrote: > Does not apply cleanly to 9.5 at least for me. Probably easy to fix, > but I still feel we shouldn't mess around with the buildsystem in > back branches unless we actually have to. How interesting - somewhere between 9.3 (for which

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Sandeep Thakkar
Hi Magnus On Tue, Feb 27, 2018 at 6:05 PM, Magnus Hagander wrote: > On Tue, Feb 27, 2018 at 11:53 AM, Victor Wagner > wrote: > >> On Tue, 27 Feb 2018 11:43:34 +0100 >> Magnus Hagander wrote: >> >> > On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner >> > wrote: >> > >> > > Hello, hackers. >> > >

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
On Tue, 27 Feb 2018 13:35:33 +0100 Magnus Hagander wrote: > > Note that said commit (91f3ffc5249) is not limited to rearranging > > makefile. It also changes a lot into C code itself. So it is not a > > question of reverting commit - it is making new commit, which > > reverts changes in just one

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Magnus Hagander
On Tue, Feb 27, 2018 at 1:42 PM, Victor Wagner wrote: > On Tue, 27 Feb 2018 11:43:34 +0100 > Magnus Hagander wrote: > > > > I'm unsure why this was introduced in 9.5 and earlier, but not in the > > newer ones. This smells like a possible backpatch mistake, in which > > case that part should pro

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
On Tue, 27 Feb 2018 11:43:34 +0100 Magnus Hagander wrote: > I'm unsure why this was introduced in 9.5 and earlier, but not in the > newer ones. This smells like a possible backpatch mistake, in which > case that part should probably be backed out of the old branches > rather than teaching mkvcb

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Magnus Hagander
On Tue, Feb 27, 2018 at 11:53 AM, Victor Wagner wrote: > On Tue, 27 Feb 2018 11:43:34 +0100 > Magnus Hagander wrote: > > > On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner > > wrote: > > > > > Hello, hackers. > > > > > > I've tried to build last state of REL9_5_STABLE branch (commit > > > 1f19e4

Re: [HACKERS] Add support for tuple routing to foreign partitions

2018-02-27 Thread Etsuro Fujita
(2018/02/21 20:54), Etsuro Fujita wrote: void BeginForeignRouting(); Prepare for a tuple-routing operation on a foreign table. This is called from ExecSetupPartitionTupleRouting and ExecInitPartitionInfo. I modified execPartition.c so that this callback routine is called from a single functio

Sv: Re: ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)

2018-02-27 Thread Andreas Joseph Krogh
På tirsdag 27. februar 2018 kl. 12:16:42, skrev Jeevan Chalke < jeevan.cha...@enterprisedb.com >: Hi,   On Tue, Feb 27, 2018 at 3:46 PM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: $subject   The query I'm using is 14K and I have not produced a te

Re: parallel append vs. simple UNION ALL

2018-02-27 Thread Rajkumar Raghuwanshi
On Sat, Feb 24, 2018 at 2:55 AM, Robert Haas wrote: > 0001 is pretty much the same as the subquery-smarts.patch file I > attached to the previous email. I don't see much reason not to go > ahead and commit this, although it could use a test case. It makes > the simple/flattened case work. Afte

Re: ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)

2018-02-27 Thread Jeevan Chalke
Hi, On Tue, Feb 27, 2018 at 3:46 PM, Andreas Joseph Krogh wrote: > $subject > > The query I'm using is 14K and I have not produced a test-case, so this is > just a heads-up. > Rajkumar off-list shared same issue with me. And I have posted a fix for the same ( https://www.postgresql.org/message-

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
On Tue, 27 Feb 2018 11:43:34 +0100 Magnus Hagander wrote: > On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner > wrote: > > > Hello, hackers. > > > > I've tried to build last state of REL9_5_STABLE branch (commit > > 1f19e46124eee8c6a54834) and under Win32 encountered following > > errors: > > [s

Re: MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Magnus Hagander
On Tue, Feb 27, 2018 at 11:27 AM, Victor Wagner wrote: > Hello, hackers. > > I've tried to build last state of REL9_5_STABLE branch (commit > 1f19e46124eee8c6a54834) and under Win32 encountered following errors: > > > C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\bin\amd64\link.exe

MSVC builld of 9.5.12 is broken?

2018-02-27 Thread Victor Wagner
Hello, hackers. I've tried to build last state of REL9_5_STABLE branch (commit 1f19e46124eee8c6a54834) and under Win32 encountered following errors: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\link.exe /ERRORREPORT:QUEUE /OUT:".\Release\createdb\createdb.exe" /INCREMENT

server crash in nodeAppend.c

2018-02-27 Thread Rajkumar Raghuwanshi
Hi, I am getting a server crash on PG-HEAD with below test case. SET parallel_setup_cost=0; SET parallel_tuple_cost=0; create or replace function foobar() returns setof text as $$ select 'foo'::varchar union all select 'bar'::varchar ; $$ language sql stable; postgres=# select foobar(); server c

Fix a typo in walsender.c

2018-02-27 Thread atorikoshi
Hi, Attached a minor patch for a typo: s/log/lag Regards, -- Atsushi Torikoshi NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index d46374d..8bb1919 100644 --- a/src/backend/repli

ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)

2018-02-27 Thread Andreas Joseph Krogh
$subject   The query I'm using is 14K and I have not produced a test-case, so this is just a heads-up.   -- Andreas Joseph Krogh ​  

  1   2   >