PostgreSQL 8.0.0 �����ĵ���PostgreSQL �й� ������ | ||||
---|---|---|---|---|
Prev | Fast Backward | Fast Forward | Next |
postgres [-A 0 | 1 ] [-B nbuffers] [-c name=value] [-d debug-level] [--describe-config] [-D datadir] [-e] [-E] [-f s | i | t | n | m | h ] [-F] [-N] [-o filename] [-O] [-P] [-s | -t pa | pl | ex ] [-S work-mem] [-W seconds] [--name=value] database
postgres [-A 0 | 1 ] [-B nbuffers] [-c name=value] [-d debug-level] [-D datadir] [-e] [-f s | i | t | n | m | h ] [-F] [-o filename] [-O] [-p database] [-P] [-s | -t pa | pl | ex ] [-S work-mem] [-v protocol] [-W seconds] [--name=value]
��ִ�г��� postgres �����������ѯ�� PostgreSQL ���������̡� ͨ�����Dz��ᱻֱ�ӵ��õģ���������һ�� postmaster ���û���������
����ĵڶ�����ʽ���� postmaster���� postgres �ķ�����ֻ�Ǹ����ϵģ���Ϊ postmaster �� postgres ʵ������һ���ij��� ���Dz�������ֱ�ӵ���������һ����ʽ�Խ������û�ģʽֱ�ӵ��ø÷������� �����÷�����Ҫ��;���� initdb ����ʼ��ʱ�á���ʱ�������������������Իָ���
���� shell ���Խ���ģʽ����ʱ���û����������ѯ���ҽ�����ӡ����Ļ�ϣ� ������ʽ�Կ�����Ա�����ã����û�ȴ��öࡣ �������ס������һ�����û������������ʺ��ڵ��Ը÷������� ��Ϊû��ʵ�ʵĽ��̼�ͨѶ��������������
������һ�����û�������ʱ�����ѻỰ�û�����Ϊ ID Ϊ 1 ���û��� ���û�����ʵ�ʴ��ڣ����һ���������еķ������������ڶ�ijЩ������ϵͳ���н����ֹ��ָ��� �ڶ�������ģʽ�£�ϵͳ�����ظ��� ID Ϊ 1 ���û������û�Ȩ�ޡ�
��� postgres ����һ�� postmaster �����ģ���ô���̳к��ߵ�����ѡ������� postgres ��ص�ѡ������� -o ���ش� postmaster ���ݡ�
�����ͨ������һ�������ļ������������Щѡ� ����Section 16.4��ȡϸ�ڡ� ��Щ����ȫ�ģ�ѡ����Դ����ӹ����Ŀͻ������ã� �����ͻ����һ��Ӧ���صķ����� ���磬��������� PGOPTIONS ���������� ��ô����libpq�Ŀͻ��˾Ͷ����Ǹ��ִ����ݸ��������� ����ͳ� postgres ������ѡ�
ѡ�� -A��-B�� -c��-d��-D�� �� -F���Լ�--name �� postmaster �������ͬ�ĺ��塣ֻ�� -d 0 ���� postmaster �ĵ��Լ����� postgres��
��ȱʡ���ڷ������Ϊ "European"��Ҳ����˵��"DMY"��������������룬 ������һЩ���������ʽ���������·�ǰ���ӡ�� ���� Section 8.5 ��ȡ����ϸ�ڡ�
�����з�������־����� filename�� ������������� postmaster���еģ� ��������ѡ�����ʹ�ô� postmaster �̳й�����stderr��
ɨ��/����ϵͳ��¼ʱ����ϵͳ����ϵͳ��/����ʹ�� REINDEX ʱ��Ҫ���ѡ�
��ÿ���������ʱ��ӡʱ����Ϣ������ͳ����Ϣ�� ������ضԲ������ܺ͵��ڻ����������кô���
�����ڲ������ɢ������������ʱ�����ļ�֮ǰ����ʹ�õ��ڴ������� ���� Section 16.4.3.1 �����������ñ��� work_mem��
����Ҫ���ʵ����ݿ�����֡�������Ե���ȱʡΪ�û�����
�����������
�رհ�������Ϊ���ָ�����
���м���������ѡ�������������Ҫ���ڵ�����;�� ��Щ�����������г�ֻ�Ǹ� PostgreSQL ϵͳ������Աʹ�õġ� ����ǿ�ҷ���ʹ����Щѡ���� ������Щѡ����κ�һ�������δ���汾����ʧ������˵����
��ֹij��ɨ������ӷ�����ʹ�ã� s �� i �ֱ�ر�˳�������ɨ�裬�� n��m���� h �ֱ�ر�Ƕ��ѭ�����ںϣ�merge����ɢ�����ӡ�
ע��: ˳��ɨ���Ƕ��ѭ������������ȫ���رա� -fs �� -fn ѡ��������ڴ�����������ʱ�� ���Ż���ʹ����Щ�������ˡ�
������ϵͳ��Ľṹ������������� initdb��
���߷�����������������һ�� postmaster �����IJ�����Ҫʹ�õ����ݿ�ȡ�
��ӡ��ÿ����Ҫϵͳģ����صIJ�ѯ��ʱͳ�ơ� �����ܺ� -sѡ��һ��ʹ�á�
������λỰʹ�õ�ǰ/������Э��İ汾����
һ���������ѡ����̾�˯�߱���������� ������������һЩʱ��ѵ����������ڸ÷����������ϡ�
���ѡ���� tab �ָ��� COPY ��ʽ�������������ڲ����ñ�����������ȱʡ֮�� �������Ҫ�Ǹ�������ʹ�á�
Ҫֹͣ����һ����ѯ��ʹ�� SIGINT ���������и������ postgres ���̷��źš�
Ҫ���� postgres ���¶�ȡ�����ļ��� ʹ��һ�� SIGHUP �źš� ͨ��������ø� postmaster ���� SIGHUP�� postmaster ����� SIGHUP ����ÿ���ӽ��̡� ������ʱ�����ǿ�����ֻ��һ�� postgres ������װ�������ļ���
postmaster ʹ�� SIGTERM ����postgres���������˳��� �� SIGQUIT �Dz���������������˳��� ��Щ�ź���Ӧ�����û�ʹ�á� ��һ�� postgres ���̷��� SIGKILL Ҳ�Dz����ǵ� — postmaster ��������źŽ��ͳ�һ���� postgres ��ı����� ���һ�ǿ������������ postgres ��������һ�����ı������ָ�������һ���˳���
��������������������һ�������ķ�����
postgres -D $PGDATA other-options my_database
�� -D ���������ṩ��ȷ�����ݿ�Ŀ¼��·���� ����ȷ���������� PGDATA �Ѿ���ȷ���á� ͬʱ��Ҫ���������õ��ض����ݿ����֡�
ͨ�����������еķ������ѻ��з�����������������ַ��� ���������ֺŵ����ã���Ϊ��Щ�������� psql ��ġ� Ҫ���һ�зֳɶ���д��������ڳ����һ�����з������ÿ�����з�ǰ����һ����б�ܡ�
���������ʹ�� -N �����п��أ���ô���з��Ͳ�����ֹ�������롣 ���������ӱ������ȡ���ݣ�ֱ�������ļ���β��EOF���� Ȼ������뵱��һ�������������ִ��������ʱ��б��-���з��Ͳ��ٵ��������������
Ҫ�˳��Ự������EOFͨ���� Control+D)�� ������Ѿ�ʹ���� -N����Ҫ������������EOF���˳���
��ע��������еķ����������ṩ���ӵ��б༭���ܣ����磬û����������ʷ����