Re: PG11 Hash partitioning and null values in the partition key

2018-07-13 Thread Daniel Westermann
Hi, given this setup: create table part2 ( a int, list varchar(10) ) partition by hash (a); create table part2_1 partition of part2 FOR VALUES WITH (MODULUS 3, REMAINDER 0); create table part2_2 partition of part2 FOR VALUES WITH (MODULUS 3, REMAINDER 1); create table part2_3 partition

Re: ODBC - Getting CONN ERROR: errmsg='The buffer was too small for the InfoValue'

2018-07-13 Thread Edgard Battisti Guimarães
Ok, Done! thanks for you help Em sex, 13 de jul de 2018 às 10:29, Adrian Klaver escreveu: > On 07/12/2018 04:56 PM, Edgard Battisti Guimarães wrote: > > --- The ODBC Global tracing was turned on too but any one entry was made > > from the powerbuilder app. > > > > --- No problem on sending the

Re: ERROR: found multixact from before relminmxid

2018-07-13 Thread Alvaro Herrera
On 2018-Jul-13, Sean McIntyre wrote: > Quick correction :) > > I am running PostgreSQL *9.6.8* on AWS RDS. I'm going to try to pg-repack > the table and will look to upgrade to *9.6.9* (though it's not presently > available on RDS). Yay RDS ... -- Álvaro Herrera

Re: ERROR: found multixact from before relminmxid

2018-07-13 Thread Sean McIntyre
Quick correction :) I am running PostgreSQL *9.6.8* on AWS RDS. I'm going to try to pg-repack the table and will look to upgrade to *9.6.9* (though it's not presently available on RDS). Sean On Fri, Jul 13, 2018 at 11:14 AM Sean McIntyre < sean.mcint...@warbyparker.com> wrote: > Dear all, > >

Re: PG11 Hash partitioning and null values in the partition key

2018-07-13 Thread amul sul
On Fri, Jul 13, 2018, 7:35 PM Daniel Westermann < daniel.westerm...@dbi-services.com> wrote: > Hi, > > given this setup: > > create table part2 ( a int, list varchar(10) ) partition by hash (a); > create table part2_1 partition of part2 FOR VALUES WITH (MODULUS 3, > REMAINDER 0); > create table

Re: Read only to schema

2018-07-13 Thread Łukasz Jarych
I found something like this: CREATE ROLE readonly_user WITH LOGIN ENCRYPTED PASSWORD '1234' ALTER ROLE readonly_user SET search_path to public GRANT CONNECT ON DATABASE "TestDb" TO readonly_user; GRANT USAGE ON SCHEMA public TO readonly_user; GRANT USAGE ON

RE: Monitor repl slot size

2018-07-13 Thread Igor Neyman
From: Nicola Contu [mailto:nicola.co...@gmail.com] Sent: Friday, July 13, 2018 6:19 AM To: pgsql-general@lists.postgresql.org Cc: Alessandro Aste Subject: Monitor repl slot size Hello, we used to monitor the replication slot size on postgres 9.6.6 with the following query: SELECT

AW: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread kpi6288
> -Ursprüngliche Nachricht- > Von: Tom Lane > > > If you're an server admin you can disable the extension (editing > > shared_pre_load_libraries GUC), change password and then enable the > > extension again... I am aware of this and all the other points. > Or more to the point:

PG11 Hash partitioning and null values in the partition key

2018-07-13 Thread Daniel Westermann
Hi, given this setup: create table part2 ( a int, list varchar(10) ) partition by hash (a); create table part2_1 partition of part2 FOR VALUES WITH (MODULUS 3, REMAINDER 0); create table part2_2 partition of part2 FOR VALUES WITH (MODULUS 3, REMAINDER 1); create table part2_3 partition of

Re: Handlind booleans Postgresql-Access

2018-07-13 Thread Łukasz Jarych
Hmm so maybe better is use text field here Best, Jacek pt., 13 lip 2018 o 15:36 Adrian Klaver napisał(a): > On 07/13/2018 02:19 AM, Łukasz Jarych wrote: > > Hi Guys, > > > > i created boolean in postgresql table (in attachment) but linked table > > in Access see this as short text. > > > >

Re: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread Guillaume Lelarge
2018-07-13 15:19 GMT+02:00 Fabrízio de Royes Mello : > > 2018-07-13 9:01 GMT-03:00 Guillaume Lelarge : > >> 2018-07-13 13:57 GMT+02:00 : >> >>> I’d like to disable the TRUST authentication method for certain servers >>> where modification of pg_hba.conf and restarting a service is fairly easy

Re: Optimizing execution of expensive subqueries

2018-07-13 Thread Mathieu Fenniak
Hi Hellmuth, Thanks for the response and the new approach; a LATERAL JOIN is new to me. Unfortunately it seems to have the same performance characteristics and query plan. The aggregation in the lateral join still executes for every row (eg. if my base query has 50 rows, I get "Aggregate

Re: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread Fabrízio de Royes Mello
2018-07-13 9:01 GMT-03:00 Guillaume Lelarge : > 2018-07-13 13:57 GMT+02:00 : > >> I’d like to disable the TRUST authentication method for certain servers >> where modification of pg_hba.conf and restarting a service is fairly easy >> for a number of users. >> >> >> >> I looked at this example

AW: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread kpi6288
> I'm not sure this is such a good idea. You may need the trust authentication > method, > for example if you forgot the superuser password. Otherwise, there's good > chance > you might use the ClientAuthentication hook to do what you want. Thanks for your feedback. Klaus

Re: Database Refresh confusion

2018-07-13 Thread Andreas Kretschmer
Am 13.07.2018 um 13:10 schrieb Rijo Roy: Hello Experts, Today, my colleague asked me if there was any way to check the progress of recovery (backup-recovery) in Postgresql. I told him to check the postgresql logs and look out for keywords such as recovery. He was refreshing the database

Re: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread Guillaume Lelarge
2018-07-13 13:57 GMT+02:00 : > I’d like to disable the TRUST authentication method for certain servers > where modification of pg_hba.conf and restarting a service is fairly easy > for a number of users. > > > > I looked at this example https://wiki.postgresql.org/images/e/e3/Hooks_in_ >

Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread kpi6288
I'd like to disable the TRUST authentication method for certain servers where modification of pg_hba.conf and restarting a service is fairly easy for a number of users. I looked at this example https://wiki.postgresql.org/images/e/e3/Hooks_in_postgresql.pdf It appears that creating a

Database Refresh confusion

2018-07-13 Thread Rijo Roy
Hello Experts,  Today, my colleague asked me if there was any way to check the progress of recovery (backup-recovery) in Postgresql. I told him to check the postgresql logs and look out for keywords such as recovery. He was refreshing the database by restoring a database backup but the method

Re: Read only to schema

2018-07-13 Thread Łukasz Jarych
Maybe read-only view? Best, Jacek pt., 13 lip 2018 o 07:00 Łukasz Jarych napisał(a): > Hi Guys, > > Yesterday i tried all day to figure out system to read only schemas. > > I want to : > > 1. Create user who can login (user: jaryszek) > 2. Create role who can read only data (only watching

Re: Monitor repl slot size

2018-07-13 Thread Achilleas Mantzios
On 13/07/2018 13:19, Nicola Contu wrote: Hello, we used to monitor the replication slot size on postgres 9.6.6 with the following query: SELECT pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) FROM pg_replication_slots WHERE slot_name = 'SLOT NAME'; We are moving to postgres

Monitor repl slot size

2018-07-13 Thread Nicola Contu
Hello, we used to monitor the replication slot size on postgres 9.6.6 with the following query: SELECT pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn) FROM pg_replication_slots WHERE slot_name = 'SLOT NAME'; We are moving to postgres 10.4 and we saw the pg_xlog_location_diff is

Re: Create event triger

2018-07-13 Thread Łukasz Jarych
Hi Guys, sorry for my late answer. I tested this today and working like a charm! You are brilliant ! thank you, saved my ass! Best, Jacek śr., 11 lip 2018 o 10:30 Ken Tanzer napisał(a): > > > On Tue, Jul 10, 2018 at 5:45 PM Adrian Klaver > wrote: > >> select add_trigger('trg_test'); >> >>

Handlind booleans Postgresql-Access

2018-07-13 Thread Łukasz Jarych
Hi Guys, i created boolean in postgresql table (in attachment) but linked table in Access see this as short text. I checked in odbc option Bools as Char to false and True is -1 as true.but still tihs is not working. I found linke here:

Re: Using always genereted

2018-07-13 Thread Łukasz Jarych
Hi, thank you. I think that i have to add sequance here... Best, Jacek pt., 13 lip 2018 o 09:50 Guillaume Lelarge napisał(a): > Hi, > > 2018-07-13 9:29 GMT+02:00 Łukasz Jarych : > >> hi, >> >> i am trying to alter table : >> >> ALTER TABLE logging.t_history >> alter column "id" GENERATED

Re: Using always genereted

2018-07-13 Thread Guillaume Lelarge
Hi, 2018-07-13 9:29 GMT+02:00 Łukasz Jarych : > hi, > > i am trying to alter table : > > ALTER TABLE logging.t_history > alter column "id" GENERATED ALWAYS AS IDENTITY PRIMARY KEY, > > but this is not working. Error i have. > > How to change this properly? > > Which error message do you get?

Using always genereted

2018-07-13 Thread Łukasz Jarych
hi, i am trying to alter table : ALTER TABLE logging.t_history alter column "id" GENERATED ALWAYS AS IDENTITY PRIMARY KEY, but this is not working. Error i have. How to change this properly? Best, Jacek