Re: [HACKERS] pg_subscription_rel entry can be updated concurrently

2017-06-12 Thread Petr Jelinek
On 13/06/17 02:52, Masahiko Sawada wrote: > Hi, > > I often get an error "ERROR: tuple concurrently updated" when > changing subscription state(ALTER SUBSCRIPTION or DROP SUBSCRIPTION). > The cause of this error is that table sync worker and apply worker can > try to update the same tuple in

Re: [HACKERS] Dropping partitioned table drops a previously detached partition

2017-06-12 Thread Amit Langote
Hi Ashutosh, On 2017/06/12 20:56, Ashutosh Bapat wrote: > Hi, > If we detach a partition and drop the corresponding partitioned table, > it drops the once-partition now-standalone table as well. Thanks for the report. Looks like 8b4d582d279d78 missed the bit about drop_parent_dependency() that

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Ashutosh Bapat
On Tue, Jun 13, 2017 at 12:03 AM, Dean Rasheed wrote: > On 12 June 2017 at 17:51, Joe Conway wrote: >> On 06/12/2017 07:40 AM, Joe Conway wrote: >>> On 06/12/2017 01:49 AM, Amit Langote wrote: As he mentioned in his reply, Ashutosh's proposal to

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Ashutosh Bapat
On Mon, Jun 12, 2017 at 10:21 PM, Joe Conway wrote: > On 06/12/2017 07:40 AM, Joe Conway wrote: >> On 06/12/2017 01:49 AM, Amit Langote wrote: On Sun, Jun 11, 2017 at 5:02 PM, Dean Rasheed wrote: > It looks like relation_is_updatable()

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Ashutosh Bapat
On Mon, Jun 12, 2017 at 2:19 PM, Amit Langote wrote: >> On Sun, Jun 11, 2017 at 5:02 PM, Dean Rasheed >> wrote: >>> Hi, >>> >>> It looks like relation_is_updatable() didn't get the message about >>> partitioned tables. Thus, for example,

Re: [HACKERS] macOS Sierra & System Integrity Protection

2017-06-12 Thread Tom Lane
Robert Haas writes: > ... it turns out that System Integrity Protection > feature *also* prevents DYLD_LIBRARY_PATH from being inherited by > child processes in some manner. Yeah, this was already known and documented on the lists a year or two back. I suggest filing a

[HACKERS] macOS Sierra & System Integrity Protection

2017-06-12 Thread Robert Haas
I have a new MacBook Pro running Sierra. I managed to get PostgreSQL to build after install Xcode, installing MacPorts, installing the documentation toolchain via some incantation that was apparently wrong, and then uninstalling and reinstalling the documentation toolchain per

[HACKERS] Why are we restricting exported snapshots in subtransactions?

2017-06-12 Thread Andres Freund
Hi, ExportSnapshot() has, right at the beginning, the following block: /* * We cannot export a snapshot from a subtransaction because there's no * easy way for importers to verify that the same subtransaction is still * running. */ if (IsSubTransaction())

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-06-12 Thread Michael Paquier
On Thu, Jun 8, 2017 at 1:15 PM, Michael Paquier wrote: > 3) In walreceiver.c's pg_stat_get_wal_receiver's: > - Launch pg_stat_get_wal_receiver and take a checkpoint on it. > - Pass the lookups of pid and ready_to_display. > - Make the WAL receiver stop. > - The view

[HACKERS] Fix a typo in shm_mq.c

2017-06-12 Thread Masahiko Sawada
Hi, Attached the patch for $subject. s/Whem/When/ Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_typo_in_shm_mq_c.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-12 Thread Andres Freund
On 2017-06-12 21:03:31 -0400, Tom Lane wrote: > Andres Freund writes: > > Possibly too hard to be precise enough in a hint, but a number of these > > could benefit from one suggesting moving things into FROM, using > > LATERAL. > > Maybe "You might be able to move the

Re: [HACKERS] pgrowlocks relkind check

2017-06-12 Thread Amit Langote
On 2017/06/13 0:29, Peter Eisentraut wrote: > On 4/24/17 21:22, Amit Langote wrote: >> Hi Stephen, >> >> On 2017/04/11 22:17, Stephen Frost wrote: create extension pgrowlocks; create view one as select 1; select pgrowlocks('one'); -- ERROR: could not open file

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-12 Thread Tom Lane
Andres Freund writes: > Possibly too hard to be precise enough in a hint, but a number of these > could benefit from one suggesting moving things into FROM, using > LATERAL. Maybe "You might be able to move the set-returning function into a LATERAL FROM item."? > I'm kinda

Re: [HACKERS] pg_subscription_rel entry can be updated concurrently

2017-06-12 Thread Michael Paquier
On Tue, Jun 13, 2017 at 9:52 AM, Masahiko Sawada wrote: > Hi, > > I often get an error "ERROR: tuple concurrently updated" when > changing subscription state(ALTER SUBSCRIPTION or DROP SUBSCRIPTION). > The cause of this error is that table sync worker and apply worker can

[HACKERS] pg_subscription_rel entry can be updated concurrently

2017-06-12 Thread Masahiko Sawada
Hi, I often get an error "ERROR: tuple concurrently updated" when changing subscription state(ALTER SUBSCRIPTION or DROP SUBSCRIPTION). The cause of this error is that table sync worker and apply worker can try to update the same tuple in pg_subscription_rel. Especially it often happens when we

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Michael Paquier
On Tue, Jun 13, 2017 at 6:47 AM, Alvaro Herrera wrote: > Michael Paquier wrote: >> I do some low level packaging on Windows (libxml2, libxslt, etc.), and >> the compilation code usually allows you to usually use the >> installation paths you want. At the end using only

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-12 Thread Andres Freund
On 2017-06-09 17:33:45 -0400, Tom Lane wrote: > diff --git a/src/backend/catalog/information_schema.sql > b/src/backend/catalog/information_schema.sql > index cbcd6cf..98bcfa0 100644 > --- a/src/backend/catalog/information_schema.sql > +++ b/src/backend/catalog/information_schema.sql > @@

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Tom Lane
Andres Freund writes: > I'm not quite sure where the aversion to adding a toast table to > pg_class is coming from? I'm not at all sure it would work, and would rather not introduce risks of infinite recursion if they're not necessary. regards, tom

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Andres Freund
On 2017-06-12 19:00:02 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-06-12 18:10:52 -0400, Tom Lane wrote: > >> it'd be worthwhile checking some actual examples rather than guessing. > > > It's indeed not very compact. E.g a simple example with small types: > >

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Tom Lane
Andres Freund writes: > On 2017-06-12 18:10:52 -0400, Tom Lane wrote: >> it'd be worthwhile checking some actual examples rather than guessing. > It's indeed not very compact. E.g a simple example with small types: > CREATE TABLE partitioned(a int, b int, c timestamptz,

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-06-12 Thread Peter Geoghegan
On Mon, Jun 12, 2017 at 3:52 AM, Alexey Kondratov wrote: > I am not going to start with "speculative insertion" right now, but it would > be very > useful, if you give me a point, where to start. Maybe I will at least try to > evaluate > the complexity of the problem.

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Andres Freund
On 2017-06-12 18:10:52 -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> How about gathering some actual evidence on the point --- ie, how big > >> a partition expression do you need to make it fall over? > > > You'd need a 2kB expression (after

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Tom Lane
Andres Freund writes: > On 2017-06-12 17:35:37 -0400, Tom Lane wrote: >> I thought about trying to insert an assert in GetNewOidWithIndex to >> ensure that no type OIDs are selected automatically during upgrade, >> but it seemed a bit too complicated. Might be a good idea to

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Andres Freund
On 2017-06-12 17:35:37 -0400, Tom Lane wrote: > Andres Freund writes: > > In my opinion the problem of: > > > On 2017-06-12 17:13:34 -0400, Tom Lane wrote: > >> assignments of relfilenodes have to be shortcircuited by pg_upgrade > >> override calls during a binary-restore

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> How about gathering some actual evidence on the point --- ie, how big >> a partition expression do you need to make it fall over? > You'd need a 2kB expression (after compression) in > relpartbound before you hit a problem

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Alvaro Herrera
Tom Lane wrote: > Andres Freund writes: > > On 2017-06-12 17:10:28 -0400, Peter Eisentraut wrote: > >> Cases where relacl became too large have been known to exist. I'm not > >> sure whether relpartbound can really be that large to change the > >> scenario significantly. > >

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Alvaro Herrera
Michael Paquier wrote: > On Tue, Jun 13, 2017 at 3:13 AM, Alvaro Herrera > wrote: > > Ashutosh Sharma wrote: > >> Yes, that's right, Win64 download uses lib64 path and in my case i had > >> renamed lib64-> lib and bin64-> bin which i guess is not a right thing > >> to

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Tom Lane
Andres Freund writes: > On 2017-06-12 17:10:28 -0400, Peter Eisentraut wrote: >> Cases where relacl became too large have been known to exist. I'm not >> sure whether relpartbound can really be that large to change the >> scenario significantly. > Because it's further

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Tom Lane
Andres Freund writes: > In my opinion the problem of: > On 2017-06-12 17:13:34 -0400, Tom Lane wrote: >> assignments of relfilenodes have to be shortcircuited by pg_upgrade >> override calls during a binary-restore run, or we risk filename >> collisions. > should instead be

Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

2017-06-12 Thread Bruce Momjian
On Sun, Jun 11, 2017 at 09:14:36PM +, Piotr Stefaniak wrote: > I've never been too excited to improve indent and it's increasingly > challenging for me to force myself to work on it now, after I've > invested so much of my spare time into it. So please bear with me if > there are any errors.

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Michael Paquier
On Tue, Jun 13, 2017 at 3:13 AM, Alvaro Herrera wrote: > Ashutosh Sharma wrote: >> > I noticed that this only works if you use the "Win32" download of ICU, >> > because the "Win64" download uses "lib64" paths. I'm not sure what the >> > impact of this is in practice. >>

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Andres Freund
On 2017-06-12 17:13:34 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-06-11 20:03:28 -0400, Tom Lane wrote: > >> @@ -391,6 +391,13 @@ GetNewRelFileNode(Oid reltablespace, Rel > >> bool collides; > >> BackendId backend; > >> > >> + /* > >> + * If

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Andres Freund
On 2017-06-12 17:10:28 -0400, Peter Eisentraut wrote: > On 6/12/17 15:38, Andres Freund wrote: > > Just noticed that pg_class now has several varlena fields: > > #ifdef CATALOG_VARLEN /* variable-length fields start > > here */ > > /* NOTE: These fields are not present

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Tom Lane
Andres Freund writes: > On 2017-06-11 20:03:28 -0400, Tom Lane wrote: >> @@ -391,6 +391,13 @@ GetNewRelFileNode(Oid reltablespace, Rel >> bool collides; >> BackendIdbackend; >> >> +/* >> + * If we ever get here during pg_upgrade, there's something wrong;

Re: [HACKERS] Why forcing Hot_standby_feedback to be enabled when creating a logical decoding slot on standby

2017-06-12 Thread Andres Freund
Hi, On 2017-06-12 06:16:50 +, sanyam jain wrote: > I have created a logical decoding slot on a standby but i haven't enabled > Hot_standby_feedback.What are the test cases where this setup will fail? Creating logic slots on the standby is not supported... It'll simply currently not work

Re: [HACKERS] WIP: Data at rest encryption

2017-06-12 Thread Ants Aasma
On Mon, Jun 12, 2017 at 10:38 PM, Robert Haas wrote: > On Mon, Jun 13, 2016 at 11:07 AM, Peter Eisentraut > wrote: >> On 6/7/16 9:56 AM, Ants Aasma wrote: >>> >>> Similar things can be achieved with filesystem level encryption. >>> However

Re: [HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Peter Eisentraut
On 6/12/17 15:38, Andres Freund wrote: > Just noticed that pg_class now has several varlena fields: > #ifdef CATALOG_VARLEN /* variable-length fields start here */ > /* NOTE: These fields are not present in a relcache entry's rd_rel > field. */ > aclitem

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Andres Freund
Hi, On 2017-06-11 20:03:28 -0400, Tom Lane wrote: > I wrote: > > I believe I've identified the reason why skink and some other buildfarm > > members have been failing the pg_upgrade test recently. > > ... > > Not sure what we want to do about it. One idea is to make > > ALTER SEQUENCE not so

Re: [HACKERS] v10beta pg_catalog diagrams

2017-06-12 Thread Peter Eisentraut
On 6/12/17 11:28, Neil Anderson wrote: > I'm cross posting from general. I did some work to diagram the > relationships in pg_catalog for v10. I would like to add it to the > developer FAQ here >

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Andres Freund
Hi, On 2017-06-11 17:17:07 -0400, Tom Lane wrote: > I am not very sure why it's so hard to duplicate the misbehavior; perhaps, > in order to make the failure happen with the current regression tests, > it's necessary for a background auto-analyze to happen and consume some > OIDs (for

[HACKERS] Relpartbound, toasting and pg_class

2017-06-12 Thread Andres Freund
Hi, Just noticed that pg_class now has several varlena fields: #ifdef CATALOG_VARLEN /* variable-length fields start here */ /* NOTE: These fields are not present in a relcache entry's rd_rel field. */ aclitem relacl[1]; /* access

Re: [HACKERS] WIP: Data at rest encryption

2017-06-12 Thread Robert Haas
On Mon, Jun 13, 2016 at 11:07 AM, Peter Eisentraut wrote: > On 6/7/16 9:56 AM, Ants Aasma wrote: >> >> Similar things can be achieved with filesystem level encryption. >> However this is not always optimal for various reasons. One of the >> better reasons is the

Re: [HACKERS] standby server crashes hard on out-of-disk-space in HEAD

2017-06-12 Thread Andres Freund
On 2017-06-12 15:12:23 -0400, Robert Haas wrote: > (On Mon, Jun 12, 2017 at 12:11 PM, Tom Lane wrote: > > logfile from a standby server: > > > > 2017-06-12 11:43:46.450 EDT [13605] LOG: started streaming WAL from > > primary at 3/E600 on timeline 1 > > 2017-06-12

Re: [HACKERS] Transition tables vs ON CONFLICT

2017-06-12 Thread Thomas Munro
On Mon, Jun 12, 2017 at 2:40 PM, Thomas Munro wrote: > On Fri, Jun 9, 2017 at 4:10 PM, Thomas Munro > wrote: >> On Wed, Jun 7, 2017 at 10:47 AM, Peter Geoghegan wrote: >>> I suppose you'll need two tuplestores for the

Re: [HACKERS] standby server crashes hard on out-of-disk-space in HEAD

2017-06-12 Thread Robert Haas
(On Mon, Jun 12, 2017 at 12:11 PM, Tom Lane wrote: > logfile from a standby server: > > 2017-06-12 11:43:46.450 EDT [13605] LOG: started streaming WAL from primary > at 3/E600 on timeline 1 > 2017-06-12 11:47:46.992 EDT [11261] FATAL: could not extend file >

Re: [HACKERS] logical replication: \dRp+ and "for all tables"

2017-06-12 Thread Jeff Janes
On Sat, Jun 10, 2017 at 7:42 AM, Tom Lane wrote: > Jeff Janes writes: > > On Fri, Jun 9, 2017 at 10:20 PM, Masahiko Sawada > > wrote: > >> On Sat, Jun 10, 2017 at 7:29 AM, Jeff Janes > wrote: > >>> That

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Joe Conway
On 06/12/2017 11:33 AM, Dean Rasheed wrote: > On 12 June 2017 at 17:51, Joe Conway wrote: >> After looking I remain convinced - +1 in general. > > Yes, I think this will probably help, but I worry that it will turn > into quite a large and invasive patch, and there are a

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Dean Rasheed
On 12 June 2017 at 17:51, Joe Conway wrote: > On 06/12/2017 07:40 AM, Joe Conway wrote: >> On 06/12/2017 01:49 AM, Amit Langote wrote: >>> As he mentioned in his reply, Ashutosh's proposal to abstract away the >>> relkind checks is interesting in this regard. >>> >> I have not

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Ashutosh Sharma
Hi, On Jun 12, 2017 11:43 PM, "Alvaro Herrera" wrote: Ashutosh Sharma wrote: > > I noticed that this only works if you use the "Win32" download of ICU, > > because the "Win64" download uses "lib64" paths. I'm not sure what the > > impact of this is in practice. > >

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Alvaro Herrera
Ashutosh Sharma wrote: > > I noticed that this only works if you use the "Win32" download of ICU, > > because the "Win64" download uses "lib64" paths. I'm not sure what the > > impact of this is in practice. > > Yes, that's right, Win64 download uses lib64 path and in my case i had > renamed

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Ashutosh Sharma
Hi, On Mon, Jun 12, 2017 at 8:39 PM, Peter Eisentraut wrote: > On 6/10/17 05:40, Ashutosh Sharma wrote: >> With the help of attached patch, we can use icu feature on Windows. >> All we have to do is, download the ICU libraries from - [1] and add >> the

Re: [HACKERS] Allowing dash character in LTREE

2017-06-12 Thread Cyril Auburtin
interesting, but I like '.' as path separator, it's url-friendly, and easy I used some simple `pathTEXT CHECK (path ~ '^[\w.-]+$')` but now I regret it, because it's not as easy to index and optimize requests 2017-05-21 11:28 GMT+02:00 Manuel Kniep : > > > > > Manuel

Re: [HACKERS] Transactional sequence stuff breaks pg_upgrade

2017-06-12 Thread Alvaro Herrera
Tom Lane wrote: > On closer inspection, the only thing that pg_upgrade needs is to be > able to do ALTER SEQUENCE OWNED BY without a relfilenode bump. PFA > two versions of a patch that fixes this problem, at least to the > extent that it gets through check-world without triggering the Assert >

Re: [HACKERS] logical replication: \dRp+ and "for all tables"

2017-06-12 Thread Masahiko Sawada
On Sat, Jun 10, 2017 at 11:42 PM, Tom Lane wrote: > Jeff Janes writes: >> On Fri, Jun 9, 2017 at 10:20 PM, Masahiko Sawada >> wrote: >>> On Sat, Jun 10, 2017 at 7:29 AM, Jeff Janes wrote: That seems

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Joe Conway
On 06/12/2017 07:40 AM, Joe Conway wrote: > On 06/12/2017 01:49 AM, Amit Langote wrote: >>> On Sun, Jun 11, 2017 at 5:02 PM, Dean Rasheed >>> wrote: It looks like relation_is_updatable() didn't get the message about partitioned tables. Thus, for example,

Re: [HACKERS] Why restore_command is called for existing files in pg_xlog?

2017-06-12 Thread Jeff Janes
On Mon, Jun 12, 2017 at 5:25 AM, Alex Kliukin wrote: > On Fri, Jun 2, 2017, at 11:51 AM, Alexander Kukushkin wrote: > > Hello hackers, > There is one strange and awful thing I don't understand about > restore_command: it is always being called for every single WAL segment >

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-06-12 Thread Daniel Verite
Tom Lane wrote: > Bearing in mind that I'm not really for this at all... It's a band-aid, but certainly there are cases where a DBA confronted to a badly written website would just want to be able to: ALTER USER webuser SET allow_multiple_queries TO off; > But if an attacker is able

[HACKERS] standby server crashes hard on out-of-disk-space in HEAD

2017-06-12 Thread Tom Lane
logfile from a standby server: 2017-06-12 11:43:46.450 EDT [13605] LOG: started streaming WAL from primary at 3/E600 on timeline 1 2017-06-12 11:47:46.992 EDT [11261] FATAL: could not extend file "base/47578/54806": No space left on device 2017-06-12 11:47:46.992 EDT [11261] HINT: Check

Re: [HACKERS] logical replication NOTICE "synchronized table states"

2017-06-12 Thread Peter Eisentraut
On 6/9/17 19:17, Peter Eisentraut wrote: > On 6/9/17 17:06, Jeff Janes wrote: >> When creating a subscription, I get a NOTICE "synchronized table states" >> >> What is this supposed to be telling the end user? Is this just a >> debugging message not intended to be included in the released code? >

Re: [HACKERS] Broken hint bits (freeze)

2017-06-12 Thread Vladimir Borodin
> 12 июня 2017 г., в 13:19, Amit Kapila написал(а): > > On Sun, Jun 11, 2017 at 11:59 PM, Vladimir Borodin > wrote: >> >> 8 июня 2017 г., в 17:03, Amit Kapila написал(а): >> >> On Thu, Jun 8, 2017

[HACKERS] v10beta pg_catalog diagrams

2017-06-12 Thread Neil Anderson
Hi, I'm cross posting from general. I did some work to diagram the relationships in pg_catalog for v10. I would like to add it to the developer FAQ here https://wiki.postgresql.org/wiki/Developer_FAQ#Is_there_a_diagram_of_the_system_catalogs_available.3F but I thought I should check if

Re: [HACKERS] pgrowlocks relkind check

2017-06-12 Thread Peter Eisentraut
On 4/24/17 21:22, Amit Langote wrote: > Hi Stephen, > > On 2017/04/11 22:17, Stephen Frost wrote: >>> create extension pgrowlocks; >>> create view one as select 1; >>> select pgrowlocks('one'); >>> -- ERROR: could not open file "base/68730/68748": No such file or directory >>> >>> With the

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Peter Eisentraut
On 6/10/17 05:40, Ashutosh Sharma wrote: > With the help of attached patch, we can use icu feature on Windows. > All we have to do is, download the ICU libraries from - [1] and add > the installation path for icu libraires in config.pl like, > > icu => 'E:\Users\pg\icu', > > [1]-

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Joe Conway
On 06/12/2017 01:49 AM, Amit Langote wrote: >> On Sun, Jun 11, 2017 at 5:02 PM, Dean Rasheed >> wrote: >>> It looks like relation_is_updatable() didn't get the message about >>> partitioned tables. Thus, for example, information_schema.views and >>>

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-06-12 Thread Tom Lane
"Daniel Verite" writes: > PGC_POSTMASTER implies that it's an instance-wide setting. > Is is intentional? I can understand that it's more secure for this not to > be changeable in an existing session, but it's also much less usable if you > can't set it per-database and

Re: [HACKERS] Disallowing multiple queries per PQexec()

2017-06-12 Thread Daniel Verite
Surafel Temesgen wrote: > I modified the patch as such and added to commitfest 2017-07. A couple comments: + {"disallow_multiple_queries", PGC_POSTMASTER, CLIENT_CONN_OTHER, + gettext_noop("Disallow multiple queries per query string."), +

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-06-12 Thread Amit Kapila
On Mon, Jun 12, 2017 at 6:31 AM, Mithun Cy wrote: > Thanks, Amit, > + /* Perform autoprewarm's task. */ + if (todo_task == TASK_PREWARM_BUFFERPOOL && + !state->skip_prewarm_on_restart) Why have you removed above comment in the new patch? I am not pointing this

Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is coming for table which is already removed

2017-06-12 Thread Masahiko Sawada
On Mon, Jun 12, 2017 at 9:56 PM, Peter Eisentraut wrote: > On 6/11/17 21:40, Masahiko Sawada wrote: >> Thank you for the patch. The patch fixes this issue but it takes a >> long time to done ALTER SUBSCRIPTION SET PUBLICATION when >>

Re: [HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-06-12 Thread Ashutosh Bapat
On Mon, Jun 12, 2017 at 3:50 PM, amul sul wrote: > On Wed, May 17, 2017 at 10:22 PM, Robert Haas wrote: > [...] >> I committed this with fixes for those issues, plus I renamed the macro >> to partition_bound_accepts_nulls, which I think is more clear. >>

Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is coming for table which is already removed

2017-06-12 Thread Peter Eisentraut
On 6/11/17 21:40, Masahiko Sawada wrote: > Thank you for the patch. The patch fixes this issue but it takes a > long time to done ALTER SUBSCRIPTION SET PUBLICATION when > max_sync_workers_per_subscription is set high value. Because the > removing entry from pg_subscription_rel and launching a new

Re: [HACKERS] Why restore_command is called for existing files in pg_xlog?

2017-06-12 Thread Alex Kliukin
On Fri, Jun 2, 2017, at 11:51 AM, Alexander Kukushkin wrote: > Hello hackers, > There is one strange and awful thing I don't understand about > restore_command: it is always being called for every single WAL > segment postgres wants to apply (even if such segment already exists > in pg_xlog) until

Re: [HACKERS] oidin / oidout and InvalidOid

2017-06-12 Thread Andreas Karlsson
On 06/12/2017 01:41 PM, Chapman Flack wrote: I was recently guilty of writing a less-than-clear SQL example because I plain forgot whether InvalidOid was 0 (correct) or -1 (my bad). Would there be any sense in letting oidin_subr accept the string InvalidOid for 0? I understand that changing

[HACKERS] Dropping partitioned table drops a previously detached partition

2017-06-12 Thread Ashutosh Bapat
Hi, If we detach a partition and drop the corresponding partitioned table, it drops the once-partition now-standalone table as well. create table prt1 (a int, b int) partition by range(a); create table prt1_p1 partition of prt1 for values from (0) to (100); select oid, relname, relpartbound,

[HACKERS] oidin / oidout and InvalidOid

2017-06-12 Thread Chapman Flack
Hi, I was recently guilty of writing a less-than-clear SQL example because I plain forgot whether InvalidOid was 0 (correct) or -1 (my bad). Would there be any sense in letting oidin_subr accept the string InvalidOid for 0? I understand that changing oidout could break existing code outside of

Re: [HACKERS] Statement-level rollback

2017-06-12 Thread Simon Riggs
On 1 March 2017 at 16:05, Tom Lane wrote: > Peter Eisentraut writes: >> On 2/28/17 08:17, Tom Lane wrote: >>> I do not really see how this would ever get past the compatibility >>> problems that forced us to give up on server-side autocommit

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-06-12 Thread Alexey Kondratov
Thank you for your comments Peter, there are some points that I did not think about before.On 9 Jun 2017, at 01:09, Peter Geoghegan wrote:Adding a full support of ON CONFLICT DO NOTHING/UPDATE to COPY seemsto be a large separated task and is out of the current project scope,

Re: [HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-06-12 Thread amul sul
On Wed, May 17, 2017 at 10:22 PM, Robert Haas wrote: [...] > I committed this with fixes for those issues, plus I renamed the macro > to partition_bound_accepts_nulls, which I think is more clear. > partition_bound_accepts_nulls() will alway yield true for a range

Re: [HACKERS] Broken hint bits (freeze)

2017-06-12 Thread Amit Kapila
On Sun, Jun 11, 2017 at 11:59 PM, Vladimir Borodin wrote: > > 8 июня 2017 г., в 17:03, Amit Kapila написал(а): > > On Thu, Jun 8, 2017 at 6:49 PM, Dmitriy Sarafannikov > wrote: > > > Why didn't rsync made the copies on master

Re: [HACKERS] Statement-level rollback

2017-06-12 Thread Ideriha, Takeshi
Hello, This feature hasn't been updated for a long time, but I've just been interested in this feature and looking into the mailing list. From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] > In short, you can't make fundamental changes in transactional behavior without > enormous

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Ashutosh Sharma
Hi, On Mon, Jun 12, 2017 at 12:18 PM, Michael Paquier wrote: > On Sat, Jun 10, 2017 at 6:40 PM, Ashutosh Sharma > wrote: >> Currently, we cannot perform ICU enabled build for postgres on Windows >> platform. However, this can be done on Linux

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Amit Langote
> On Sun, Jun 11, 2017 at 5:02 PM, Dean Rasheed > wrote: >> Hi, >> >> It looks like relation_is_updatable() didn't get the message about >> partitioned tables. Thus, for example, information_schema.views and >> information_schema.columns report that simple views built

Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()

2017-06-12 Thread Ashutosh Bapat
On Sun, Jun 11, 2017 at 5:02 PM, Dean Rasheed wrote: > Hi, > > It looks like relation_is_updatable() didn't get the message about > partitioned tables. Thus, for example, information_schema.views and > information_schema.columns report that simple views built on top of >

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-06-12 Thread Amit Langote
On 2017/06/09 20:49, Ashutosh Bapat wrote: > May be we should pass a flag to predicate_implied_by() to handle NULL > behaviour for CHECK constraints. Partitioning has shown that it needs > to use predicate_implied_by() for comparing constraints and there may > be other cases that can come up in

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-06-12 Thread Amit Langote
On 2017/06/09 20:47, Ashutosh Bapat wrote: > Thanks for the long explanation. I guess, this should be written in > comments somewhere in the code there. I see following comment in > ATExecAttachPartition() > -- > * > * There is a case in which we cannot rely on just the result of the >

Re: [HACKERS] Why forcing Hot_standby_feedback to be enabled when creating a logical decoding slot on standby

2017-06-12 Thread Michael Paquier
On Mon, Jun 12, 2017 at 3:16 PM, sanyam jain wrote: > I have created a logical decoding slot on a standby but i haven't enabled > Hot_standby_feedback.What are the test cases where this setup will fail? hot_standby_feedback needs to be enabled at all times in logical

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Michael Paquier
On Sat, Jun 10, 2017 at 6:40 PM, Ashutosh Sharma wrote: > Currently, we cannot perform ICU enabled build for postgres on Windows > platform. However, this can be done on Linux platforms using > '--with-icu' configuration parameter. Attached is the patch that > allows us to

Re: [HACKERS] Adding support for Default partition in partitioning

2017-06-12 Thread Jeevan Ladhe
On Mon, Jun 12, 2017 at 9:39 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > While the refactoring seems a reasonable way to re-use existing code, > that may change based on the discussion in [1]. Till then please keep > the refactoring patches separate from the main patch. In the

[HACKERS] Why forcing Hot_standby_feedback to be enabled when creating a logical decoding slot on standby

2017-06-12 Thread sanyam jain
Hi, I have created a logical decoding slot on a standby but i haven't enabled Hot_standby_feedback.What are the test cases where this setup will fail? Thanks, Sanyam Jain