Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Muthukumar.GK
Yes. I restarted (Run->Services.msc->Postgresql13->Restart) after config file. I can able to connect my postgres server using .net application with help of below connection string. NpgsqlConnectionconn =newNpgsqlConnection("Server=127.0.0.1;User Id=postgres; "+ "Password=Postgresql@1;

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
Did you restart postgres after changing pg_hba.conf? On Sat, Dec 5, 2020 at 11:56 AM Muthukumar.GK wrote: > Hi Nicklas, > > I have added a line "host all all 0.0.0.0/0 md5" in > Pg_hba_conf.sample file and restarted postgres server. porstgres port has > been added in windows firewall (Windo

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Muthukumar.GK
Hi Nicklas, I have added a line "host all all 0.0.0.0/0 md5" in Pg_hba_conf.sample file and restarted postgres server. porstgres port has been added in windows firewall (Windows10)as well. But my colleague is still facing the below error when connecting my postgres server from .net appplicat

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
lol. Been there. Done that On Sat, Dec 5, 2020 at 1:36 AM Nicklas Avén wrote: > > > On 4 December 2020 17:17:48 CET, Adrian Klaver > wrote: > >On 12/4/20 8:03 AM, Paul Förster wrote: > >> Hi Adrian, > >> > >>> On 04. Dec, 2020, at 16:13, Adrian Klaver > > wrote: > >>> That is the wrong file, th

Extended statistics for correlated columns, row estimates when values are not in MCVs list

2020-12-04 Thread Michael Lewis
On version 12.5, I have a query similar to the below where I am getting rather unfortunate row estimates and a sub-optimal index choice as a result. SELECT id FROM messages WHERE client_id = 1234 and site_id = 889977 and message_type_id in ( 59, 62, 102, 162 ) and sent_on > NOW() - INT

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Nicklas Avén
On 4 December 2020 17:17:48 CET, Adrian Klaver wrote: >On 12/4/20 8:03 AM, Paul Förster wrote: >> Hi Adrian, >> >>> On 04. Dec, 2020, at 16:13, Adrian Klaver > wrote: >>> That is the wrong file, the *.sample is the giveaway. >> >> hmmm, I'd rather call it essential reference documentation or

Re: Alter the column data type of the large data volume table.

2020-12-04 Thread Olivier Gautherot
On Fri, Dec 4, 2020 at 5:22 PM Michael Lewis wrote: > > On Fri, Dec 4, 2020 at 9:04 AM Kevin Brannen wrote: > >> *>From:* Olivier Gautherot >> >> >>5) If you're brave enough, convert your current table as a partition >> (rename it to something like table_hist), duplicate the table model under >

Re: Alter the column data type of the large data volume table.

2020-12-04 Thread Michael Lewis
On Fri, Dec 4, 2020 at 9:04 AM Kevin Brannen wrote: > *>From:* Olivier Gautherot > > >>5) If you're brave enough, convert your current table as a partition > (rename it to something like table_hist), duplicate the table model under > the same name as now (adjusting the primary key type) and set

Re: Set COLLATE on a session level

2020-12-04 Thread Tom Lane
Peter Eisentraut writes: > On 2020-11-20 08:13, Dirk Mika wrote: >> I know that I can specify a COLLATE for a SELECT statement in the ORDER BY >> Clause, but then I would have to adjust the statements in the client and >> statements that are automatically generated by the database components use

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Adrian Klaver
On 12/4/20 8:03 AM, Paul Förster wrote: Hi Adrian, On 04. Dec, 2020, at 16:13, Adrian Klaver wrote: That is the wrong file, the *.sample is the giveaway. hmmm, I'd rather call it essential reference documentation or template for automation. It's perfectly well suited to automatically strip

RE: Alter the column data type of the large data volume table.

2020-12-04 Thread Kevin Brannen
>From: Olivier Gautherot >>5) If you're brave enough, convert your current table as a partition (rename >>it to something like table_hist), duplicate the table model under the same >>name as now (adjusting the primary key type) and set the INHERITS on the >>primary key range. The inheritance s

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Paul Förster
Hi Adrian, > On 04. Dec, 2020, at 16:13, Adrian Klaver wrote: > That is the wrong file, the *.sample is the giveaway. hmmm, I'd rather call it essential reference documentation or template for automation. It's perfectly well suited to automatically strip all comments and then diff the result t

Re: Set COLLATE on a session level

2020-12-04 Thread Peter Eisentraut
On 2020-11-20 08:13, Dirk Mika wrote: we come from the Oracle world and we have an application that, depending on a setting, sends the command ALTER SESSION SET NLS_SORT=... when connecting to the database. Is there a similar way to set a COLLATE for a session in PostgreSQL? I know that I can

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Adrian Klaver
On 12/4/20 2:27 AM, Muthukumar.GK wrote: Hi Team, I have created Database in postgresqlv13 . My Office colleague needs to access my postgres server and database from his machine. There is a config file called 'Postgresql.conf.sample' in program files folder. That is the wrong file, the *.sam

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Tim Clarke
On 04/12/2020 12:56, Hemil Ruparel wrote: I dont think you can use pgAdmin to do that kind of thing but I may be wrong. Google how to restart a service in Windows and then restart postgres On Fri, Dec 4, 2020 at 5:36 PM Muthukumar.GK mailto:muthanku...@gmail.com>> wrote: No.I did not restart pos

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
I dont think you can use pgAdmin to do that kind of thing but I may be wrong. Google how to restart a service in Windows and then restart postgres On Fri, Dec 4, 2020 at 5:36 PM Muthukumar.GK wrote: > No.I did not restart postgres.Please let me know the steps to restart > postgres using pgadmin4

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Muthukumar.GK
No.I did not restart postgres.Please let me know the steps to restart postgres using pgadmin4 tool. On Fri, Dec 4, 2020 at 5:26 PM Hemil Ruparel wrote: > Are you sure you restarted postgres after the change in configuration? > > On Fri, Dec 4, 2020 at 3:58 PM Muthukumar.GK > wrote: > >> Hi Team

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
Are you sure you restarted postgres after the change in configuration? On Fri, Dec 4, 2020 at 3:58 PM Muthukumar.GK wrote: > Hi Team, > > I have created Database in postgresqlv13 . My Office colleague needs to > access my postgres server and database from his machine. There is a config > file ca

Re: postgres-10 with FIPS

2020-12-04 Thread Aravindhan Krishnan
Hi Michael, Thanks for the quick response. I will try this out. Would it be possible to share the configure command used in building the standard postgres package. There are quite a lot of knobs and we wanted to retain the same behaviour from postgres. I am assuming apart from this, I might need

Re: Alter the column data type of the large data volume table.

2020-12-04 Thread charles meng
Hi Olivier, My PG version is 10. Anyway, thanks a lot for your help. Best regards. Olivier Gautherot 于2020年12月4日周五 下午6:14写道: > Hi Charles, > On 04-12-2020 9:44, Olivier Gautherot wrote: > > Hi Charles, > > On Fri, Dec 4, 2020 at 9:12 AM charles meng wrote: > >> What I mean is that it will tak

Re: Number of parallel workers chosen by the optimizer for parallel append

2020-12-04 Thread Laurenz Albe
On Wed, 2020-11-25 at 17:36 +0100, Laurenz Albe wrote: > I have a partitioned table, each partition has "parallel_workers = 10" set. > > SET max_parallel_workers_per_gather = 8; > > SET enable_partitionwise_aggregate = on; > > EXPLAIN (COSTS OFF) > SELECT applicant_name, count(ipc_4) >

Accessing Postgres Server and database from other Machine

2020-12-04 Thread Muthukumar.GK
Hi Team, I have created Database in postgresqlv13 . My Office colleague needs to access my postgres server and database from his machine. There is a config file called 'Postgresql.conf.sample' in program files folder. Even if I changed the connection settings of listen address from localhost to *(

Re: Alter the column data type of the large data volume table.

2020-12-04 Thread Olivier Gautherot
Hi Charles, On 04-12-2020 9:44, Olivier Gautherot wrote: Hi Charles, On Fri, Dec 4, 2020 at 9:12 AM charles meng mailto:xly...@gmail.com>> wrote: What I mean is that it will take a lot of time to complete all data processing.I have to say that it is a good solution to adjust the co

Re: psql > split > queries & output

2020-12-04 Thread Wim Bertels
Daniel Verite schreef op do 03-12-2020 om 16:32 [+0100]: > Wim Bertels wrote: > > > but interactively this doesn't seem to work > > Interactively something like this might do the job: > > $ PSQL_HISTORY=/tmp/queries.txt psql -L /tmp/logfile.txt > > After running some queries, and a clea

Re: Alter the column data type of the large data volume table.

2020-12-04 Thread Olivier Gautherot
Hi Charles, On Fri, Dec 4, 2020 at 9:12 AM charles meng wrote: > What I mean is that it will take a lot of time to complete all data > processing.I have to say that it is a good solution to adjust the column > type without affecting online users. > > I found a tool on github, see the link below,

Re: Alter the column data type of the large data volume table.

2020-12-04 Thread charles meng
What I mean is that it will take a lot of time to complete all data processing.I have to say that it is a good solution to adjust the column type without affecting online users. I found a tool on github, see the link below, unfortunately, this is for MySQL... https://github.com/github/gh-ost reg