[HACKERS] Any need of GRANT/REVOKE CREATE TABLE | POLICY | ETC

2016-07-19 Thread Haribabu Kommi
Hi All, During the discussion of supporting multi tenancy with the help of row level security, because of some problems of executing any policy that was created by an unprivileged user [1]. To avoid that problem, If we have some kind of new mechanism to GRANT/REVOKE only CREATE POLICY from all

[HACKERS] Adjust recovery test file name

2016-07-19 Thread Masahiko Sawada
Hi all, The file 006_logical_decoding_timelines.pl was removed by the commit c1543a8. But currently 005_***.pl and 007_***.pl exist on source tree. Should we change its file number to 006? Please find attached patch renames 007_sync_rep.pl to 006_sync_rep.pl. Regards, -- Masahiko Sawada

Re: [HACKERS] Declarative partitioning

2016-07-19 Thread Ashutosh Bapat
I am seeing following warning with this set of patches. gram.y:4734:24: warning: assignment from incompatible pointer type [enabled by default] On Tue, Jul 5, 2016 at 10:18 AM, Amit Langote wrote: > On 2016/07/04 21:31, Ashutosh Bapat wrote: > > Hi Amit, > > I

Re: [HACKERS] sslmode=require fallback

2016-07-19 Thread Magnus Hagander
On Sun, Jul 17, 2016 at 10:07 PM, Christoph Berg wrote: > Re: Peter Eisentraut 2016-07-17 < > d6b22200-0e65-d17e-b227-b63d81720...@2ndquadrant.com> > > On 7/15/16 3:07 PM, Andrew Dunstan wrote: > > > Do those packagers who install dummy certificates and turn SSL on also > > >

Re: [HACKERS] One process per session lack of sharing

2016-07-19 Thread AMatveev
Hi > Using TLS will slow down things noticeably though. So if we were to go > there, we'd have to make up for some constant slowdown. I can not understand why? I've read https://msdn.microsoft.com/en-us/library/windows/desktop/ms686749(v=vs.85).aspx and

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-07-19 Thread Amit Kapila
On Tue, Jul 19, 2016 at 10:43 AM, Michael Paquier wrote: > On Sat, Jul 16, 2016 at 9:20 PM, Amit Kapila wrote: >> On Wed, Jul 13, 2016 at 8:56 AM, Michael Paquier >> wrote: >>> Another way that just popped into my

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2016-07-19 Thread Ashutosh Bapat
Sorry forgot to mention: this patch applies on top of the v7 patches posted by Amit Langote on 27th June ( https://www.postgresql.org/message-id/81371428-bb4b-1e33-5ad6-8c5c51b52cb7%40lab.ntt.co.jp ). On Tue, Jul 19, 2016 at 7:41 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > >

Re: [HACKERS] Updating our timezone code in the back branches

2016-07-19 Thread Magnus Hagander
On Mon, Jul 18, 2016 at 9:09 PM, Tom Lane wrote: > When I updated our copy of the IANA timezone library back in March > (commit 1c1a7cbd6), I noted that we ought to consider back-patching > those changes once they'd settled out in HEAD. Now that the code > has survived a

Re: [HACKERS] Updating our timezone code in the back branches

2016-07-19 Thread Greg Stark
On Mon, Jul 18, 2016 at 8:09 PM, Tom Lane wrote: > There are also several bug fixes that affect interpretation of dates after > 2037, a year that's getting closer all the time. Does this represent a data incompatibility for databases that could contain such dates already?

Re: [HACKERS] Updating our timezone code in the back branches

2016-07-19 Thread Tom Lane
Magnus Hagander writes: > On Mon, Jul 18, 2016 at 9:09 PM, Tom Lane wrote: >> So I think it behooves us to apply these changes to the back branches >> while we can still do it in a leisurely fashion, rather than waiting >> until our hands are forced. I'd

Re: [HACKERS] Updating our timezone code in the back branches

2016-07-19 Thread Tom Lane
Greg Stark writes: > On Mon, Jul 18, 2016 at 8:09 PM, Tom Lane wrote: >> There are also several bug fixes that affect interpretation of dates after >> 2037, a year that's getting closer all the time. > Does this represent a data incompatibility for databases

Re: [HACKERS] One process per session lack of sharing

2016-07-19 Thread Robert Haas
On Mon, Jul 18, 2016 at 8:56 PM, Craig Ringer wrote: > Since I got started with Pg, I've taken it as given that PostgreSQL Will > Never Use Threads, Don't Even Talk About It. As taboo as query hints or more > so. Is this actually a serious option? I'm sure that depends on

Re: [HACKERS] sslmode=require fallback

2016-07-19 Thread Peter Eisentraut
On 7/19/16 10:00 AM, Magnus Hagander wrote: > What could actually be useful there is to explicitly put hostnossl on > the localhost entries. With the current defaults on the clients, that > wouldn't break anything, and it would leave people without the > performance issues that you run into in the

Re: [HACKERS] One process per session lack of sharing

2016-07-19 Thread Andres Freund
On 2016-07-19 14:18:22 +0300, amatv...@bitec.ru wrote: > Hi > > > > Using TLS will slow down things noticeably though. So if we were to go > > there, we'd have to make up for some constant slowdown. > I can not understand why? > > I've read >

Re: [HACKERS] sslmode=require fallback

2016-07-19 Thread Christoph Berg
Makes sense. Is this something that should be implemented in postgresql, or via pg_createcluster? Am 19. Juli 2016 16:00:05 MESZ, schrieb Magnus Hagander : >On Sun, Jul 17, 2016 at 10:07 PM, Christoph Berg >wrote: > >> Re: Peter Eisentraut 2016-07-17 < >>

Re: [HACKERS] sslmode=require fallback

2016-07-19 Thread Magnus Hagander
On Tue, Jul 19, 2016 at 8:53 PM, Christoph Berg wrote: > Makes sense. Is this something that should be implemented in postgresql, > or via pg_createcluster? > > Personally I'd like to see pg_createcluster et al mimic upstream as close as possible, so I'd advocate these changes

[HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-07-19 Thread Noah Misch
On Tue, Jul 19, 2016 at 06:09:59PM -0500, Kevin Grittner wrote: > On Mon, Jul 18, 2016 at 9:10 PM, Noah Misch wrote: > > On Sat, Jul 16, 2016 at 06:48:08PM -0400, Noah Misch wrote: > >> This PostgreSQL 9.6 open item is past due for your status update. Kindly > >> send > >> a

[HACKERS] Question about an inconsistency - 2

2016-07-19 Thread pet...@gmail.com
Hi, In file postgresql-9.4.4/src/backend/utils/adt/format_type.c function format_type_internal line 159, shouldn’t be used array_base_type instead of type_oid? In line 153 it is searched for array_base_type and thus shouldn’t we use it (ie., array_base_type) to report that the type is not found.

[HACKERS] Question about an inconsistency - 3

2016-07-19 Thread pet...@gmail.com
Hi, In file postgres/postgresql-9.4.4/src/timezone/zic.c function stringzone line 2091we have if (stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff) != 0) Is it ok to have as the 3rd argument dstrp->r_stdoff or should we have stdrp->r_stdoff? In line 2085 dstrp is used in both arguments.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-07-19 Thread Amit Kapila
On Wed, Jul 20, 2016 at 5:02 AM, Andres Freund wrote: > On 2016-07-19 18:09:59 -0500, Kevin Grittner wrote: >> As far as I can see, to do this the way that Andres and Amit >> suggest involves tying in to indexam.c and other code in incredibly >> ugly ways. > > Could you

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-07-19 Thread Andres Freund
On July 19, 2016 7:14:42 PM PDT, Amit Kapila wrote: >On Wed, Jul 20, 2016 at 5:02 AM, Andres Freund >wrote: >> On 2016-07-19 18:09:59 -0500, Kevin Grittner wrote: >>> As far as I can see, to do this the way that Andres and Amit >>> suggest involves

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-07-19 Thread Amit Kapila
On Wed, Jul 20, 2016 at 7:57 AM, Andres Freund wrote: > > > On July 19, 2016 7:14:42 PM PDT, Amit Kapila wrote: >>On Wed, Jul 20, 2016 at 5:02 AM, Andres Freund >>wrote: >>> On 2016-07-19 18:09:59 -0500, Kevin Grittner wrote:

[HACKERS] (re)start in our init scripts seems broken

2016-07-19 Thread Tomas Vondra
Hi, A few days ago I ran into a problem with the init script packaged in our community RPM packages. What happened was that they initiated a restart, but this happened: # /etc/init.d/postgresql-9.3 restart Stopping postgresql-9.3 service: [FAILED] Starting

Re: [HACKERS] plperl loading files

2016-07-19 Thread Peter Eisentraut
On 7/16/16 5:03 PM, Jeff Janes wrote: > If you really want to suppress this per-backend activity, you can > pre-emptively load the modules yourself with something like: > > plperl.on_init ='require Carp; require Carp::Heavy; require feature;' > > But, I don't see why that should be necessary.

Re: [HACKERS] Question about an inconsistency - 3

2016-07-19 Thread Tom Lane
"pet...@gmail.com" writes: > In file postgres/postgresql-9.4.4/src/timezone/zic.c > function stringzone line 2091we have > if (stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff) != 0) > Is it ok to have as the 3rd argument dstrp->r_stdoff or should we > have

Re: [HACKERS] (re)start in our init scripts seems broken

2016-07-19 Thread Michael Paquier
On Wed, Jul 20, 2016 at 11:41 AM, Tomas Vondra wrote: > Is there a reason why it's coded like this? I think we should use the pg_ctl > instead or (at the very least) check the postmaster return code. Also, > perhaps we should add an explicit timeout, higher than 60

Re: [HACKERS] Question about an inconsistency - 2

2016-07-19 Thread Tom Lane
"pet...@gmail.com" writes: > In file postgresql-9.4.4/src/backend/utils/adt/format_type.c > function format_type_internal line 159, shouldn’t be used > array_base_type instead of type_oid? IIRC, that was intentional. Supposing there's a pg_type row with a corrupted typelem

Re: [HACKERS] Adjust recovery test file name

2016-07-19 Thread Alvaro Herrera
Masahiko Sawada wrote: > Hi all, > > The file 006_logical_decoding_timelines.pl was removed by the commit c1543a8. > But currently 005_***.pl and 007_***.pl exist on source tree. > Should we change its file number to 006? I don't think we need to bother about this. Whenever somebody submits a

[HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-07-19 Thread Kevin Grittner
On Mon, Jul 18, 2016 at 9:10 PM, Noah Misch wrote: > On Sat, Jul 16, 2016 at 06:48:08PM -0400, Noah Misch wrote: >> On Wed, Jul 13, 2016 at 03:57:02PM -0500, Kevin Grittner wrote: >>> On Wed, Jul 13, 2016 at 12:48 PM, Andres Freund wrote: On 2016-07-13

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-07-19 Thread Michael Paquier
On Tue, Jul 19, 2016 at 9:08 PM, Amit Kapila wrote: > On Tue, Jul 19, 2016 at 10:43 AM, Michael Paquier > wrote: >> On Sat, Jul 16, 2016 at 9:20 PM, Amit Kapila wrote: >>> On Wed, Jul 13, 2016 at 8:56 AM, Michael

Re: [HACKERS] An unlikely() experiment

2016-07-19 Thread Andres Freund
On 2015-12-20 14:21:14 +1300, David Rowley wrote: > On 20 December 2015 at 03:06, Andres Freund wrote: > > One way to do this would be to add elog_on() / ereport_on() macros, > > directly containing the error message. Like > > #define elog_on(cond, elevel, ...) \ > >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-07-19 Thread Andres Freund
On 2016-07-19 18:09:59 -0500, Kevin Grittner wrote: > As far as I can see, to do this the way that Andres and Amit > suggest involves tying in to indexam.c and other code in incredibly > ugly ways. Could you explain the problem you're seing? Isn't pretty much all all that we need to do: 1) add a

Re: [HACKERS] Document that vacuum can't truncate if old_snapshot_threshold >= 0

2016-07-19 Thread Kevin Grittner
On Wed, Jul 13, 2016 at 4:14 PM, Andres Freund wrote: > Currently, if old_snapshot_threshold is enabled, vacuum is prevented > from truncating tables: > static bool > should_attempt_truncation(LVRelStats *vacrelstats) > { > BlockNumber possibly_freeable; > >

Re: [HACKERS] sslmode=require fallback

2016-07-19 Thread Peter Eisentraut
On 7/19/16 3:32 PM, Magnus Hagander wrote: > There are definitely cases where it's useful. I'm only arguing for > changing the default. I don't understand why you want to change the default. Is it for performance? Has it been measured? -- Peter Eisentraut

Re: [HACKERS] sslmode=require fallback

2016-07-19 Thread Magnus Hagander
On Tue, Jul 19, 2016 at 9:24 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 7/19/16 10:00 AM, Magnus Hagander wrote: > > What could actually be useful there is to explicitly put hostnossl on > > the localhost entries. With the current defaults on the clients, that > >