[HACKERS] Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)

2017-05-07 Thread Noah Misch
On Tue, May 02, 2017 at 09:10:52AM -0400, Tom Lane wrote: > Robert Haas writes: > >> On Thu, Apr 20, 2017 at 7:46 AM, Petr Jelinek > >> wrote: > >>> DROP SUBSCRIPTION mysub NODROP SLOT; > > >> I'm pretty uninspired by this choice of syntax. > > Actually, this command has got much worse problems

[HACKERS] Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)

2017-05-07 Thread Noah Misch
On Tue, May 02, 2017 at 01:42:37PM -0400, Robert Haas wrote: > On Tue, May 2, 2017 at 8:45 AM, Petr Jelinek > wrote: > > I am happy to implement something different, it's quite trivial to > > change. But I am not going to propose anything different as I can't > > think of better syntax (if I could

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-07 Thread Michael Paquier
(catching up here) On Sun, May 7, 2017 at 9:01 AM, Andres Freund wrote: > Turns out this isn't the better fix, because the checkpoint code > compares with the actual record LSN (rather than the end+1 that > XLogInsert() returns). We'd start having to do more bookkeeping or more > complicated com

Re: [HACKERS] [Proposal]: Extends VisualStudio to automatically precompile EmbeddedSQL

2017-05-07 Thread zosrothko
Le 02/05/2017 à 13:22, Michael Paquier a écrit : > On Tue, May 2, 2017 at 6:35 PM, zosrothko wrote: >> Hi >> >> I made an extension of VisualStudio that precompiles automaticaly C or >> C++ source with PostgreSQL Embedded SQL. The extension is made of the 3 >> files joined and I have no idea whe

Re: [HACKERS] [Proposal]: Extends VisualStudio to automatically precompile EmbeddedSQL

2017-05-07 Thread Francis ANDRE
Le 02/05/2017 à 13:22, Michael Paquier a écrit : > On Tue, May 2, 2017 at 6:35 PM, zosrothko wrote: >> Hi >> >> I made an extension of VisualStudio that precompiles automaticaly C or >> C++ source with PostgreSQL Embedded SQL. The extension is made of the 3 >> files joined and I have no idea whe

Re: [HACKERS] statement_timeout is not working as expected with postgres_fdw

2017-05-07 Thread Robert Haas
On Sun, May 7, 2017 at 12:42 AM, Amit Kapila wrote: > On Sat, May 6, 2017 at 10:41 PM, Robert Haas wrote: >> On Sat, May 6, 2017 at 12:55 PM, Robert Haas wrote: >>> Oh! Good catch. Given that the behavior in question is intentional >>> there and intended to provide backward compatibility, chan

[HACKERS] Detecting schema changes during logical replication

2017-05-07 Thread Daniele Varrazzo
Hello, I'm putting together a replication system based on logical replication. I would like to send table information only the first time a table is seen by the 'change_cb' callback, but of course there could be some schema change after replication started. So I wonder: is there any information I

[HACKERS] Question about toasting code

2017-05-07 Thread Mat Arye
Hi, I am trying to create a custom aggregate and have run across some puzzling code while trying to figure out how to implement it. This is in arrayfuncs.c:5022 (postgre 9.6.2) /* * Ensure pass-by-ref stuff is copied into mcontext; and detoast it too if * it's varlena. (You might think that det

Re: [HACKERS] Detecting schema changes during logical replication

2017-05-07 Thread Andres Freund
Hi, On 2017-05-07 19:27:08 +0100, Daniele Varrazzo wrote: > I'm putting together a replication system based on logical > replication. Interesting. If you very briefly could recap what it's about... ;) > I would like to send table information only the first > time a table is seen by the 'change

Re: [HACKERS] Question about toasting code

2017-05-07 Thread Tom Lane
Mat Arye writes: > This is in arrayfuncs.c:5022 (postgre 9.6.2) > /* > * Ensure pass-by-ref stuff is copied into mcontext; and detoast it too if > * it's varlena. (You might think that detoasting is not needed here > * because construct_md_array can detoast the array elements later. > * However,

Re: [HACKERS] Question about toasting code

2017-05-07 Thread Mat Arye
On Sun, May 7, 2017 at 3:48 PM, Tom Lane wrote: > Mat Arye writes: > > This is in arrayfuncs.c:5022 (postgre 9.6.2) > > > /* > > * Ensure pass-by-ref stuff is copied into mcontext; and detoast it too if > > * it's varlena. (You might think that detoasting is not needed here > > * because constr

Re: [HACKERS] proposal psql \gdesc

2017-05-07 Thread Fabien COELHO
Hello Pavel, Sometimes I have to solve the result types of some query. It is invisible in psql. Indeed. My 0.02€ about this patch: About the feature: It looks useful to allow to show the resulting types of a query. About the code: Patch applies cleanly and compiles. I'm afraid that re-

Re: [HACKERS] Detecting schema changes during logical replication

2017-05-07 Thread Daniele Varrazzo
On Sun, May 7, 2017 at 8:04 PM, Andres Freund wrote: > Hi, > > On 2017-05-07 19:27:08 +0100, Daniele Varrazzo wrote: >> I'm putting together a replication system based on logical >> replication. > > Interesting. If you very briefly could recap what it's about... ;) I need to replicate some table

[HACKERS] logical replication deranged sender

2017-05-07 Thread Jeff Janes
After dropping a subscription, it says it succeeded and that it dropped the slot on the publisher. But the publisher still has the slot, and a full-tilt process described by ps as postgres: wal sender process jjanes [local] idle in transaction Strace shows that this process is doing nothing but

Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-07 Thread Andres Freund
Hi, Moving discussion to -hackers, this isn't really a bug, it's an architectural issue with the new in-tree approach. Short recap: With the patch applied in [1] ff, sequences partially behave transactional (because pg_sequence is updated transactionally), partially non-transctionally (because th

Re: [HACKERS] Declarative partitioning - another take

2017-05-07 Thread Amit Langote
On 2017/05/03 2:48, Robert Haas wrote: > On Tue, May 2, 2017 at 3:30 AM, Amit Langote > wrote: >> You're right. I agree that whatever text we add here should be pointing >> out that statement-level triggers of affected child tables are not fired, >> when root parent is specified in the command. >

Re: [HACKERS] Declarative partitioning - another take

2017-05-07 Thread Thomas Munro
On Mon, May 8, 2017 at 12:47 PM, Amit Langote wrote: > On 2017/05/03 2:48, Robert Haas wrote: >> On Tue, May 2, 2017 at 3:30 AM, Amit Langote >> wrote: >>> You're right. I agree that whatever text we add here should be pointing >>> out that statement-level triggers of affected child tables are n

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-07 Thread David Rowley
On 5 May 2017 at 14:54, Thomas Munro wrote: > Just for fun, check out pages 42 and 43 of Wei Hong's thesis. He > worked on Berkeley POSTGRES parallel query and a spin-off called XPRS, > and they got linear seq scan scaling up to number of spindles: > > http://db.cs.berkeley.edu/papers/ERL-M93-28.

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-07 Thread David Rowley
On 6 May 2017 at 13:44, Thomas Munro wrote: > In Linux, each process that opens a file gets its own 'file' > object[1][5]. Each of those has it's own 'file_ra_state' > object[2][3], used by ondemand_readahead[4] for sequential read > detection. So I speculate that page-at-a-time parallel seq sca

Re: [HACKERS] Declarative partitioning - another take

2017-05-07 Thread Amit Langote
On 2017/05/08 10:22, Thomas Munro wrote: > On Mon, May 8, 2017 at 12:47 PM, Amit Langote > wrote: >> On 2017/05/03 2:48, Robert Haas wrote: >>> On Tue, May 2, 2017 at 3:30 AM, Amit Langote >>> wrote: You're right. I agree that whatever text we add here should be pointing out that state

Re: [HACKERS] modeling parallel contention (was: Parallel Append implementation)

2017-05-07 Thread Thomas Munro
On Mon, May 8, 2017 at 1:39 PM, David Rowley wrote: > On 6 May 2017 at 13:44, Thomas Munro wrote: >> Experimentation required... > > Indeed. I do remember long discussions on this before Parallel seq > scan went in, but I don't recall if anyone checked any OS kernels to > see what they did. > > W

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-05-07 Thread Amit Langote
Hi Stephen, On 2017/05/06 12:28, Stephen Frost wrote: > Noah, > > On Fri, May 5, 2017 at 23:19 Noah Misch wrote: > >> On Thu, May 04, 2017 at 05:47:02PM -0400, Stephen Frost wrote: >>> * Amit Langote (amitlangot...@gmail.com) wrote: On Wed, May 3, 2017 at 12:05 PM, Stephen Frost >> wrote:

Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-07 Thread Michael Paquier
On Mon, May 8, 2017 at 8:43 AM, Andres Freund wrote: > Moving discussion to -hackers, this isn't really a bug, it's an > architectural issue with the new in-tree approach. > > Short recap: With the patch applied in [1] ff, sequences partially > behave transactional (because pg_sequence is updated

Re: [HACKERS] Detecting schema changes during logical replication

2017-05-07 Thread Craig Ringer
On 8 May 2017 05:56, "Daniele Varrazzo" wrote: On Sun, May 7, 2017 at 8:04 PM, Andres Freund wrote: > Hi, > > On 2017-05-07 19:27:08 +0100, Daniele Varrazzo wrote: >> I'm putting together a replication system based on logical >> replication. > > Interesting. If you very briefly could recap what

Re: [HACKERS] PG 10 release notes

2017-05-07 Thread Masahiko Sawada
On Fri, May 5, 2017 at 8:38 AM, Bruce Momjian wrote: > On Fri, Apr 28, 2017 at 01:12:34PM +0900, Masahiko Sawada wrote: >> On Tue, Apr 25, 2017 at 10:31 AM, Bruce Momjian wrote: >> > I have committed the first draft of the Postgres 10 release notes. They >> > are current as of two days ago, and

Re: [HACKERS] subscription worker doesn't start immediately on eabled

2017-05-07 Thread Masahiko Sawada
On Tue, May 2, 2017 at 11:53 AM, Peter Eisentraut wrote: > On 4/27/17 21:36, Masahiko Sawada wrote: >> That makes sense to me. Since NOCONNECT option changes some default >> values including ENABLED to false I think we should apply it also when >> NOCONNECT is specified? > > That's not necessary,

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-05-07 Thread Stephen Frost
Amit, * Amit Langote (langote_amit...@lab.ntt.co.jp) wrote: > Thanks for committing the patch after improving it quite a bit, and sorry > that I couldn't reply promptly during the last week due to vacation. No worries, hopefully you have an opportunity to review the additional changes I made and

Re: [HACKERS] Compiler warning in costsize.c

2017-05-07 Thread David Rowley
On 11 April 2017 at 12:53, Michael Paquier wrote: > On Tue, Apr 11, 2017 at 4:02 AM, Robert Haas wrote: >> On Mon, Apr 10, 2017 at 2:09 PM, Tom Lane wrote: >>> ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: Why bother with the 'rte' variable at all if it's only used f

[HACKERS] Fix a typo in snapmgr.c

2017-05-07 Thread Masahiko Sawada
Hi, Attached patch for $subject. s/recovey/recovery/ Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_typo_in_snapmgr_c.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.

2017-05-07 Thread Noah Misch
On Sat, May 06, 2017 at 02:44:27PM +0200, Petr Jelinek wrote: > On 05/05/17 19:51, Petr Jelinek wrote: > > On 05/05/17 14:40, tushar wrote: > >> Hi, > >> > >> While testing 'logical replication' against v10 , i encountered one > >> issue where data stop migrating after ALTER PUBLICATION. > >> > >>

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-07 Thread Noah Misch
On Sat, May 06, 2017 at 07:02:46PM +, Noah Misch wrote: > On Wed, May 03, 2017 at 11:29:29PM -0400, Peter Eisentraut wrote: > > On 4/30/17 04:05, Noah Misch wrote: > > > The above-described topic is currently a PostgreSQL 10 open item. Peter, > > > since you committed the patch believed to hav