Re: autovacuum recommendations for Large tables

2020-11-16 Thread Andreas Schmitz
https://www.postgresql.org/docs/13/routine-vacuuming.html

Regards

Andreas

Am 11/16/2020 um 6:38 PM schrieb Atul Kumar:
> Hi,
>
> I have a large table having no. of live tuples approx 7690798868 and
> no. of dead tuples approx 114917737.
>
> So Please share autovacuum tuning recommendations for this table so
> that our time can be spent better than repeatedly vacuuming large
> tables.
>
>
> Please help.
>
>
>
> Regards,
> Atul
>
>




Re: maintenance_work_mem

2020-11-19 Thread Andreas Schmitz
https://www.postgresql.org/docs/13/sql-show.html

https://www.postgresql.org/docs/13/sql-set.html


Regards

Andreas


Am 11/19/2020 um 9:05 AM schrieb Atul Kumar:
> Hi,
>
> I have below queries:
>
> 1. How do i check the maintenance_work_mem for current session, before
> setting some other value for this parameter for the same session.
>
> 2. and How do I set maintenance_work_mem for a session only, and how
> will it be "rollback" once my maintainance work is done, Do I need to
> execute any command for that or just closing the session will rollback
> what I set for the session.
>
>
> Please respond me query wise.
>
>
>
> Regards,
> Atul
>
>




Re: error on connecting port 5432

2020-12-01 Thread Andreas Schmitz
You might want to give
https://www.postgresql.org/docs/13/runtime-config-connection.html a read

regards

Andreas

Am 12/2/2020 um 8:02 AM schrieb Atul Kumar:
> Thanks a lot Tom, I appended the -h /tmp and it worked.
>
> I need just one more help from you.
>
> Could you tell me that why & how that socket file existed in /tmp directory.
>
> What is the practice to make sure that this file (.s.PGSQL.5432)
> should be inside /var/run directory ? so that it will not throw such
> error.
>
> Please help me.
>
>
>
>
>
>
> Regards,
> Atul
>
>
>
> On 12/1/20, Tom Lane  wrote:
>> Atul Kumar  writes:
>>> Just to clarify that I am at root OS user, trying to create a test user
>>> using postgres user(-u) with create user command.
>> Given the reference to /var/run/postgresql, I'm suspecting that you
>> are running a server that thinks it should put its socket in /tmp,
>> but you have some copies of libpq on the machine that were built with
>> default socket location /var/run/postgresql.  When you are root, you
>> are very likely using a different PATH that is finding a different
>> createuser program linked to a different libpq.so than when you are
>> not root.
>>
>> A possible workaround is to add "-h /tmp" to your command when
>> running as root.  Eventually you'd want to try to not have
>> multiple postgres installations on the machine.
>>
>>  regards, tom lane
>>
>