Re: v12 and pg_restore -f-

2019-10-06 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Perhaps we could change the back branches so that they interpret > Tom> "-f -" as "write to stdout", but without enforcing that you use > Tom> that syntax. > We should definitely do that. > Tom> Alternatively, we could revert the v12

Re: Change atoi to strtol in same place

2019-10-06 Thread Ashutosh Sharma
On Mon, Oct 7, 2019 at 10:40 AM David Rowley wrote: > > On Mon, 7 Oct 2019 at 13:21, Joe Nelson wrote: > > > > Ashutosh Sharma wrote: > > > One suggestion: The start value for port number is set to 1, however > > > it seems like the port number that falls in the range of 1-1023 is > > > reserved

Re: [PATCH] use separate PartitionedRelOptions structure to store partitioned table options

2019-10-06 Thread Michael Paquier
On Sun, Oct 06, 2019 at 03:47:46PM +0300, Nikolay Shaplov wrote: > This message is follow up to the "Get rid of the StdRdOptions" patch thread: > https://www.postgresql.org/message-id/2620882.s52SJui4ql@x200m > > I've split patch into even smaller parts and commitfest want each patch in >

Re: Updated some links which are not working with new links

2019-10-06 Thread vignesh C
On Sat, Oct 5, 2019 at 7:13 AM vignesh C wrote: > > Hi, > > There are some links referred in the source files which are currently > not working. > > The below link: > > is updated with: > > > The below links: >

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Masahiko Sawada
On Sat, Oct 5, 2019 at 8:22 PM Amit Kapila wrote: > > On Fri, Oct 4, 2019 at 7:57 PM Masahiko Sawada wrote: >> >> On Fri, Oct 4, 2019 at 2:31 PM Amit Kapila wrote: >> >> >> > >> > Do we really need to log all those messages? The other places where we >> > launch parallel workers doesn't seem

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Amit Kapila
On Mon, Oct 7, 2019 at 10:00 AM Masahiko Sawada wrote: > On Sat, Oct 5, 2019 at 8:22 PM Amit Kapila > wrote: > > > > On Fri, Oct 4, 2019 at 7:57 PM Masahiko Sawada > wrote: > >> > >> On Fri, Oct 4, 2019 at 2:31 PM Amit Kapila > wrote: > >> >> > >> > > >> > Do we really need to log all those

Re: Change atoi to strtol in same place

2019-10-06 Thread Joe Nelson
Ashutosh Sharma wrote: > One suggestion: The start value for port number is set to 1, however > it seems like the port number that falls in the range of 1-1023 is > reserved and can't be used. So, is it possible to have the start value > as 1024 instead of 1 ? Good idea -- changed it. I also

Re: dropping column prevented due to inherited index

2019-10-06 Thread Amit Langote
Hello, On Fri, Oct 4, 2019 at 5:57 PM Michael Paquier wrote: > > On Thu, Oct 03, 2019 at 09:18:12AM -0300, Alvaro Herrera wrote: > > Hmm. I wonder if we shouldn't adopt the coding pattern we've used > > elsewhere of collecting all columns to be dropped first into an > > ObjectAddresses array,

Re: How to retain lesser paths at add_path()?

2019-10-06 Thread Robert Haas
On Sun, Oct 6, 2019 at 3:23 PM Tomas Vondra wrote: > >I don't think this hook is a very useful approach to this problem, and > >I'm concerned that it might have a measurable performance cost. > > Can you be more specific why you don't think this approach is not > useful? I'm not sure whether you

Re: Change atoi to strtol in same place

2019-10-06 Thread David Rowley
On Mon, 7 Oct 2019 at 18:27, Ashutosh Sharma wrote: > AFAIU from the information given in the wiki page -[1], the port > numbers in the range of 1-1023 are for the standard protocols and > services. And there is nowhere mentioned that it is only true for some > OS and not for others. But, having

Re: v12 and pg_restore -f-

2019-10-06 Thread Andrew Gierth
BTW, the prior discussion is here: https://www.postgresql.org/message-id/24868.1550106683%40sss.pgh.pa.us -- Andrew (irc:RhodiumToad)

Re: identity column behavior in WHEN condition for BEFORE EACH ROW trigger

2019-10-06 Thread Suraj Kharage
> whereas, for identity columns, server allows us to create trigger for same > and trigger gets invoked as defined. Is this behavior expected? or we need > to restrict the identity columns in such scenario because anyone one > override the identity column value in trigger. > Also, I think it is

Re: v12 and pg_restore -f-

2019-10-06 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> Perhaps we could change the back branches so that they interpret Tom> "-f -" as "write to stdout", but without enforcing that you use Tom> that syntax. We should definitely do that. Tom> Alternatively, we could revert the v12 behavior change. On the

Re: dropping column prevented due to inherited index

2019-10-06 Thread Ashutosh Sharma
I think we could have first deleted all the dependency of child object on parent and then deleted the child itself using performDeletion(). As an example let's consider the case of toast table where we first delete the dependency of toast relation on main relation and then delete the toast table

Re: Change atoi to strtol in same place

2019-10-06 Thread David Rowley
On Mon, 7 Oct 2019 at 13:21, Joe Nelson wrote: > > Ashutosh Sharma wrote: > > One suggestion: The start value for port number is set to 1, however > > it seems like the port number that falls in the range of 1-1023 is > > reserved and can't be used. So, is it possible to have the start value > >

Re: v12 and pg_restore -f-

2019-10-06 Thread Tom Lane
[ redirecting to -hackers ] Justin Pryzby writes: > I saw this and updated our scripts with pg_restore -f- > https://www.postgresql.org/docs/12/release-12.html > |In pg_restore, require specification of -f - to send the dump contents to > standard output (Euler Taveira) > |Previously, this

Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)

2019-10-06 Thread Michael Paquier
On Fri, Oct 04, 2019 at 05:21:25PM +0300, Alexey Kondratov wrote: > I've checked your patch, but it seems that it cannot be applied as is, since > it e.g. adds a comment to 005_same_timeline.pl without actually changing the > test. So I've slightly modified your patch and tried to fit both dry-run

adding partitioned tables to publications

2019-10-06 Thread Amit Langote
One cannot currently add partitioned tables to a publication. create table p (a int, b int) partition by hash (a); create table p1 partition of p for values with (modulus 3, remainder 0); create table p2 partition of p for values with (modulus 3, remainder 1); create table p3 partition of p for

JIT: Optimize generated functions earlier to lower memory usage

2019-10-06 Thread Soumyadeep Chakraborty
Hello, This is to introduce a patch to lower the memory footprint of JITed code by optimizing functions at the function level (i.e. with function-level optimization passes) as soon as they are generated. This addresses the code comment inside llvm_optimize_module(): /* * Do function level

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Masahiko Sawada
On Sun, Oct 6, 2019 at 7:59 PM Amit Kapila wrote: > > On Fri, Oct 4, 2019 at 7:34 PM Masahiko Sawada wrote: >> >> On Fri, Oct 4, 2019 at 2:02 PM Amit Kapila wrote: >> >> >> >> I'd also prefer to use maintenance_work_mem at max during parallel >> >> vacuum regardless of the number of parallel

Re: stress test for parallel workers

2019-10-06 Thread Tom Lane
Thomas Munro writes: > On Wed, Aug 7, 2019 at 4:29 PM Tom Lane wrote: >> Yeah, I've been wondering whether pg_ctl could fork off a subprocess >> that would fork the postmaster, wait for the postmaster to exit, and then >> report the exit status. Where to report it *to* seems like the hard part,

Re: Non-Active links being referred in our source code

2019-10-06 Thread Michael Paquier
On Sun, Oct 06, 2019 at 09:06:44AM +0530, vignesh C wrote: > I could not find the equivalent links for the same. > Should we update the links for the same? If it could be possible to find equivalent links which could update to, it would be nice. -- Michael signature.asc Description: PGP

Re: dropdb --force

2019-10-06 Thread vignesh C
On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule wrote: > > > > čt 3. 10. 2019 v 19:48 odesílatel vignesh C napsal: >> >> On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule >> wrote: >> > >> > Thank you for careful review. I hope so all issues are out. >> > >> > >> Thanks Pavel for fixing the comments.

Re: dropdb --force

2019-10-06 Thread Pavel Stehule
ne 6. 10. 2019 v 10:19 odesílatel vignesh C napsal: > On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule > wrote: > > > > > > > > čt 3. 10. 2019 v 19:48 odesílatel vignesh C > napsal: > >> > >> On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule > wrote: > >> > > >> > Thank you for careful review. I hope

maintenance_work_mem used by Vacuum

2019-10-06 Thread Amit Kapila
As per docs [1] (see maintenance_work_mem), the maximum amount of memory used by the Vacuum command must be no more than maintenance_work_mem. However, during the review/discussion of the "parallel vacuum" patch [2], we observed that it is not true. Basically, if there is a gin index defined on a

Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead

2019-10-06 Thread Nikolay Shaplov
В письме от пятница, 27 сентября 2019 г. 17:24:49 MSK пользователь Michael Paquier написал: > The patch is in this state for two months now, so I have switched it > to "returned with feedback". So I've split this patch into even smaller parts, so it would be more easy to review. Do not use

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Amit Kapila
On Fri, Oct 4, 2019 at 7:34 PM Masahiko Sawada wrote: > On Fri, Oct 4, 2019 at 2:02 PM Amit Kapila > wrote: > >> > >> I'd also prefer to use maintenance_work_mem at max during parallel > >> vacuum regardless of the number of parallel workers. This is current > >> implementation. In lazy vacuum

parallel restore sometimes fails for FKs to partitioned tables

2019-10-06 Thread Alvaro Herrera
Hello While playing around I noticed that depending on the number of parallel workers in pg_restore compared to the number of partitions a table has, restoring an FK fails because the FK itself is restored before the index partitions have completed restoring. The exact conditions to cause the

[PATCH] use separate PartitionedRelOptions structure to store partitioned table options

2019-10-06 Thread Nikolay Shaplov
Hi! This message is follow up to the "Get rid of the StdRdOptions" patch thread: https://www.postgresql.org/message-id/2620882.s52SJui4ql@x200m I've split patch into even smaller parts and commitfest want each patch in separate thread. So it is new thread. The idea of this patch is following:

Re: [PATCH] Do not use StdRdOptions in Access Methods

2019-10-06 Thread Nikolay Shaplov
Hi! I am starting a new thread as commitfest wants new thread for new patch. This new thread is a follow up to an https://www.postgresql.org/message-id/ 2620882.s52SJui4ql%40x200m thread, where I've been trying to get rid of StdRdOpions structure, and now I've splitted the patch into smaller

Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT

2019-10-06 Thread Matheus de Oliveira
Sorry about the long delay in answering that, I hope to get to a consensus on how to do that feature, which I think it is really valuable. Sending few options and observations bellow... On Sun, Jul 28, 2019 at 2:37 PM Tom Lane wrote: > Matheus de Oliveira writes: > > [

Missed check for too-many-children in bgworker spawning

2019-10-06 Thread Tom Lane
Over in [1] we have a report of a postmaster shutdown that seems to have occurred because some client logic was overaggressively spawning connection requests, causing the postmaster's child-process arrays to be temporarily full, and then some parallel query tried to launch a new bgworker process.

Re: New "-b slim" option in 2019b zic: should we turn that on?

2019-10-06 Thread Andrew Dunstan
On 10/5/19 10:33 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 10/5/19 6:33 PM, Tom Lane wrote: >>> I had contemplated injecting the -b switch via >>> -ZIC_OPTIONS = >>> +ZIC_OPTIONS = -b slim >> I don't think that's going to work very well with a buildfarm member, >> where there's no

Re: How to retain lesser paths at add_path()?

2019-10-06 Thread Tomas Vondra
On Fri, Oct 04, 2019 at 12:19:06PM -0400, Robert Haas wrote: On Mon, Aug 12, 2019 at 12:28 AM Kohei KaiGai wrote: For implementation of the concept, this patch puts a hook on add_path / add_partial_path to override the path removal decision by extensions, according to its own viewpoint. I