PostgreSQL configuration modifications that allow remote access

PostgreSQL allows remote access to configuration modificationsPostgreSQL by default, remote Access does not succeed, and if you need to allow remote access, you need to modify two configuration files, as described below:1.postgresql.confSet the

PostgreSQL Deadlock Problem Resolution record

--Query blocked SQL (deadlock, no SQL executed through) SELECT * from Pg_stat_activity AA, (select A.locktype,a.database,a.pid,a.mode,a.relation,  B.relname from Pg_locks a joins Pg_class B on A.relation=b.oid where upper (b.relname) = '

External client connection PostgreSQL related settings

To modify the listening parameters in the service configuration file postgresql.confThe default profile is in the Pgdata directory (except that you specify it through the parameter Config_file in the service process) [[email protected] data]$ vi

PostgreSQL General Operations

Add users other than the Postgres super user.CREATEUSER-DRSP TestUser Create a dedicated database for usersCreatedb-o testuser TestDB When you back up your data, you should take the Postgres super user to avoid some permission class

Resolve cannot connect to remote PostgreSQL

PostgreSQL is installed on the remote server and adding the server with Pgadmin is not always possible.Workaround:Add host all to pg_hba.conf on the remote PostgreSQL database 0.0.0.0/0 Trustand ensure that the postgresql.conf parameter is set to

Linux under source code compile and install PostgreSQL database

I use the Postgres version of the source code for postgresql-9.3.5.The system is CentOS6.5, which is 64 bits.Read the README directly after downloadingThen read the install and follow the steps to do it.I was compiling, because there are two

Implementation of PostgreSQL Cross table

Here I would like to demonstrate how to achieve the cross-table in PostgreSQL display, as to what is a cross-table, I will not say, the degree Niang go oh.The original table data is as follows:t_girl=# select * from score; Name | subject | score----

POSTGRESQL Export Table structure information

Project team to the table structure of the document, handwriting is too cumbersome to use the SLQ script to export a copy.--Queries All table field information (with table name)Select(Select Relname| | ' --' | | (select description from

Python reads the PostgreSQL database and sends the relevant reminder message

The code is as follows:#! /usr/bin/env pythonImport SmtplibFrom Email.mime.text import MimetextImport PSYCOPG2Import datetimeMail_host= "SMTP. xxx.com "mail_user=" xxx "mail_pass=" xxx "mail_postfix=" xxx.com "Def send_mail (to_list,sub,content):    

PostgreSQL Flow account (fifth day): adding and deleting changes

Add: InsertINSERT into Products (product_no, name, price) VALUES(1, ' Cheese ', 9.99),(2, ' Bread ', 1.99),(3, ' Milk ', 2.99);You can insert more than one row of data at a time.INSERT into Products (product_no, name, Price) VALUES (1, ' Cheese ',

Reprint: PostgreSQL Partitioning and optimization

--For partition table constraint_exclusion This parameter needs to be configured as partition or onpostgres=# show constraint_exclusion; Constraint_exclusion----------------------Partition--Create a parent-child table for storing partition data

Quick upgrade of PostgreSQL version

Quick upgrade of PostgreSQL versionWrite in frontThe PostgreSQL9.5 version supports the capability of data sharding, and for future distributed considerations, prepare to upgrade the 9.1 version of the production environment to 9.5. Data migration

Python connects the PostgreSQL database

Python can connect to PostgreSQL via a third-party module. More famous psycopg2 and Python3-postgresql.(a) PSYCOPG2Install under Ubuntusudo Install PYTHON3-PSYCOPG2Create a test.py fileImportPSYCOPG2#Database Connection Parametersconn =

Test PostgreSQL with Pgbench

Pgbench–helpInitialization options:-I call initialization mode-F NUM Fill factor-S NUM scale factor (related to the amount of data produced)Benchmarking Options:-C NUM Database client concurrency (default: 1)-C (Make a new connection for each

JDBC Connect PostgreSQL

No more nonsense, rt~.First look at the data in the database:Here is the code for the Java Test class:Package Com.wl.test;import Java.sql.connection;import Java.sql.drivermanager;import java.sql.resultset;import Java.sql.resultsetmetadata;import

Get table primary Key name in PostgreSQL database

get table primary key name in PostgreSQL databaseFirst, to obtain the primary key information for the teacher table, as follows:SelectPg_constraint.conname asPk_name,pg_attribute.attname asColname,pg_type.typname asTypeName fromPg_constraintInner

PostgreSQL Time Line

The "Timeline" (Timeline) is a very distinctive concept for PG, which appears in the documentation of backup recovery. But the detailed explanations for this concept are very few and not very well understood, so let's take a closer look at

The date calculation function for PostgreSQL uses

One: Connectors in individual dataConnector for SQL Server: + (plus)SQLite's connector:. (dot)Connector for PostgreSQL: | | OrTwo:Today, when PostgreSQL calculates the date, I turn over some information, rarely, record it!The functions and variables

Special requirements for PostgreSQL timestamp extraction

Basic functions and parsing can be consulted:http://blog.csdn.net/snn1410/article/details/7741283PostgreSQL comes with to_date (text, text), To_timestamp (text, text); to_time function is not presentDemand:08:30-20:30→a20:30-08:30→bScript:SELECT(

Postgresql self-increment statement

If you simply start with 1, and the value of the increment is 1, you can write this, Serail is a special type:Add values and their results to the employee:If you want to set more detailed items, such as Start, increment, maximum, minimum, you can

Total Pages: 77 1 .... 54 55 56 57 58 .... 77 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.