ลิ้งค์ดาวน์โหลด
https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-1.zip
第1集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-10.zip
第10集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-2.zip
第2集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-3.zip
第3集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-4.zip
第4集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-5.zip
第5集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-6.zip
第6集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-7.zip
第7集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-8.zip
第8集https://www.mdm.casino/video/pqremainingconnectionslotsarereservedfornonreplicationsuperuserconnections/7983-9.zip
第9集ดาวน์โหลดรายละเอียด
ปัญหาที่พบบ่อยในการใช้งานฐานข้อมูล PostgresSQL (pq: remaining connection slots are reserved for non-replication superuser connections) ทำให้ผู้ใช้ไม่สามารถเชื่อมต่อฐานข้อมูลได้ในบางครั้ง สาเหตุที่เกิดปัญหานี้มักเกิดจากข้อผิดพลาดในการกำหนดเซตต่อฐานข้อมูลที่สามารถเชื่อมต่อพร้อมกันได้เพียงจำนวนจำกัดในการแก้ไขปัญหานี้ ผู้ใช้สามารถทำได้ตามขั้นตอนดังต่อไปนี้:1. เช็คจำนวนการเชื่อมต่อที่เปิดอยู่: ผู้ใช้สามารถใช้คำสั่ง SHOW max_connections; เพื่อตรวจสอบจำนวนการเชื่อมต่อสูงสุดที่กำหนดสำหรับฐานข้อมูล2. เช็คจำนวนการเชื่อมต่อที่กำลังใช้งาน: ผู้ใช้สามารถใช้คำสั่ง SELECT count(*) FROM pg_stat_activity; เพื่อตรวจสอบจำนวนการเชื่อมต่อที่กำลังใช้งานอยู่3. ปรับเปลี่ยนค่า max_connections: หากจำนวนการเชื่อมต่อสูงสุดไม่เพียงพอสามารถทำการปรับค่านี้ในไฟล์ postgresql.conf โดยเข้าไปแก้ไขค่า parameter max_connections เป็นค่าที่ต้องการ4. รีสตาร์ทฐานข้อมูล: หลังจากที่ได้ทำการเปลี่ยนแปลงค่า max_connections ให้ทำการรีสตาร์ทฐานข้อมูลเพื่อให้การเปลี่ยนแปลงเทียบท่านั้นมีผลโดยทำตามขั้นตอนข้างต้น ผู้ใช้สามารถแก้ไขปัญหา pq: remaining connection slots are reserved for non-replication superuser connections ได้เรียบร้อย และสามารถเชื่อมต่อฐานข้อมูลได้อย่างปกติอีกครั้ง ลองทำตามขั้นตอนดังกล่าวและลองใช้งานอีกครั้งเพื่อให้แน่ใจว่าปัญหาได้รับการแก้ไขอย่างถูกต้องตามคาดหวัง