Re: Race conditions with checkpointer and shutdown

2019-04-28 Thread Thomas Munro
On Sun, Apr 28, 2019 at 12:56 PM Tom Lane wrote: > Even if that isn't the proximate cause of the current reports, it's > clearly trouble waiting to happen, and we should get rid of it. > Accordingly, see attached proposed patch. This just flushes the > "immediate interrupt" stuff in favor of

Re: [PATCH v5] Show detailed table persistence in \dt+

2019-04-28 Thread David Fetter
On Sun, Apr 28, 2019 at 07:26:55PM +0200, Fabien COELHO wrote: > > Hello David, > > > > Patch applies. There seems to be a compilation issue: > > > > > > describe.c:5974:1: error: expected declaration or statement at end of > > > input > > > } > > > > This is in brown paper bag territory.

Re: [PATCH v4] Add \warn to psql

2019-04-28 Thread David Fetter
On Sun, Apr 28, 2019 at 08:22:09PM +0200, Fabien COELHO wrote: > > Hello David, > > About v4: applies, compiles, global & local "make check" ok. Doc gen ok. > > Code & help look ok. > > About the doc: I do not understand why the small program listing contains an > "\echo :variable". It no

Re: BUG #15708: RLS 'using' running as wrong user when called from a view

2019-04-28 Thread Daurnimator
On Wed, 27 Mar 2019 at 23:46, Dean Rasheed wrote: > On second thoughts, it actually needs to be in > get_row_security_policies(), after making copies of the quals from the > policies, otherwise it would be scribbling on the copies from the > relcache. Actually that makes the code change a bit

Re: [PATCH v5] Show detailed table persistence in \dt+

2019-04-28 Thread David Fetter
On Sun, Apr 28, 2019 at 01:14:01PM -0400, Tom Lane wrote: > Not particularly on topic, but: including a patch version number in your > subject headings is pretty unfriendly IMO, because it breaks threading > for people whose MUAs do threading by matching up subject lines. Thanks for letting me

Do you see any problems with this procedure for Old Master rebuild as a Slave upon switchover ?

2019-04-28 Thread Avinash Kumar
Hi Team, Let us say we have a Master (M1) and a Slave (S1) in replication using Streaming Replication. I stopped all my writes from Application and i switched a WAL and made sure it is replicated to Slave. I have then shutdown M1. And ran a promote on S1. Now S1 is my new Master with a new

Re: Speed up build on Windows by generating symbol definition in batch

2019-04-28 Thread Noah Misch
On Wed, Apr 10, 2019 at 02:27:26PM +0800, Peifeng Qiu wrote: > I've updated the patch according to your comments. Looks good. Thanks. I plan to push this on Saturday.

Re: "long" type is not appropriate for counting tuples

2019-04-28 Thread Peter Geoghegan
On Sun, Apr 28, 2019 at 4:25 PM Tom Lane wrote: > > ISTM that we should try to come up with a way of making code like this > > work, rather than placing the burden on new code to get it right. > > Other than "use the right datatype", I'm not sure what we can do? Ambiguity seems like the real

Re: "long" type is not appropriate for counting tuples

2019-04-28 Thread Tom Lane
Peter Geoghegan writes: > Commit ab0dfc961b6 used a "long" variable within _bt_load() to count > the number of tuples entered into a B-Tree index as it is built. This > will not work as expected on Windows, even on 64-bit Windows, because > "long" is only 32-bits wide. Right. "long" used to be

"long" type is not appropriate for counting tuples

2019-04-28 Thread Peter Geoghegan
Commit ab0dfc961b6 used a "long" variable within _bt_load() to count the number of tuples entered into a B-Tree index as it is built. This will not work as expected on Windows, even on 64-bit Windows, because "long" is only 32-bits wide. It's far from impossible that you'd have ~2 billion index

Re: Data streaming between different databases

2019-04-28 Thread Tomas Vondra
On Sun, Apr 28, 2019 at 03:59:15PM +0200, Sascha Kuhl wrote: Is it possible to differentialy synchronise two databases on the basis of equality and differences between both? Can I review this piece of code? It's rather unclear what exactly are you looking for, what do you mean by 'on the

Re: [PATCH v5] Show detailed table persistence in \dt+

2019-04-28 Thread Fabien COELHO
Hello David, Patch applies. There seems to be a compilation issue: describe.c:5974:1: error: expected declaration or statement at end of input } This is in brown paper bag territory. Fixed. I do not understand why you move both size and description out of the verbose mode, it should

Re: jsonpath

2019-04-28 Thread Alexander Korotkov
On Thu, Apr 25, 2019 at 10:29 PM Tom Lane wrote: > Alexander Korotkov writes: > > I'm going to commit these adjustments if no objections. > > Sorry for not getting to this sooner. Looking quickly at the v2 patch, > it seems like you didn't entirely take to heart the idea of preferring > a

Re: [PATCH v4] Add \warn to psql

2019-04-28 Thread Fabien COELHO
Hello David, About v4: applies, compiles, global & local "make check" ok. Doc gen ok. Code & help look ok. About the doc: I do not understand why the small program listing contains an "\echo :variable". Also, the new entry should probably be between the \w & \watch entries instead of

Re: Improve search for missing parent downlinks in amcheck

2019-04-28 Thread Alexander Korotkov
On Sun, Apr 28, 2019 at 4:36 AM Peter Geoghegan wrote: > On Sat, Apr 27, 2019 at 5:13 PM Alexander Korotkov > wrote: > > Yes, increasing of Bloom filter size also helps. But my intention was > > to make non-lossy check here. > > Why is that your intention? Do you want to do this as a feature

Re: [PATCH v5] Show detailed table persistence in \dt+

2019-04-28 Thread Tom Lane
Not particularly on topic, but: including a patch version number in your subject headings is pretty unfriendly IMO, because it breaks threading for people whose MUAs do threading by matching up subject lines. I don't actually see the point of the [PATCH] annotation at all, because the thread is

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2019-04-28 Thread Noah Misch
On Fri, Mar 29, 2019 at 09:53:51AM +, Daniel Gustafsson wrote: > On Saturday, March 9, 2019 8:16 AM, Noah Misch wrote: > > I tested on Red Hat and on Windows Server 2016; I won't be shocked > > if the test (not the code under test) breaks on other Windows > > configurations. > > IIRC there

Re: pg_ssl

2019-04-28 Thread Steve
Will be doing in just a few days. I am taking _initial_ suggestions, incorporating them, then I will be setting that up. On 4/28/2019 11:25 AM, David Fetter wrote: On Sat, Apr 27, 2019 at 12:54:07PM -0400, Steve wrote: As you might know, generating SSL certificates for postgres (to be used by

Data streaming between different databases

2019-04-28 Thread Sascha Kuhl
Is it possible to differentialy synchronise two databases on the basis of equality and differences between both? Can I review this piece of code?

Re: speeding up planning with partitions

2019-04-28 Thread Amit Langote
On Sun, Apr 28, 2019 at 8:10 AM Tom Lane wrote: > Amit Langote writes: > > Not sure if you'll like it but maybe we could ignore even regular > > inheritance child targets that are proven to be empty (is_dummy_rel()) for > > a given query during the initial SELECT planning. That way, we can

Re: pg_ssl

2019-04-28 Thread David Fetter
On Sat, Apr 27, 2019 at 12:54:07PM -0400, Steve wrote: > As you might know, generating SSL certificates for postgres (to be > used by pgadmin, for example...) can be quite a bear; especially if > you need more than one, since they are based on the username of the > postgres user. Thanks for

[PATCH v5] Show detailed table persistence in \dt+

2019-04-28 Thread David Fetter
On Sat, Apr 27, 2019 at 10:38:50PM +0200, Fabien COELHO wrote: > > Hello David, > > Patch applies. There seems to be a compilation issue: > > describe.c:5974:1: error: expected declaration or statement at end of > input > } This is in brown paper bag territory. Fixed. > > I think the way

[PATCH v1] Add a way to supply stdin to TAP tests

2019-04-28 Thread David Fetter
Folks, Our test coverage needs all the help it can get. This patch, extracted from another by Fabian Coelho, helps move things in that direction. I'd like to argue that it's not a new feature, and that it should be back-patched as far as possible. Best, David. -- David Fetter

[PATCH v4] Add \warn to psql

2019-04-28 Thread David Fetter
On Sat, Apr 27, 2019 at 10:09:27PM +0200, Fabien COELHO wrote: > > Hello David, > > About v3. Applies, compiles, global & local make check are ok. doc gen ok. > > > > I'd put the commands in alphabetical order (echo, qecho, warn) instead of > > > e/w/q in the condition. > > > > Done. > >

Re: clean up docs for v12

2019-04-28 Thread Michael Paquier
On Sat, Apr 27, 2019 at 11:10:46AM -0400, Tom Lane wrote: > FWIW, I think we generally write this the way Justin suggests. It's > more precise, at least if you're reading it in a way that makes > text distinguishable from plain text: what to put into > the config file is exactly "-1", and not

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2019-04-28 Thread Paul Guo
On Wed, Apr 24, 2019 at 4:14 PM Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Mmm. I posted to wrong thread. Sorry. > > At Tue, 23 Apr 2019 16:39:49 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in < > 20190423.163949.36763221.horiguchi.kyot...@lab.ntt.co.jp> > > At Tue,